Kaydet (Commit) cda4c8ed authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

use DrawHandle for drawing of tab sizer in tabbar

Change-Id: I3aacb177d209db74ffadf5284550cdd4972554de
üst b2f76e0e
...@@ -155,12 +155,6 @@ bool ImplTabButton::PreNotify(NotifyEvent& rNotifyEvent) ...@@ -155,12 +155,6 @@ bool ImplTabButton::PreNotify(NotifyEvent& rNotifyEvent)
return PushButton::PreNotify(rNotifyEvent); return PushButton::PreNotify(rNotifyEvent);
} }
// - ImplTabSizer -
class ImplTabSizer : public vcl::Window class ImplTabSizer : public vcl::Window
{ {
public: public:
...@@ -179,8 +173,6 @@ private: ...@@ -179,8 +173,6 @@ private:
long mnStartWidth; long mnStartWidth;
}; };
ImplTabSizer::ImplTabSizer( TabBar* pParent, WinBits nWinStyle ) ImplTabSizer::ImplTabSizer( TabBar* pParent, WinBits nWinStyle )
: Window( pParent, nWinStyle & WB_3DLOOK ) : Window( pParent, nWinStyle & WB_3DLOOK )
, mnStartWidth(0) , mnStartWidth(0)
...@@ -190,8 +182,6 @@ ImplTabSizer::ImplTabSizer( TabBar* pParent, WinBits nWinStyle ) ...@@ -190,8 +182,6 @@ ImplTabSizer::ImplTabSizer( TabBar* pParent, WinBits nWinStyle )
SetSizePixel(Size(7 * nScaleFactor, 0)); SetSizePixel(Size(7 * nScaleFactor, 0));
} }
void ImplTabSizer::ImplTrack( const Point& rScreenPos ) void ImplTabSizer::ImplTrack( const Point& rScreenPos )
{ {
TabBar* pParent = GetParent(); TabBar* pParent = GetParent();
...@@ -203,8 +193,6 @@ void ImplTabSizer::ImplTrack( const Point& rScreenPos ) ...@@ -203,8 +193,6 @@ void ImplTabSizer::ImplTrack( const Point& rScreenPos )
pParent->Update(); pParent->Update();
} }
void ImplTabSizer::MouseButtonDown( const MouseEvent& rMEvt ) void ImplTabSizer::MouseButtonDown( const MouseEvent& rMEvt )
{ {
if ( GetParent()->IsInEditMode() ) if ( GetParent()->IsInEditMode() )
...@@ -221,8 +209,6 @@ void ImplTabSizer::MouseButtonDown( const MouseEvent& rMEvt ) ...@@ -221,8 +209,6 @@ void ImplTabSizer::MouseButtonDown( const MouseEvent& rMEvt )
} }
} }
void ImplTabSizer::Tracking( const TrackingEvent& rTEvt ) void ImplTabSizer::Tracking( const TrackingEvent& rTEvt )
{ {
if ( rTEvt.IsTrackingEnded() ) if ( rTEvt.IsTrackingEnded() )
...@@ -235,23 +221,11 @@ void ImplTabSizer::Tracking( const TrackingEvent& rTEvt ) ...@@ -235,23 +221,11 @@ void ImplTabSizer::Tracking( const TrackingEvent& rTEvt )
ImplTrack( OutputToScreenPixel( rTEvt.GetMouseEvent().GetPosPixel() ) ); ImplTrack( OutputToScreenPixel( rTEvt.GetMouseEvent().GetPosPixel() ) );
} }
void ImplTabSizer::Paint( const Rectangle& ) void ImplTabSizer::Paint( const Rectangle& )
{ {
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); DecorationView aDecoView(this);
DecorationView aDecoView( this ); Rectangle aOutputRect(Point(0, 0), GetOutputSizePixel());
long nOffX = 0; aDecoView.DrawHandle(aOutputRect, true);
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 );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment