diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2005-05-18 07:05:17 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2005-05-18 07:05:17 +0000 |
commit | 3bdf1ea86786c13f8eb56afda1dfadd09c859754 (patch) | |
tree | cb5c22404acefc06f2886ff4d539acf80dcf0e85 /vcl/source | |
parent | d2a8c938c28018d119aae671d9d8c0b008b221df (diff) |
INTEGRATION: CWS kdeplugfixes (1.123.22); FILE MERGED
2005/05/02 12:47:18 pl 1.123.22.1: #i47902# correct menu bar higlight text color in KDE plugin
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/menu.cxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index d452ce06f34b..4cd114502ec8 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2,9 +2,9 @@ * * $RCSfile: menu.cxx,v $ * - * $Revision: 1.123 $ + * $Revision: 1.124 $ * - * last change: $Author: hr $ $Date: 2005-04-08 16:16:24 $ + * last change: $Author: rt $ $Date: 2005-05-18 08:05:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -652,6 +652,8 @@ private: BOOL ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu = TRUE ); Rectangle ImplGetItemRect( USHORT nPos ); + void ImplInitStyleSettings(); + DECL_LINK( CloserHdl, PushButton* ); DECL_LINK( FloatHdl, PushButton* ); DECL_LINK( HideHdl, PushButton* ); @@ -4571,6 +4573,8 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) : aHideBtn.SetClickHdl( LINK( this, MenuBarWindow, HideHdl ) ); aHideBtn.SetSymbol( SYMBOL_HIDE ); aHideBtn.SetQuickHelpText( XubString( ResId( SV_HELPTEXT_MINIMIZE, pResMgr ) ) ); + + ImplInitStyleSettings(); } MenuBarWindow::~MenuBarWindow() @@ -5218,6 +5222,21 @@ void MenuBarWindow::ImplLayoutChanged() pMenu->ImplKillLayoutData(); } +void MenuBarWindow::ImplInitStyleSettings() +{ + if( IsNativeControlSupported( CTRL_MENUBAR, PART_MENU_ITEM ) && + IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) ) + { + Color aHighlightTextColor = ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor; + if( aHighlightTextColor != Color( COL_TRANSPARENT ) ) + { + StyleSettings aStyle = maSettings.GetStyleSettings(); + aStyle.SetMenuHighlightTextColor( aHighlightTextColor ); + maSettings.SetStyleSettings( aStyle ); + } + } +} + void MenuBarWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -5228,6 +5247,7 @@ void MenuBarWindow::DataChanged( const DataChangedEvent& rDCEvt ) (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplLayoutChanged(); + ImplInitStyleSettings(); } } |