summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index bcf80cda60a2..3b0051ab8889 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -1015,13 +1015,18 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
if( aValue.getType() == CTRL_MENU_POPUP )
{
const MenupopupValue& rMVal( static_cast<const MenupopupValue&>(aValue) );
- aBGRect.left = rMVal.maItemRect.Left();
aBGRect.top = rMVal.maItemRect.Top();
aBGRect.bottom = rMVal.maItemRect.Bottom()+1; // see below in drawNativeControl
- aBGRect.right = rMVal.getNumericVal();
-
- // FIXME: magic
- aBGRect.left += 1; aBGRect.top += 1; aBGRect.bottom +=1;
+ if( Application::GetSettings().GetLayoutRTL() )
+ {
+ aBGRect.right = rMVal.maItemRect.Right()+1;
+ aBGRect.left = aBGRect.right - (rMVal.getNumericVal()-rMVal.maItemRect.Left());
+ }
+ else
+ {
+ aBGRect.right = rMVal.getNumericVal();
+ aBGRect.left = rMVal.maItemRect.Left();
+ }
}
iState = (nState & CTRL_STATE_ENABLED) ? MCB_NORMAL : MCB_DISABLED;
ImplDrawTheme( hTheme, hDC, MENU_POPUPCHECKBACKGROUND, iState, aBGRect, aCaption );