Gui: correct the size and position of the expression (fx) icon

This commit is contained in:
Alfredo Monclus
2025-03-15 13:29:53 -03:00
committed by Kacper Donat
parent 9a48e7fcfd
commit cea9a4002e
2 changed files with 4 additions and 10 deletions

View File

@@ -302,13 +302,11 @@ void ExpressionWidget::makeLabel(QLineEdit* le)
/* Icon for f(x) */
QFontMetrics fm(le->font());
int frameWidth = le->style()->pixelMetric(QStyle::PM_SpinBoxFrameWidth);
iconHeight = fm.height() - frameWidth;
iconHeight = fm.height();
iconLabel = new ExpressionLabel(le);
iconLabel->setCursor(Qt::ArrowCursor);
QPixmap pixmap = getIcon(":/icons/bound-expression-unset.svg", QSize(iconHeight, iconHeight));
iconLabel->setPixmap(pixmap);
iconLabel->setStyleSheet(QStringLiteral("QLabel { border: none; padding: 0px; padding-top: %2px; width: %1px; height: %1px }").arg(iconHeight).arg(frameWidth/2));
iconLabel->hide();
iconLabel->setExpressionText(QString());
}