From 8e6bb060a7985410b662f8f659dd024e50ba5d7c Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 8 Nov 2020 16:07:10 +0100 Subject: [PATCH] Gui: [skip ci] try to avoid to truncate QuantitySpinBox at bottom margin on macOS --- src/Gui/QuantitySpinBox.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 6cd4287c01..f87ed50848 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -309,7 +309,12 @@ QuantitySpinBox::QuantitySpinBox(QWidget *parent) iconLabel->hide(); lineEdit()->setStyleSheet(QString::fromLatin1("QLineEdit { padding-right: %1px } ").arg(iconHeight+frameWidth)); // When a style sheet is set the text margins for top/bottom must be set to avoid to squash the widget +#ifndef Q_OS_MAC lineEdit()->setTextMargins(0, 2, 0, 2); +#else + // https://forum.freecadweb.org/viewtopic.php?f=8&t=50615 + lineEdit()->setTextMargins(0, 2, 0, 4); +#endif QObject::connect(iconLabel, SIGNAL(clicked()), this, SLOT(openFormulaDialog())); }