diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/menu.cxx | 61 | ||||
-rw-r--r-- | vcl/win/source/gdi/salnativewidgets-luna.cxx | 2 |
2 files changed, 45 insertions, 18 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 926438c17fc1..64fe254e929c 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -3856,7 +3856,16 @@ static void ImplInitMenuWindow( Window* pWin, sal_Bool bFont, sal_Bool bMenuBar pWin->SetPointFont( rStyleSettings.GetMenuFont() ); if( bMenuBar ) { - if( pWin->IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) ) + const BitmapEx* pPersonaBitmap = rStyleSettings.GetPersonaHeader(); + if ( pPersonaBitmap != NULL ) + { + Wallpaper aWallpaper( *pPersonaBitmap ); + aWallpaper.SetStyle( WALLPAPER_TOPRIGHT ); + pWin->SetBackground( aWallpaper ); + pWin->SetPaintTransparent( sal_False ); + pWin->SetParentClipMode( 0 ); + } + else if ( pWin->IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) ) { pWin->SetBackground(); // background will be drawn by NWF } @@ -5494,13 +5503,19 @@ void MenuBarWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) MenubarValue aControlValue; aControlValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this ); - Point tmp(0,0); - Rectangle aBgRegion( tmp, GetOutputSizePixel() ); - DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL, - aBgRegion, - CTRL_STATE_ENABLED, - aControlValue, - OUString() ); + if ( GetSettings().GetStyleSettings().GetPersonaHeader() ) + Erase(); + else + { + Point tmp(0,0); + Rectangle aBgRegion( tmp, GetOutputSizePixel() ); + DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL, + aBgRegion, + CTRL_STATE_ENABLED, + aControlValue, + OUString() ); + } + ImplAddNWFSeparator( this, aControlValue ); // draw selected item @@ -5524,12 +5539,18 @@ void MenuBarWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) MenubarValue aMenubarValue; aMenubarValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this ); - // use full window size to get proper gradient - // but clip accordingly - Point aPt; - Rectangle aCtrlRect( aPt, GetOutputSizePixel() ); + if ( GetSettings().GetStyleSettings().GetPersonaHeader() ) + Erase( aRect ); + else + { + // use full window size to get proper gradient + // but clip accordingly + Point aPt; + Rectangle aCtrlRect( aPt, GetOutputSizePixel() ); + + DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL, aCtrlRect, CTRL_STATE_ENABLED, aMenubarValue, rtl::OUString() ); + } - DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL, aCtrlRect, CTRL_STATE_ENABLED, aMenubarValue, rtl::OUString() ); ImplAddNWFSeparator( this, aMenubarValue ); } else @@ -5751,13 +5772,19 @@ void MenuBarWindow::Paint( const Rectangle& ) if( IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) ) { - Point aPt; - Rectangle aCtrlRegion( aPt, GetOutputSizePixel() ); - MenubarValue aMenubarValue; aMenubarValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this ); - DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL, aCtrlRegion, CTRL_STATE_ENABLED, aMenubarValue, rtl::OUString() ); + if ( GetSettings().GetStyleSettings().GetPersonaHeader() ) + Erase(); + else + { + Point aPt; + Rectangle aCtrlRegion( aPt, GetOutputSizePixel() ); + + DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL, aCtrlRegion, CTRL_STATE_ENABLED, aMenubarValue, rtl::OUString() ); + } + ImplAddNWFSeparator( this, aMenubarValue ); } SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() ); diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index abed11889bc6..0ec6af123eb6 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -449,7 +449,7 @@ void ImplConvertSpinbuttonValues( int nControlPart, const ControlState& rState, } /// Draw an own toolbar style on Windows Vista or later, looks better there -void impl_drawAeroToolbar( HDC hDC, RECT rc, bool bHorizontal ) +static void impl_drawAeroToolbar( HDC hDC, RECT rc, bool bHorizontal ) { if ( rc.top == 0 && bHorizontal ) { |