diff options
author | Jan Holesovsky <kendy@suse.cz> | 2012-06-21 17:55:53 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-06-25 18:09:14 +0200 |
commit | 9c5a22d19708eae17ad9880422bd03e81ea48c5d (patch) | |
tree | 96c2fff9489f498eff14935fcab0977f3086b8de /vcl/source/window | |
parent | 4f7f0b0539fd66f4ab01432cb062acb447269a23 (diff) |
aero toolbar: Extend the drawing of the toolbar to the menubar area.
Fix the maTopDockingAreaHeight computation too, it did not work.
Change-Id: I788c96960a5607482b750d536e522644e236f052
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/menu.cxx | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 5f543c9c0f31..0fff3c32daf0 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -754,7 +754,7 @@ static void ImplAddNWFSeparator( Window *pThis, const MenubarValue& rMenubarValu // add a separator if // - we have an adjacent docking area // - and if toolbars would draw them as well (mbDockingAreaSeparateTB must not be set, see dockingarea.cxx) - if( rMenubarValue.maTopDockingAreaHeight && !ImplGetSVData()->maNWFData.mbDockingAreaSeparateTB ) + if( rMenubarValue.maTopDockingAreaHeight && !ImplGetSVData()->maNWFData.mbDockingAreaSeparateTB && !ImplGetSVData()->maNWFData.mbDockingAreaAvoidTBFrames ) { // note: the menubar only provides the upper (dark) half of it, the rest (bright part) is drawn by the docking area @@ -861,27 +861,24 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow ) { // find docking area that is top aligned and return its height // note: dockingareas are direct children of the SystemWindow - int height=0; - sal_Bool bDone = sal_False; if( pWindow->ImplGetFrameWindow() ) { - Window *pWin = pWindow->ImplGetFrameWindow()->GetWindow( WINDOW_FIRSTCHILD); //mpWindowImpl->mpFirstChild; - while( pWin && !bDone ) + Window *pWin = pWindow->ImplGetFrameWindow()->GetWindow( WINDOW_FIRSTCHILD ); //mpWindowImpl->mpFirstChild; + while( pWin ) { if( pWin->IsSystemWindow() ) { - pWin = pWin->GetWindow( WINDOW_FIRSTCHILD); //mpWindowImpl->mpFirstChild; - while( pWin && !bDone ) + Window *pChildWin = pWin->GetWindow( WINDOW_FIRSTCHILD ); //mpWindowImpl->mpFirstChild; + while( pChildWin ) { - DockingAreaWindow *pDockingArea = dynamic_cast< DockingAreaWindow* >( pWin ); - if( pDockingArea && pDockingArea->GetAlign() == WINDOWALIGN_TOP ) - { - bDone = sal_True; - if( pDockingArea->IsVisible() ) - height = pDockingArea->GetOutputSizePixel().Height(); - } + DockingAreaWindow *pDockingArea = NULL; + if ( pChildWin->GetType() == WINDOW_DOCKINGAREA ) + pDockingArea = static_cast< DockingAreaWindow* >( pChildWin ); + + if( pDockingArea && pDockingArea->GetAlign() == WINDOWALIGN_TOP && pDockingArea->IsVisible() ) + return pDockingArea->GetOutputSizePixel().Height(); else - pWin = pWin->GetWindow( WINDOW_NEXT ); //mpWindowImpl->mpNext; + pChildWin = pChildWin->GetWindow( WINDOW_NEXT ); //mpWindowImpl->mpNext; } } @@ -889,7 +886,7 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow ) pWin = pWin->GetWindow( WINDOW_NEXT ); //mpWindowImpl->mpNext; } } - return height; + return 0; } Menu::Menu() |