Mercurial > minori
diff src/gui/dialog/settings.cc @ 294:99cbc51433e4
*: cleanup uses of QPalette
I didn't know about setBackgroundRole() which is very useful
in 99% of the cases where I even needed to edit the palette
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 12 May 2024 18:16:08 -0400 |
parents | 862d0d8619f6 |
children | 180714442770 |
line wrap: on
line diff
--- a/src/gui/dialog/settings.cc Sun May 12 18:06:44 2024 -0400 +++ b/src/gui/dialog/settings.cc Sun May 12 18:16:08 2024 -0400 @@ -25,7 +25,7 @@ page_title->setFont(font); { - QPalette pal = page_title->palette(); + QPalette pal(page_title->palette()); pal.setColor(QPalette::Window, QColor(0xAB, 0xAB, 0xAB)); pal.setColor(QPalette::WindowText, Qt::white); page_title->setPalette(pal); @@ -98,8 +98,8 @@ sidebar->setIconSize(QSize(24, 24)); sidebar->setFrameShape(QFrame::Box); - QPalette pal(sidebar->palette()); - sidebar->SetBackgroundColor(pal.color(QPalette::Base)); + sidebar->SetBackgroundTransparent(false); + sidebar->setBackgroundRole(QPalette::Base); sidebar->setFixedWidth(158); sidebar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);