Split home shortcut card style into Layout, Color, and Palette

Decouple the two concerns that were entangled in a single card-style setting:

- Layout (Compact / Regular) now only controls positioning of the
  icon / title / subtitle / counter.
- Color (Soft / Vibrant) is a new independent setting: Soft = tinted
  background with palette-colored icon and neutral text; Vibrant =
  solid palette fill with white icon/text.
- Palette (Accent first, then Classic/Sunset/Meadow/Berry/Grape/Custom)
  now applies to both layouts and both colors, and is always shown.

Adds section headers (Layout / Color / Palette) to the style page and
fixes the Compact preview to show the count subtitle line. Default is
Regular + Soft + Accent.
This commit is contained in:
Arkadiusz Fal
2026-06-11 19:03:52 +02:00
parent 30fc8dc4c8
commit 8d556abd0b
9 changed files with 252 additions and 81 deletions

View File

@@ -402,12 +402,14 @@ struct HomeView: View {
#endif
}
/// Resolves the colorful-style color for a shortcut at the given grid
/// position from the selected palette (and custom colors when applicable).
/// Resolves the Regular-style fill color for a shortcut at the given grid
/// position from the selected palette (custom colors and accent color when
/// applicable).
private func colorfulColor(atPosition position: Int) -> Color {
let palette = settingsManager?.homeShortcutColorfulPalette ?? .classic
let palette = settingsManager?.homeShortcutColorfulPalette ?? .accent
let customHex = settingsManager?.homeShortcutCustomPaletteColors ?? []
return HomeShortcutColorfulPalette.color(forPosition: position, palette: palette, customHex: customHex)
let accentColor = settingsManager?.accentColor.color ?? .accentColor
return HomeShortcutColorfulPalette.color(forPosition: position, palette: palette, customHex: customHex, accentColor: accentColor)
}
private var shortcutsList: some View {