diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-06 16:19:14 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-06 16:50:03 +0200 |
commit | 1326cd15f7ba985551f0fddc717e3bfc01ddda85 (patch) | |
tree | 024eb871ed5f4e8c02e21412475e6e9929a2b030 /src/widgets/styles | |
parent | fe70367fe06984d1ac84cc276ca3fd3edc4193c7 (diff) | |
parent | beb7258a56b6ec76531b73cc07ee30132a3f548f (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
mkspecs/qnx-x86-qcc/qplatformdefs.h
src/corelib/global/qglobal.h
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
src/opengl/qgl.cpp
src/opengl/qglpixelbuffer.cpp
src/opengl/qglshaderprogram.cpp
tests/auto/opengl/qglthreads/tst_qglthreads.cpp
Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qgtkstyle_p.cpp | 2 | ||||
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 30 |
2 files changed, 25 insertions, 7 deletions
diff --git a/src/widgets/styles/qgtkstyle_p.cpp b/src/widgets/styles/qgtkstyle_p.cpp index 2bd978bcb8..2c64225c70 100644 --- a/src/widgets/styles/qgtkstyle_p.cpp +++ b/src/widgets/styles/qgtkstyle_p.cpp @@ -855,7 +855,7 @@ QFont QGtkStylePrivate::getThemeFont() QIcon QGtkStylePrivate::getFilesystemIcon(const QFileInfo &info) { QIcon icon; - if (gnome_vfs_init && gnome_icon_lookup_sync) { + if (isThemeAvailable() && gnome_vfs_init && gnome_icon_lookup_sync) { gnome_vfs_init(); GtkIconTheme *theme = gtk_icon_theme_get_default(); QByteArray fileurl = QUrl::fromLocalFile(info.absoluteFilePath()).toEncoded(); diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 886491a440..f3bbe11563 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -1326,12 +1326,30 @@ void QMacStylePrivate::initComboboxBdi(const QStyleOptionComboBox *combo, HIThem // an extra check here before using the mini and small buttons. int h = combo->rect.size().height(); if (combo->editable){ - if (h < 21) - bdi->kind = kThemeComboBoxMini; - else if (h < 26) - bdi->kind = kThemeComboBoxSmall; - else - bdi->kind = kThemeComboBox; + if (qobject_cast<const QDateTimeEdit *>(widget)) { + // Except when, you know, we get a QDateTimeEdit with calendarPopup + // enabled. And then things get weird, basically because it's a + // transvestite spinbox with editable combobox tendencies. Meaning + // that it wants to look a combobox, except that it isn't one, so it + // doesn't get all those extra free margins around. (Don't know whose + // idea those margins were, but now it looks like we're stuck with + // them forever). So anyway, the height threshold should be smaller + // in this case, or the style gets confused when it needs to render + // or return any subcontrol size of the poor thing. + if (h < 9) + bdi->kind = kThemeComboBoxMini; + else if (h < 22) + bdi->kind = kThemeComboBoxSmall; + else + bdi->kind = kThemeComboBox; + } else { + if (h < 21) + bdi->kind = kThemeComboBoxMini; + else if (h < 26) + bdi->kind = kThemeComboBoxSmall; + else + bdi->kind = kThemeComboBox; + } } else { // Even if we specify that we want the kThemePopupButton, Carbon // will use the kThemePopupButtonSmall if the size matches. So we |