summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 5d020268c..03d75bd98 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -813,7 +813,12 @@ void MainTab::rejectChanges()
void markChangedWidget(QWidget *w){
QPalette p;
- p.setBrush(QPalette::Base, QColor(Qt::yellow).lighter());
+ qreal h, s, l, a;
+ qApp->palette().color(QPalette::Text).getHslF(&h, &s, &l, &a);
+ p.setBrush(QPalette::Base, ( l <= 0.3 ) ? QColor(Qt::yellow).lighter()
+ :( l <= 0.6 ) ? QColor(Qt::yellow).light()
+ :/* else */ QColor(Qt::yellow).darker(300)
+ );
w->setPalette(p);
}