summaryrefslogtreecommitdiffstats
path: root/svtools
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-03-05 21:43:15 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-03-06 11:57:02 +0900
commitcda4c8edc21a92422e3479909d8082cddf16bcae (patch)
treeed1ce5d4e03760084cb7e050e3d97945e08e2cd8 /svtools
parentadd DrawHandle to DecorationView (diff)
downloadcore-cda4c8edc21a92422e3479909d8082cddf16bcae.tar.gz
core-cda4c8edc21a92422e3479909d8082cddf16bcae.zip
use DrawHandle for drawing of tab sizer in tabbar
Change-Id: I3aacb177d209db74ffadf5284550cdd4972554de
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/tabbar.cxx32
1 files changed, 3 insertions, 29 deletions
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);
}