From cda4c8edc21a92422e3479909d8082cddf16bcae Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Thu, 5 Mar 2015 21:43:15 +0900 Subject: use DrawHandle for drawing of tab sizer in tabbar Change-Id: I3aacb177d209db74ffadf5284550cdd4972554de --- svtools/source/control/tabbar.cxx | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) (limited to 'svtools/source') diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index c3a983e01fb1..216e27ffe3a6 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -155,12 +155,6 @@ bool ImplTabButton::PreNotify(NotifyEvent& rNotifyEvent) return PushButton::PreNotify(rNotifyEvent); } - - - -// - ImplTabSizer - - - class ImplTabSizer : public vcl::Window { public: @@ -179,8 +173,6 @@ private: long mnStartWidth; }; - - ImplTabSizer::ImplTabSizer( TabBar* pParent, WinBits nWinStyle ) : Window( pParent, nWinStyle & WB_3DLOOK ) , mnStartWidth(0) @@ -190,8 +182,6 @@ ImplTabSizer::ImplTabSizer( TabBar* pParent, WinBits nWinStyle ) SetSizePixel(Size(7 * nScaleFactor, 0)); } - - void ImplTabSizer::ImplTrack( const Point& rScreenPos ) { TabBar* pParent = GetParent(); @@ -203,8 +193,6 @@ void ImplTabSizer::ImplTrack( const Point& rScreenPos ) pParent->Update(); } - - void ImplTabSizer::MouseButtonDown( const MouseEvent& rMEvt ) { if ( GetParent()->IsInEditMode() ) @@ -221,8 +209,6 @@ void ImplTabSizer::MouseButtonDown( const MouseEvent& rMEvt ) } } - - void ImplTabSizer::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) @@ -235,23 +221,11 @@ void ImplTabSizer::Tracking( const TrackingEvent& rTEvt ) ImplTrack( OutputToScreenPixel( rTEvt.GetMouseEvent().GetPosPixel() ) ); } - - void ImplTabSizer::Paint( const Rectangle& ) { - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - DecorationView aDecoView( this ); - long nOffX = 0; - Size aOutputSize = GetOutputSizePixel(); - - if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) ) - { - SetLineColor( rStyleSettings.GetDarkShadowColor() ); - DrawLine( Point( 0, 0 ), Point( 0, aOutputSize.Height()-1 ) ); - nOffX++; - aOutputSize.Width()--; - } - aDecoView.DrawButton( Rectangle( Point( nOffX, 0 ), aOutputSize ), BUTTON_DRAW_NOLIGHTBORDER ); + DecorationView aDecoView(this); + Rectangle aOutputRect(Point(0, 0), GetOutputSizePixel()); + aDecoView.DrawHandle(aOutputRect, true); } -- cgit