[Libreoffice-commits] .: vcl/win
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 15 09:51:56 PST 2012
vcl/win/source/gdi/salnativewidgets-luna.cxx | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
New commits:
commit 18ad2ef60ec192089dd5ac9a01e0ccefc8207c7d
Author: Jan Holesovsky <kendy at suse.cz>
Date: Thu Nov 15 18:48:52 2012 +0100
Windows: Draw the horizontal line between the toolbar and view shell again.
This is necessary after I have removed the 'special' border of the view shell.
Change-Id: Ie29d60fbff0c6c38ed285ba30eb948ef83c43827
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index abb6f48..f61ba64 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -456,12 +456,13 @@ void impl_drawAeroToolbar( HDC hDC, RECT rc, bool bHorizontal )
const long GRADIENT_HEIGHT = 32;
long gradient_break = rc.top;
+ long gradient_bottom = rc.bottom - 1;
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 )
+ if ( gradient_bottom - rc.top > GRADIENT_HEIGHT )
{
- gradient_break = rc.bottom - GRADIENT_HEIGHT;
+ gradient_break = gradient_bottom - GRADIENT_HEIGHT;
TRIVERTEX vert[2] = {
{ rc.left, rc.top, 0xff00, 0xff00, 0xff00, 0xff00 },
@@ -472,10 +473,19 @@ void impl_drawAeroToolbar( HDC hDC, RECT rc, bool bHorizontal )
// gradient at the bottom
TRIVERTEX vert[2] = {
- { rc.left, gradient_break, 0xfa00, 0xfa00, 0xfa00, 0xff00 },
- { rc.right, rc.bottom, 0xf000, 0xf000, 0xf000, 0xff00 }
+ { rc.left, gradient_break, 0xfa00, 0xfa00, 0xfa00, 0xff00 },
+ { rc.right, gradient_bottom, 0xf000, 0xf000, 0xf000, 0xff00 }
};
GradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V );
+
+ // and a darker horizontal line under that
+ HPEN hpen = CreatePen( PS_SOLID, 1, RGB( 0xa0, 0xa0, 0xa0 ) );
+ SelectObject( hDC, hpen );
+
+ MoveToEx( hDC, rc.left, gradient_bottom, NULL );
+ LineTo( hDC, rc.right, gradient_bottom );
+
+ DeleteObject( hpen );
}
else
{
More information about the Libreoffice-commits
mailing list