@@ -89,6 +89,7 @@ QMap<QString, QVariant> QgisAppStyleSheet::defaultOptions()
8989
9090void QgisAppStyleSheet::buildStyleSheet ( const QMap<QString, QVariant> &opts )
9191{
92+ QgsSettings settings;
9293 QString ss;
9394
9495 // QgisApp-wide font
@@ -122,24 +123,28 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant> &opts )
122123
123124 ss += QLatin1String ( " QGroupBox{ font-weight: 600; }" );
124125
125- // sidebar style
126- QString style = " QListWidget#mOptionsListWidget {"
127- " background-color: rgb(69, 69, 69, 0);"
128- " outline: 0;"
129- " }"
130- " QFrame#mOptionsListFrame {"
131- " background-color: rgb(69, 69, 69, 220);"
132- " }"
133- " QListWidget#mOptionsListWidget::item {"
134- " color: white;"
135- " padding: 3px;"
136- " }"
137- " QListWidget#mOptionsListWidget::item::selected {"
138- " color: black;"
139- " background-color:palette(Window);"
140- " padding-right: 0px;"
141- " }" ;
142- ss += style;
126+ QString themeName = settings.value ( QStringLiteral ( " UI/UITheme" ), " default" ).toString ();
127+ if ( themeName == QStringLiteral ( " default" ) )
128+ {
129+ // sidebar style
130+ QString style = " QListWidget#mOptionsListWidget {"
131+ " background-color: rgb(69, 69, 69, 0);"
132+ " outline: 0;"
133+ " }"
134+ " QFrame#mOptionsListFrame {"
135+ " background-color: rgb(69, 69, 69, 220);"
136+ " }"
137+ " QListWidget#mOptionsListWidget::item {"
138+ " color: white;"
139+ " padding: 3px;"
140+ " }"
141+ " QListWidget#mOptionsListWidget::item::selected {"
142+ " color: black;"
143+ " background-color:palette(Window);"
144+ " padding-right: 0px;"
145+ " }" ;
146+ ss += style;
147+ }
143148
144149 // Fix selection color on losing focus (Windows)
145150 const QPalette palette = qApp->palette ();
0 commit comments