From 318b56f0f15d3f194e965750c591ee5847ef8ae9 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 24 Sep 2009 15:37:44 +0200 Subject: Fix the area above the menubar to have the right background When a gradient was set on the whole window then there was a line above the menubar that repeated the gradient for each menu item. Since there is a workaround in place already for the background of the menu to get painted correctly, we just extend the rect this covers to ensure the extra line of pixels is included. Reviewed-by: Jens Bache-Wiig --- src/gui/styles/qwindowsvistastyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qwindowsvistastyle.cpp b/src/gui/styles/qwindowsvistastyle.cpp index 7803e92..b062a3f 100644 --- a/src/gui/styles/qwindowsvistastyle.cpp +++ b/src/gui/styles/qwindowsvistastyle.cpp @@ -1214,7 +1214,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption alignment |= Qt::TextHideMnemonic; //The rect adjustment is a workaround for the menu not really filling its background. - XPThemeData theme(widget, painter, QLatin1String("MENU"), MENU_BARBACKGROUND, 0, option->rect.adjusted(-1, 1 , 2, 1)); + XPThemeData theme(widget, painter, QLatin1String("MENU"), MENU_BARBACKGROUND, 0, option->rect.adjusted(-1, 0, 2, 1)); d->drawBackground(theme); int stateId = MBI_NORMAL; -- cgit v0.12