diff options
author | Jan Holesovsky <kendy@suse.cz> | 2012-06-12 11:06:56 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-06-12 16:31:43 +0200 |
commit | f268355606630e9fc07a945859ec57ae00f6e427 (patch) | |
tree | 2cb8d9bd9bf9bf20fa7b9234b52e553173757427 /vcl/win | |
parent | eac708b0b188d7e6477922bb4bc03199cd92f5ca (diff) |
toolbars: Improve the toolbars look in Windows Vista or later.
Change-Id: I389ef70c76a3a9c837ad5406c417804ad77be948
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/gdi/salnativewidgets-luna.cxx | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 867845a09fd3..20eb88e24de4 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -1007,7 +1007,39 @@ sal_Bool ImplDrawNativeControl( HWND hWnd, HDC hDC, HTHEME hTheme, RECT rc, { const ToolbarValue *pValue = static_cast<const ToolbarValue*>(&aValue); if( pValue->mbIsTopDockingArea ) - rc.top = 0; // extend potential gradient to cover menu bar as well + { + // make it more compatible with Aero + if( ImplGetSVData()->maNWFData.mbTransparentMenubar ) + { + const long GRADIENT_HEIGHT = 32; + + long gradient_break = rc.top; + GRADIENT_RECT g_rect[1] = { { 0, 1 } }; + + // very slow gradient at the top (if we have space for that) + if ( rc.bottom - rc.top > GRADIENT_HEIGHT ) + { + gradient_break = rc.bottom - GRADIENT_HEIGHT; + + TRIVERTEX vert[2] = { + { rc.left, rc.top, 0xff00, 0xff00, 0xff00, 0xff00 }, + { rc.right, gradient_break, 0xfa00, 0xfa00, 0xfa00, 0xff00 }, + }; + GradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V ); + } + + // gradient at the bottom + TRIVERTEX vert[2] = { + { rc.left, gradient_break, 0xfa00, 0xfa00, 0xfa00, 0xff00 }, + { rc.right, rc.bottom, 0xe500, 0xe900, 0xee00, 0xff00 } + }; + GradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V ); + + return sal_True; + } + else + rc.top = 0; // extend potential gradient to cover menu bar as well + } } return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption); } @@ -1566,6 +1598,9 @@ void WinSalGraphics::updateSettingsNative( AllSettings& rSettings ) pSVData->maNWFData.mnMenuFormatBorderY = 2; pSVData->maNWFData.maMenuBarHighlightTextColor = aStyleSettings.GetMenuTextColor(); GetSalData()->mbThemeMenuSupport = TRUE; + + // don't draw frame around each and every toolbar + pSVData->maNWFData.mbDockingAreaAvoidTBFrames = true; } rSettings.SetStyleSettings( aStyleSettings ); |