mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-05 21:13:55 -07:00
Lint.
Took 49 seconds
This commit is contained in:
parent
dd78fb7029
commit
4b05e8f8b8
3 changed files with 9 additions and 5 deletions
|
|
@ -206,8 +206,9 @@ void PaletteEditorDialog::loadSchemes()
|
|||
for (auto group : {QPalette::Active, QPalette::Disabled, QPalette::Inactive}) {
|
||||
for (int i = 0; i < QPalette::NColorRoles; ++i) {
|
||||
auto role = static_cast<QPalette::ColorRole>(i);
|
||||
if (role != QPalette::NoRole)
|
||||
if (role != QPalette::NoRole) {
|
||||
cfg.colors[group][role] = appPal.color(group, role);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -219,8 +220,9 @@ void PaletteEditorDialog::loadSchemes()
|
|||
void PaletteEditorDialog::seedAccentFromScheme(const QString &scheme)
|
||||
{
|
||||
QColor seed = workingConfig.value(scheme).colors.value(QPalette::Active).value(QPalette::Highlight);
|
||||
if (seed.isValid())
|
||||
if (seed.isValid()) {
|
||||
quickSetupPanel->setAccentColor(seed);
|
||||
}
|
||||
}
|
||||
|
||||
void PaletteEditorDialog::onSchemeChanged(const QString &scheme)
|
||||
|
|
@ -321,4 +323,4 @@ void PaletteEditorDialog::refreshChromePalettes()
|
|||
quickSetupPanel->setPalette(sp);
|
||||
quickSetupPanel->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,9 +170,10 @@ void PaletteGridWidget::loadPalette(const PaletteConfig &cfg)
|
|||
PaletteConfig PaletteGridWidget::currentPaletteConfig() const
|
||||
{
|
||||
PaletteConfig cfg;
|
||||
for (auto group : ALL_GROUPS)
|
||||
for (auto group : ALL_GROUPS) {
|
||||
for (auto role : allRoles()) {
|
||||
cfg.colors[group][role] = colorButtons[group][role]->getColor();
|
||||
}
|
||||
}
|
||||
return cfg;
|
||||
}
|
||||
|
|
@ -279,8 +279,9 @@ void ThemeManager::applyStyleAndPalette(const QString &themeName,
|
|||
if (styleName.compare("Fusion", Qt::CaseInsensitive) == 0) {
|
||||
base = style->standardPalette();
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
|
||||
if (activeScheme == "Dark")
|
||||
if (activeScheme == "Dark") {
|
||||
base.setColor(QPalette::AlternateBase, QColor(53, 53, 53));
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
base = qApp->palette();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue