From cbc3d81bcad67b99ef39a9b4125a9b8acef656f4 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 17 Nov 2023 16:49:39 +0100 Subject: [PATCH] Gui: save active palette If the QLineEdit is disabled the current color group of the cached QPalette is set to 'Inactive'. Now when enabling the QLineEdit the wrong palette is set and the text looks like it's inactive. --- src/Gui/ExpressionBinding.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Gui/ExpressionBinding.cpp b/src/Gui/ExpressionBinding.cpp index 3e0af0264f..1ed7b53fee 100644 --- a/src/Gui/ExpressionBinding.cpp +++ b/src/Gui/ExpressionBinding.cpp @@ -295,6 +295,7 @@ QPixmap ExpressionWidget::getIcon(const char* name, const QSize& size) const void ExpressionWidget::makeLabel(QLineEdit* le) { defaultPalette = le->palette(); + defaultPalette.setCurrentColorGroup(QPalette::Active); /* Icon for f(x) */ QFontMetrics fm(le->font());