Fix text color of "file changed on disk" notification

Adjusts the label color of the notification to the background.

Fix for #12690.
This commit is contained in:
Daniel Ramoeller 2023-03-08 20:00:27 +01:00 committed by Juergen Spitzmueller
parent 04d65929e9
commit 2ed5b4a705
2 changed files with 4 additions and 1 deletions

View File

@ -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();
}

View File

@ -264,6 +264,8 @@ void setMessageColour(list<QWidget *> highlighted, list<QWidget *> 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)