diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-04-11 21:34:06 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-04-11 21:54:00 +0400 |
commit | a4cc4d3ec982ac61100b337125983afa0bb6fbc3 (patch) | |
tree | 22eea2b0588402c5c6a9b2fea7ec9e2d17f4ee41 | |
parent | 6ae314ece2ecd6743a2d0f8a5eaca9b8b5dbeeaa (diff) |
vcl: win: fix RTL menu separator and gutter, checkmarks are still misplaced
-rw-r--r-- | vcl/win/source/gdi/salnativewidgets-luna.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 2bc2f4b7b323..bcf80cda60a2 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -984,8 +984,16 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, if( nPart == PART_ENTIRE_CONTROL ) { RECT aGutterRC = rc; - aGutterRC.left += aValue.getNumericVal(); - aGutterRC.right = aGutterRC.left+3; + if( Application::GetSettings().GetLayoutRTL() ) + { + aGutterRC.right -= aValue.getNumericVal(); + aGutterRC.left = aGutterRC.right-3; + } + else + { + aGutterRC.left += aValue.getNumericVal(); + aGutterRC.right = aGutterRC.left+3; + } return ImplDrawTheme( hTheme, hDC, MENU_POPUPBACKGROUND, 0, rc, aCaption ) && ImplDrawTheme( hTheme, hDC, MENU_POPUPGUTTER, 0, aGutterRC, aCaption ) @@ -1028,7 +1036,11 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, } else if( nPart == PART_MENU_SEPARATOR ) { - rc.left += aValue.getNumericVal(); // adjust for gutter position + // adjust for gutter position + if( Application::GetSettings().GetLayoutRTL() ) + rc.right -= aValue.getNumericVal(); + else + rc.left += aValue.getNumericVal(); Rectangle aRect( ImplGetThemeRect( hTheme, hDC, MENU_POPUPSEPARATOR, 0, Rectangle( rc.left, rc.top, rc.right, rc.bottom ) ) ); // center the separator inside the passed rectangle |