mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-29 07:19:46 -06:00
Avoid style-sheet inheritance in colour chooser boxes in Preferences
This avoid propagating the style-sheet to other widgets. For example, to the tool-tip shown in the frame. But it could also fixed the problem reported for Windows in issue #1493: "Editing color preferences dialog background takes the last chosen color." "Color dialog becomes obscured by the changing color patterns of each selection."
This commit is contained in:
@@ -509,13 +509,13 @@ void PreferencesDialog::setColorSetting(QFrame *frame, const QColor &color)
|
||||
palette.setColor(frame->backgroundRole(), color);
|
||||
frame->setPalette(palette);
|
||||
|
||||
frame->setStyleSheet(QString("background-color: %2").arg(color.name()));
|
||||
frame->setStyleSheet(QString(".QFrame {background-color: %2}").arg(color.name()));
|
||||
|
||||
palette = line->palette();
|
||||
palette.setColor(role, color);
|
||||
line->setPalette(palette);
|
||||
|
||||
line->setStyleSheet(QString("color: %1; background-color: %2").arg(palette.color(line->foregroundRole()).name(),
|
||||
line->setStyleSheet(QString(".QLineEdit {color: %1; background-color: %2}").arg(palette.color(line->foregroundRole()).name(),
|
||||
palette.color(line->backgroundRole()).name()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user