summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2016-09-01 11:53:15 +0200
committerAndy Shaw <andy.shaw@qt.io>2016-10-24 16:02:23 +0000
commite2d8c7bf2203cbc0c7ff923caf3132881aafa0b0 (patch)
tree0811942134cfef23c6a47db3a48d542fe67a009d /src/widgets
parent843247e1c509ec3ce55a2e2051b83fcfa6634135 (diff)
Don't change the size of widgets just because it is in a floating dock
When a QDockWidget was floating on macOS then it would force the size of various widgets, such as buttons, comboboxes, to be the smallest needed rather than the size they had when it was docked. Task-number: QTBUG-7460 Task-number: QTBUG-52354 Change-Id: Id348180934f113f3a9a9ce5622a9af03eed04108 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 46918a2d5f..84445bfce4 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -1034,6 +1034,8 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
#if defined(QMAC_QAQUASTYLE_SIZE_CONSTRAIN) || defined(DEBUG_SIZE_CONSTRAINT)
static QAquaWidgetSize qt_aqua_guess_size(const QWidget *widg, QSize large, QSize small, QSize mini)
{
+ Q_UNUSED(widg);
+
if (large == QSize(-1, -1)) {
if (small != QSize(-1, -1))
return QAquaSizeSmall;
@@ -1049,7 +1051,7 @@ static QAquaWidgetSize qt_aqua_guess_size(const QWidget *widg, QSize large, QSiz
}
#ifndef QT_NO_MAINWINDOW
- if (qobject_cast<QDockWidget *>(widg->window()) || qEnvironmentVariableIsSet("QWIDGET_ALL_SMALL")) {
+ if (qEnvironmentVariableIsSet("QWIDGET_ALL_SMALL")) {
//if (small.width() != -1 || small.height() != -1)
return QAquaSizeSmall;
} else if (qEnvironmentVariableIsSet("QWIDGET_ALL_MINI")) {