From a67c192968f73da23b60d2572e93d8307ac4eb92 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Thu, 3 May 2018 10:39:10 +0200 Subject: [PATCH] QmlDesigner: try to keep zoom combo box smaller Not sure why it takes so much space, tried different tricks, nothing was working - so just take the half and hope. Change-Id: Ib9ea475281b860838391f370c4f1eed98e327903 Reviewed-by: Thomas Hartmann --- src/plugins/qmldesigner/components/formeditor/zoomaction.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/qmldesigner/components/formeditor/zoomaction.cpp b/src/plugins/qmldesigner/components/formeditor/zoomaction.cpp index 5ddfe12d4f5..b0aae5d911a 100644 --- a/src/plugins/qmldesigner/components/formeditor/zoomaction.cpp +++ b/src/plugins/qmldesigner/components/formeditor/zoomaction.cpp @@ -109,6 +109,7 @@ QWidget *ZoomAction::createWidget(QWidget *parent) connect(this, &ZoomAction::indexChanged, comboBox, &QComboBox::setCurrentIndex); comboBox->setProperty("hideborder", true); + comboBox->setMaximumWidth(qMax(comboBox->view()->sizeHintForColumn(0) / 2, 16)); return comboBox; }