diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-04-14 20:48:11 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-04-14 20:59:57 +0400 |
commit | 7179a362dd5788c4c4f7197d15abfa17e0cad584 (patch) | |
tree | 25ce3abb8a197594c96ec4523e6e51e6e2e2fb29 /vcl | |
parent | 532904765073c827bed3181d97c217909db1843f (diff) |
vcl: win: fix RTL checkmark backgrounds fdo#42537
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/gdi/salnativewidgets-luna.cxx | 15 |
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 ); |