Skip to content

Commit

Permalink
Gui: [skip ci] try to avoid to truncate QuantitySpinBox at bottom mar…
Browse files Browse the repository at this point in the history
…gin on macOS
  • Loading branch information
wwmayer committed Nov 8, 2020
1 parent 975c03a commit c5a4b01
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Gui/QuantitySpinBox.cpp
Expand Up @@ -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()));
}
Expand Down

0 comments on commit c5a4b01

Please sign in to comment.