summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2012-10-19 01:21:22 +0200
committerLior Kaplan <kaplanlior@gmail.com>2012-10-25 17:36:31 +0200
commitb1f308d96609bf6a6bd6b563dcbec246a6910b0f (patch)
treeab55d927391f1e7d5d79f7c24418a694449d513d /vcl/source
parent44653d129f909a026b91fa4df6e1bd931638d620 (diff)
fdo#44657 Remove hack that "simulates" a mirrored horizontal scrollbar.
We are able to paint mirrored scrolbars with the 'gen' plugin, so just fix the rendering of the scroolbar with the Gtk+ plugin. Change-Id: I5dbd13420c6290e165ed2f5827769979298abf37 (cherry picked from commit bfa21ce5fa08f2c634ccb6162914be55aef9f3c2) Signed-off-by: Lior Kaplan <kaplanlior@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/scrbar.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 863b8274d621..0751557f1210 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -852,7 +852,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, sal_Bool bCallAction
switch ( meScrollType )
{
case SCROLL_LINEUP:
- if ( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? PART_BUTTON_LEFT: PART_BUTTON_UP,
+ if ( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? (IsRTLEnabled()? PART_BUTTON_RIGHT: PART_BUTTON_LEFT): PART_BUTTON_UP,
aControlRegion, rMousePos, bIsInside )?
bIsInside:
maBtn1Rect.IsInside( rMousePos ) )
@@ -865,7 +865,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, sal_Bool bCallAction
break;
case SCROLL_LINEDOWN:
- if ( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? PART_BUTTON_RIGHT: PART_BUTTON_DOWN,
+ if ( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? (IsRTLEnabled()? PART_BUTTON_LEFT: PART_BUTTON_RIGHT): PART_BUTTON_DOWN,
aControlRegion, rMousePos, bIsInside )?
bIsInside:
maBtn2Rect.IsInside( rMousePos ) )
@@ -959,7 +959,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
Point aPoint( 0, 0 );
Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
- if ( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? PART_BUTTON_LEFT: PART_BUTTON_UP,
+ if ( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? (IsRTLEnabled()? PART_BUTTON_RIGHT: PART_BUTTON_LEFT): PART_BUTTON_UP,
aControlRegion, rMousePos, bIsInside )?
bIsInside:
maBtn1Rect.IsInside( rMousePos ) )
@@ -973,7 +973,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
else
Sound::Beep( SOUND_DISABLE, this );
}
- else if ( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? PART_BUTTON_RIGHT: PART_BUTTON_DOWN,
+ else if ( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? (IsRTLEnabled()? PART_BUTTON_LEFT: PART_BUTTON_RIGHT): PART_BUTTON_DOWN,
aControlRegion, rMousePos, bIsInside )?
bIsInside:
maBtn2Rect.IsInside( rMousePos ) )
@@ -1316,12 +1316,12 @@ Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt )
Point aPoint( 0, 0 );
Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
- if( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? PART_BUTTON_LEFT: PART_BUTTON_UP,
+ if( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? (IsRTLEnabled()? PART_BUTTON_RIGHT: PART_BUTTON_LEFT): PART_BUTTON_UP,
aControlRegion, rPt, bIsInside )?
bIsInside:
maBtn1Rect.IsInside( rPt ) )
return &maBtn1Rect;
- else if( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? PART_BUTTON_RIGHT: PART_BUTTON_DOWN,
+ else if( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? (IsRTLEnabled()? PART_BUTTON_LEFT: PART_BUTTON_RIGHT): PART_BUTTON_DOWN,
aControlRegion, rPt, bIsInside )?
bIsInside:
maBtn2Rect.IsInside( rPt ) )