[Gui] Center expression icon
This commit is contained in:
committed by
Yorik van Havre
parent
902f9072db
commit
18c463bcbb
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user