summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2012-06-20 12:01:52 +0200
committerJan Holesovsky <kendy@suse.cz>2012-06-20 14:26:45 +0200
commit9164d135db46be9de56ef60f4b95bbd933fdb57e (patch)
tree51555438e0c74c43d6436adb20d59a7af12d61fc /vcl/source
parent5c91395bdc1ab5662912b5775079ab2be99b048b (diff)
aero menubar: Make the text in menu black.
Change-Id: I4d9486ccda091506ad103fa4182cadf810fcd6f2
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/menu.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 935d5a9ec9ac..2bf8202079f6 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2669,11 +2669,17 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
// draw selected item
MenubarValue aControlValue;
aControlValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( pWin );
+
+ // transparent menubar needs a trick to write nice text, do it via NWF
+ OUString aText;
+ if ( bIsMenuBar && ImplGetSVData()->maNWFData.mbTransparentMenubar )
+ aText = pData->aText;
+
pWin->DrawNativeControl( CTRL_MENUBAR, PART_MENU_ITEM,
aRect,
CTRL_STATE_ENABLED | ( bHighlight? CTRL_STATE_SELECTED: 0 ),
aControlValue,
- OUString() );
+ aText );
pWin->Pop();
}
@@ -2803,7 +2809,8 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
}
// Text:
- if ( ( pData->eType == MENUITEM_STRING ) || ( pData->eType == MENUITEM_STRINGIMAGE ) )
+ if ( ( ( pData->eType == MENUITEM_STRING ) || ( pData->eType == MENUITEM_STRINGIMAGE ) ) &&
+ !(bIsMenuBar && ImplGetSVData()->maNWFData.mbTransparentMenubar) )
{
aTmpPos.X() = aPos.X() + nTextPos;
aTmpPos.Y() = aPos.Y();