mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-22 09:35:08 -07:00
[Client] Add [AppColors] application palette roles
The home-tab buttons' gradient over the static theme background was hardcoded, and accent-derived fallbacks could not be themed or edited: QPalette's role set is closed, so any application-specific color has to live in Cockatrice's own palette layer. - Add an AppColor::Role enum (AccentStrong / AccentSoft) stored on PaletteConfig and round-tripped from palette-<scheme>.toml under a new [AppColors] section. - Cache the applied app colors in ThemeManager and expose appColor(Role) with a palette-accent-derived fallback; emit paletteChanged() from applyStyleAndPalette so previews, scheme switches and OS dark mode repaint palette-driven widgets. - Fill both app roles in PaletteGenerator::fromAccent and surface them as a dedicated section in the palette editor. - Drive the home-tab buttons from appColor() whenever the background source is the theme (any theme, not just built-ins). - Ship AccentStrong / AccentSoft values in the Fusion and Default default palettes so the static home-tab buttons keep their classic greens.
This commit is contained in:
parent
7d867b9745
commit
11d8e4a4e6
12 changed files with 196 additions and 13 deletions
|
|
@ -110,7 +110,7 @@ bool OracleImporter::readSetsFromByteArray(QByteArray data)
|
|||
* A lower index means a higher priority.
|
||||
*/
|
||||
static const QStringList MAIN_CARD_TYPE_PRIORITY = {"Planeswalker", "Creature", "Land", "Sorcery",
|
||||
"Instant", "Artifact", "Enchantment"};
|
||||
"Instant", "Artifact", "Enchantment"};
|
||||
|
||||
/**
|
||||
* Returns the priority (index) of the given main card type. Known types map to their
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue