Use system theme colors in app drawer and dock

Remove hardcoded Complementary override and white color literals
from AppDrawerHeader. In mobile mode the Plasma containment
framework already provides Complementary context; in convergence
mode the drawerOverlay Window starts a fresh Window context.
Both cases now propagate correctly without an explicit override.

Also set Kirigami.Theme.Window on the convergence dock
FavouritesBar so icon labels and hover highlights follow the
active system palette instead of the wallpaper context.
This commit is contained in:
Marco Allegretti 2026-04-27 14:28:21 +02:00
parent 8a4087bf96
commit c520a8e960
2 changed files with 13 additions and 8 deletions

View file

@ -15,8 +15,9 @@ Item {
id: root id: root
property Folio.HomeScreen folio property Folio.HomeScreen folio
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary // Do not override the colorset: in mobile mode we inherit Complementary
Kirigami.Theme.inherit: false // from the containment (wallpaper context, white text); in convergence mode
// the drawerOverlay Window gives us Window context (system-adaptive).
function addSearchText(text: string) { function addSearchText(text: string) {
searchField.text += text; searchField.text += text;
@ -57,22 +58,21 @@ Item {
background: Rectangle { background: Rectangle {
radius: Kirigami.Units.cornerRadius radius: Kirigami.Units.cornerRadius
color: Qt.rgba(255, 255, 255, (searchField.hovered || searchField.focus) ? 0.2 : 0.1) color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g,
Kirigami.Theme.textColor.b,
(searchField.hovered || searchField.focus) ? 0.2 : 0.1)
Behavior on color { ColorAnimation {} } Behavior on color { ColorAnimation {} }
} }
Kirigami.Theme.inherit: false
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
topPadding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing topPadding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
bottomPadding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing bottomPadding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
Layout.fillWidth: true Layout.fillWidth: true
horizontalAlignment: QQC2.TextField.AlignHCenter horizontalAlignment: QQC2.TextField.AlignHCenter
placeholderText: i18nc("@info:placeholder", "Search applications…") placeholderText: i18nc("@info:placeholder", "Search applications…")
placeholderTextColor: Qt.rgba(255, 255, 255, 0.8) placeholderTextColor: Kirigami.Theme.disabledTextColor
color: 'white' color: Kirigami.Theme.textColor
font.weight: Font.Bold font.weight: Font.Bold

View file

@ -366,6 +366,11 @@ ContainmentItem {
maskManager: root.maskManager maskManager: root.maskManager
homeScreen: folioHomeScreen homeScreen: folioHomeScreen
transform: Translate { y: dockOverlay.dockOffset } transform: Translate { y: dockOverlay.dockOffset }
// Dock is an opaque panel use Window colorset so all content
// (labels, hover highlights, icon tints) follows the system theme
// instead of the containment's Complementary wallpaper context.
Kirigami.Theme.inherit: false
Kirigami.Theme.colorSet: Kirigami.Theme.Window
} }
} }