diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index ae2641cb45..85a4e2858e 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -181,7 +181,7 @@ void InputField::resizeEvent(QResizeEvent *) QSize sz = iconLabel->sizeHint(); int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); iconLabel->move(rect().right() - frameWidth - sz.width(), - (rect().bottom() + 1 - sz.height())/2); + rect().center().y() - sz.height() / 2); } void InputField::updateIconLabel(const QString& text) diff --git a/src/Gui/SpinBox.cpp b/src/Gui/SpinBox.cpp index fd92a3f3a3..064c0f320b 100644 --- a/src/Gui/SpinBox.cpp +++ b/src/Gui/SpinBox.cpp @@ -168,7 +168,7 @@ void ExpressionSpinBox::resizeWidget() int frameWidth = spinbox->style()->pixelMetric(QStyle::PM_SpinBoxFrameWidth); QSize sz = iconLabel->sizeHint(); - iconLabel->move(lineedit->rect().right() - frameWidth - sz.width(), 0); + iconLabel->move(lineedit->rect().right() - frameWidth - sz.width(), lineedit->rect().center().y() - sz.height() / 2); updateExpression(); } diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index e3b618a0c6..16f710d057 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -1634,7 +1634,7 @@ void ExpLineEdit::resizeEvent(QResizeEvent * event) int frameWidth = style()->pixelMetric(QStyle::PM_SpinBoxFrameWidth); QSize sz = iconLabel->sizeHint(); - iconLabel->move(rect().right() - frameWidth - sz.width(), 0); + iconLabel->move(rect().right() - frameWidth - sz.width(), rect().center().y() - sz.height() / 2); try { if (isBound() && getExpression()) {