summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-12-09 09:55:54 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-12-09 09:55:54 (GMT)
commit1cfa8d81f04e02860df85a3b7acf41974982adae (patch)
tree01282181ab20b7637ceb75d0c26cef15d1d916b5 /src/gui/styles
parent934d4b9852060b2870f6774cd854331422147d3e (diff)
parenteea71824f57dd61b0a513e3bbb5ced99de505d73 (diff)
downloadQt-1cfa8d81f04e02860df85a3b7acf41974982adae.zip
Qt-1cfa8d81f04e02860df85a3b7acf41974982adae.tar.gz
Qt-1cfa8d81f04e02860df85a3b7acf41974982adae.tar.bz2
Merge upstream/4.6 into oslo-staging-2/4.6
Conflicts: src/s60installs/bwins/QtGuiu.def
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qgtkstyle.cpp9
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp13
2 files changed, 19 insertions, 3 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index b32c55b..afa3325 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -645,6 +645,15 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
return buttonsHaveIcons;
}
+ case SH_UnderlineShortcut: {
+ gboolean underlineShortcut = true;
+ if (!d->gtk_check_version(2, 12, 0)) {
+ GtkSettings *settings = d->gtk_settings_get_default();
+ g_object_get(settings, "gtk-enable-mnemonics", &underlineShortcut, NULL);
+ }
+ return underlineShortcut;
+ }
+
default:
return QCleanlooksStyle::styleHint(hint, option, widget, returnData);
}
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index 0767083..50be342 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -3779,12 +3779,19 @@ int QWindowsXPStyle::styleHint(StyleHint hint, const QStyleOption *option, const
QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask *>(returnData);
const QStyleOptionTitleBar *titlebar = qstyleoption_cast<const QStyleOptionTitleBar *>(option);
if (mask && titlebar) {
+ // Note certain themes will not return the whole window frame but only the titlebar part when
+ // queried This function needs to return the entire window mask, hence we will only fetch the mask for the
+ // titlebar itself and add the remaining part of the window rect at the bottom.
+ int tbHeight = proxy()->pixelMetric(PM_TitleBarHeight, option, widget);
+ QRect titleBarRect = option->rect;
+ titleBarRect.setHeight(tbHeight);
XPThemeData themeData;
if (titlebar->titleBarState & Qt::WindowMinimized) {
- themeData = XPThemeData(widget, 0, QLatin1String("WINDOW"), WP_MINCAPTION, CS_ACTIVE, option->rect);
+ themeData = XPThemeData(widget, 0, QLatin1String("WINDOW"), WP_MINCAPTION, CS_ACTIVE, titleBarRect);
} else
- themeData = XPThemeData(widget, 0, QLatin1String("WINDOW"), WP_CAPTION, CS_ACTIVE, option->rect);
- mask->region = d->region(themeData);
+ themeData = XPThemeData(widget, 0, QLatin1String("WINDOW"), WP_CAPTION, CS_ACTIVE, titleBarRect);
+ mask->region = d->region(themeData) +
+ QRect(0, tbHeight, option->rect.width(), option->rect.height() - tbHeight);
}
}
break;