From 2ed5b4a70552ba6785c2747cb660eee999b60a4f Mon Sep 17 00:00:00 2001 From: Daniel Ramoeller Date: Wed, 8 Mar 2023 20:00:27 +0100 Subject: [PATCH] Fix text color of "file changed on disk" notification Adjusts the label color of the notification to the background. Fix for #12690. --- src/frontends/qt/GuiWorkArea.cpp | 3 ++- src/frontends/qt/qt_helpers.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp index cc1fdb51c0..ae693328b7 100644 --- a/src/frontends/qt/GuiWorkArea.cpp +++ b/src/frontends/qt/GuiWorkArea.cpp @@ -2115,7 +2115,8 @@ GuiWorkAreaContainer::GuiWorkAreaContainer(GuiWorkArea * wa, QWidget * parent) this, SLOT(updateDisplay())); connect(reloadPB, SIGNAL(clicked()), this, SLOT(reload())); connect(ignorePB, SIGNAL(clicked()), this, SLOT(ignore())); - setMessageColour({notificationFrame}, {reloadPB, ignorePB}); + setMessageColour({notificationFrame, externalModificationLabel}, + {reloadPB, ignorePB}); updateDisplay(); } diff --git a/src/frontends/qt/qt_helpers.cpp b/src/frontends/qt/qt_helpers.cpp index 97f316ab6d..6cd8e0185c 100644 --- a/src/frontends/qt/qt_helpers.cpp +++ b/src/frontends/qt/qt_helpers.cpp @@ -264,6 +264,8 @@ void setMessageColour(list highlighted, list plain) QPalette pal = QApplication::palette(); QPalette newpal(pal.color(QPalette::Active, QPalette::HighlightedText), pal.color(QPalette::Active, QPalette::Highlight)); + newpal.setColor(QPalette::WindowText, + pal.color(QPalette::Active, QPalette::HighlightedText)); for (QWidget * w : highlighted) w->setPalette(newpal); for (QWidget * w : plain)