mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -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,11 +206,12 @@ void PaletteEditorDialog::loadSchemes()
|
||||||
for (auto group : {QPalette::Active, QPalette::Disabled, QPalette::Inactive}) {
|
for (auto group : {QPalette::Active, QPalette::Disabled, QPalette::Inactive}) {
|
||||||
for (int i = 0; i < QPalette::NColorRoles; ++i) {
|
for (int i = 0; i < QPalette::NColorRoles; ++i) {
|
||||||
auto role = static_cast<QPalette::ColorRole>(i);
|
auto role = static_cast<QPalette::ColorRole>(i);
|
||||||
if (role != QPalette::NoRole)
|
if (role != QPalette::NoRole) {
|
||||||
cfg.colors[group][role] = appPal.color(group, role);
|
cfg.colors[group][role] = appPal.color(group, role);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
savedConfig[scheme] = cfg;
|
savedConfig[scheme] = cfg;
|
||||||
workingConfig[scheme] = cfg;
|
workingConfig[scheme] = cfg;
|
||||||
}
|
}
|
||||||
|
|
@ -219,9 +220,10 @@ void PaletteEditorDialog::loadSchemes()
|
||||||
void PaletteEditorDialog::seedAccentFromScheme(const QString &scheme)
|
void PaletteEditorDialog::seedAccentFromScheme(const QString &scheme)
|
||||||
{
|
{
|
||||||
QColor seed = workingConfig.value(scheme).colors.value(QPalette::Active).value(QPalette::Highlight);
|
QColor seed = workingConfig.value(scheme).colors.value(QPalette::Active).value(QPalette::Highlight);
|
||||||
if (seed.isValid())
|
if (seed.isValid()) {
|
||||||
quickSetupPanel->setAccentColor(seed);
|
quickSetupPanel->setAccentColor(seed);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PaletteEditorDialog::onSchemeChanged(const QString &scheme)
|
void PaletteEditorDialog::onSchemeChanged(const QString &scheme)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -170,9 +170,10 @@ void PaletteGridWidget::loadPalette(const PaletteConfig &cfg)
|
||||||
PaletteConfig PaletteGridWidget::currentPaletteConfig() const
|
PaletteConfig PaletteGridWidget::currentPaletteConfig() const
|
||||||
{
|
{
|
||||||
PaletteConfig cfg;
|
PaletteConfig cfg;
|
||||||
for (auto group : ALL_GROUPS)
|
for (auto group : ALL_GROUPS) {
|
||||||
for (auto role : allRoles()) {
|
for (auto role : allRoles()) {
|
||||||
cfg.colors[group][role] = colorButtons[group][role]->getColor();
|
cfg.colors[group][role] = colorButtons[group][role]->getColor();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return cfg;
|
return cfg;
|
||||||
}
|
}
|
||||||
|
|
@ -279,8 +279,9 @@ void ThemeManager::applyStyleAndPalette(const QString &themeName,
|
||||||
if (styleName.compare("Fusion", Qt::CaseInsensitive) == 0) {
|
if (styleName.compare("Fusion", Qt::CaseInsensitive) == 0) {
|
||||||
base = style->standardPalette();
|
base = style->standardPalette();
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
|
||||||
if (activeScheme == "Dark")
|
if (activeScheme == "Dark") {
|
||||||
base.setColor(QPalette::AlternateBase, QColor(53, 53, 53));
|
base.setColor(QPalette::AlternateBase, QColor(53, 53, 53));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
base = qApp->palette();
|
base = qApp->palette();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue