diff options
author | Jan Holesovsky <kendy@suse.cz> | 2012-06-25 13:09:17 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-06-25 18:09:12 +0200 |
commit | ece807345296d4ab77aa7178e29efa8ac26836a0 (patch) | |
tree | 22fc2adaa86517b941c2a84836665bf104d988d7 /vcl/source | |
parent | f2eef8314c97c068b2b0cdbf565997836528f85d (diff) |
Revert "aero: Implement a glass menubar on Windows."
This reverts commit 64c696fc92a860fdbbe490ca503391b964dd646f.
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/menu.cxx | 51 |
1 files changed, 9 insertions, 42 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 935d5a9ec9ac..a23f69aea0d1 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -52,7 +52,6 @@ #include "vcl/toolbox.hxx" #include "vcl/dockingarea.hxx" -#include "salframe.hxx" #include "salinst.hxx" #include "svdata.hxx" #include "svids.hrc" @@ -2656,29 +2655,6 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa nImageStyle |= IMAGE_DRAW_DISABLE; } - // Menubar highlights - if ( bIsMenuBar && pWin->IsNativeControlSupported( CTRL_MENUBAR, PART_MENU_ITEM ) ) - { - bool bHighlight = pThisItemOnly && bHighlighted; - if ( bHighlight || ImplGetSVData()->maNWFData.mbTransparentMenubar ) - { - Rectangle aRect = Rectangle( Point( aTopLeft.X(), 1 ), Size( pData->aSz.Width(), pWin->GetOutputSizePixel().Height()-2 ) ); - pWin->Push( PUSH_CLIPREGION ); - pWin->IntersectClipRegion( aRect ); - - // draw selected item - MenubarValue aControlValue; - aControlValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( pWin ); - pWin->DrawNativeControl( CTRL_MENUBAR, PART_MENU_ITEM, - aRect, - CTRL_STATE_ENABLED | ( bHighlight? CTRL_STATE_SELECTED: 0 ), - aControlValue, - OUString() ); - - pWin->Pop(); - } - } - // Separator if ( !bLayout && !bIsMenuBar && ( pData->eType == MENUITEM_SEPARATOR ) ) { @@ -3334,9 +3310,6 @@ Window* MenuBar::ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu ) ( pMenu->ImplGetSalMenu() && pMenu->ImplGetSalMenu()->VisibleMenuBar() ) ) nHeight = 0; - if ( pParent ) - pParent->ImplGetFrame()->extendWindowManagerFrameNative( 0, 0, nHeight, 0 ); - pWindow->SetPosSizePixel( 0, 0, 0, nHeight, WINDOW_POSSIZE_HEIGHT ); return pWindow; } @@ -3920,18 +3893,6 @@ static void ImplInitMenuWindow( Window* pWin, sal_Bool bFont, sal_Bool bMenuBar pWin->SetTextColor( rStyleSettings.GetMenuTextColor() ); pWin->SetTextFillColor(); pWin->SetLineColor(); - - // update the window manager frame here too in order to be able to switch - // themes - if ( bMenuBar ) - { - const Window *pParent = pWin->GetParent(); - if ( pParent ) - { - Size aSize = pWin->GetSizePixel(); - pParent->ImplGetFrame()->extendWindowManagerFrameNative( 0, 0, aSize.Height(), 0 ); - } - } } MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nStyle ) : @@ -5554,9 +5515,15 @@ void MenuBarWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) OUString() ); ImplAddNWFSeparator( this, aControlValue ); - // NWF item highlight is drawn in ImplPaint() instead of - // here, so that we can NWF-paint even the non-higlighted - // items there + if ( bHighlight ) + { + // draw selected item + DrawNativeControl( CTRL_MENUBAR, PART_MENU_ITEM, + aRect, + CTRL_STATE_ENABLED | CTRL_STATE_SELECTED, + aControlValue, + OUString() ); + } } else { |