mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 11:19:18 +01:00
Save default QApplication palette when starting Clementine
Update issue 2603 Hopefully, this will fix this issue for other systems this time...
This commit is contained in:
parent
97d8365c56
commit
da35fab076
@ -35,8 +35,8 @@ class Appearance : public QObject {
|
||||
static const char* kUseCustomColorSet;
|
||||
static const char* kForegroundColor;
|
||||
static const char* kBackgroundColor;
|
||||
|
||||
static const QPalette kDefaultPalette;
|
||||
|
||||
private:
|
||||
QColor foreground_color_;
|
||||
QColor background_color_;
|
||||
|
@ -690,6 +690,9 @@ MainWindow::MainWindow(
|
||||
|
||||
// Load theme
|
||||
appearance_ = new Appearance(this);
|
||||
// This is tricky: we need to save the default/system palette now, before
|
||||
// loading user preferred theme (which will overide it), to be able to restore it later
|
||||
const_cast<QPalette&>(Appearance::kDefaultPalette) = QApplication::palette();
|
||||
appearance_->LoadUserTheme();
|
||||
StyleSheetLoader* css_loader = new StyleSheetLoader(this);
|
||||
css_loader->SetStyleSheet(this, ":mainwindow.css");
|
||||
|
Loading…
Reference in New Issue
Block a user