Explicitly use a default QPalette

Update issue 2603
Hopefully, this fixes this issue
This commit is contained in:
Arnaud Bienner 2012-01-12 23:01:05 +01:00
parent 4fbee9cf91
commit 22d1608bdc
2 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,8 @@ const char* Appearance::kUseCustomColorSet = "use-custom-set";
const char* Appearance::kForegroundColor = "foreground-color";
const char* Appearance::kBackgroundColor = "background-color";
const QPalette Appearance::kDefaultPalette = QPalette();
Appearance::Appearance(QObject* parent)
: QObject(parent)
{
@ -49,7 +51,7 @@ void Appearance::LoadUserTheme() {
}
void Appearance::ResetToSystemDefaultTheme() {
QApplication::setPalette(QPalette());
QApplication::setPalette(kDefaultPalette);
}
void Appearance::ChangeForegroundColor(const QColor& color) {

View File

@ -35,6 +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_;