[Icons] Author neutral System icon ink

The System theme derived icon ink from the platform palette, which rendered blue under the default palette. Author Icon/IconStrong/IconSoft explicitly: a black ladder in light mode, a white ladder in dark mode. Pin authorship, achromaticity and ordering in the render test.
This commit is contained in:
Lukas Brübach 2026-11-07 18:39:36 +01:00
parent dcf1d9fcf9
commit 181bd9d02c
7 changed files with 70 additions and 38 deletions

View file

@ -459,8 +459,8 @@ QColor defaultAppColor(AppColor::Role role, bool dark)
case AppColor::AccentStrong:
case AppColor::AccentSoft:
// The neutral icon family is palette-derived like the accent, so a
// theme without a palette of its own (System) keeps following the
// platform instead of pinning one scheme's ink.
// theme without an authored icon family keeps following the platform
// instead of pinning one scheme's ink.
case AppColor::Icon:
case AppColor::IconStrong:
case AppColor::IconSoft:

View file

@ -65,9 +65,9 @@ Q_ENUM_NS(Role)
* ThemeManager derives them from the palette: the accent from the highlight,
* the icon ink from the neutral text color plus the highlight. Semantic roles
* return an opaque default that suits the scheme, so themes written before the
* role existed still render it. A theme with no palette of its own (the System
* theme) keeps deriving its icon ink from the platform palette instead of
* pinning one scheme's colors.
* role existed still render it. A theme with no authored icon family keeps
* deriving its icon ink from the platform palette instead of pinning one
* scheme's colors.
*/
QColor defaultAppColor(AppColor::Role role, bool dark);

View file

@ -656,8 +656,8 @@ QColor ThemeManager::appColor(AppColor::Role role) const
case AppColor::IconStrong:
case AppColor::IconSoft: {
// Legacy fallback for a theme written before the icon roles
// existed, or one with no palette of its own (System). The three
// levels are the ink rule this series shipped, applied once here so
// existed, or one with no authored icon family. The three levels
// are the ink rule this series shipped, applied once here so
// authored roles never get recomputed at paint time.
const QPalette &palette = qApp->palette();
const QColor text = palette.color(QPalette::Active, QPalette::WindowText);