Gui: [skip ci] try to avoid to truncate QuantitySpinBox at bottom margin on macOS
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user