mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
Fix subsurface on dark themes.
This patch fixes my last annoyances with dark themes on subsurface. It changes the background color of the edited info tab to a darker yellow if the theme is dark, and a light yellow if the theme is light. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
10519bcc50
commit
231fd2e6e0
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue