From 0ac87a712e93a1cdc61a62b26444b845ee42f652 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Mon, 1 Jun 2026 12:38:22 +0200 Subject: [PATCH] Expand dynamic theming regression coverage Assert the shared surface helper, accent-aware panels, Folio chrome, and dock labels use the new color path. --- tests/check-shift-dynamic-theming.sh | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/check-shift-dynamic-theming.sh b/tests/check-shift-dynamic-theming.sh index 45a327de..299a3c42 100644 --- a/tests/check-shift-dynamic-theming.sh +++ b/tests/check-shift-dynamic-theming.sh @@ -27,6 +27,12 @@ kcm_main=kcms/mobileshell/ui/main.qml kcm_appearance=kcms/mobileshell/ui/AppearanceForm.qml desktop_view=shell/contents/views/Desktop.qml kcm_metadata=kcms/mobileshell/kcm_mobileshell.json +panel_background=components/mobileshell/qml/components/PanelBackground.qml +motion_state_layer=components/mobileshell/qml/components/MotionStateLayer.qml +surface_colors=components/mobileshell/qml/components/SurfaceColors.qml +folio_main=containments/homescreens/folio/qml/main.qml +favourites_bar=containments/homescreens/folio/qml/FavouritesBar.qml +landscape_drawer=components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml require_line "$settings_header" 'Q_PROPERTY\(QString colorScheme READ colorScheme NOTIFY colorSchemeChanged\)' \ "mobile shell settings must expose the active KDE color scheme" @@ -148,6 +154,33 @@ require_line "$desktop_view" 'ShellSettings\.Settings\.applyWallpaperThemeColor\ "desktop wallpaper color extraction must feed Shift's wallpaper theme mode" require_line "$desktop_view" 'onWallpaperThemeEnabledChanged' \ "desktop wallpaper color extraction must react when wallpaper theme mode is toggled" +require_line "$surface_colors" '!ShellSettings\.Settings\.wallpaperThemeEnabled && !ShellSettings\.Settings\.wallpaperAccentEnabled' \ + "shared shell surface color helper must react to wallpaper/accent theming" +require_line "$surface_colors" 'ShellSettings\.Settings\.accentColor' \ + "shared shell surface color helper must prefer the applied KDE accent color" +require_line "$surface_colors" 'ShellSettings\.Settings\.wallpaperThemeColor' \ + "shared shell surface color helper must fall back to the extracted wallpaper color" +require_line "$panel_background" 'SurfaceColors\.accentSurface\(baseColor, accentTintDark, accentTintLight\)' \ + "shared shell panel backgrounds must react to wallpaper/accent theming" +require_line "$surface_colors" 'mix\(base, accent\(\), darkSurface \? darkRatio : lightRatio\)' \ + "shared shell panel backgrounds must tint surfaces from the active accent color" +require_line "$motion_state_layer" 'property color activeColor: SurfaceColors\.accent\(\)' \ + "shared active state layers must use the same accent source as shell surfaces" +require_line "$folio_main" 'readonly property color chromeColor: MobileShell\.SurfaceColors\.accentSurface\(Kirigami\.Theme\.backgroundColor, 0\.32, 0\.18\)' \ + "convergence top bar, frame, and dock chrome must tint from the active accent color" +require_line "$surface_colors" '!ShellSettings\.Settings\.wallpaperThemeEnabled && !ShellSettings\.Settings\.wallpaperAccentEnabled' \ + "convergence chrome must react to wallpaper/accent theming mode" +require_line "$folio_main" 'fillColor: MobileShell\.SurfaceColors\.accentSurface\(Kirigami\.Theme\.backgroundColor, 0\.32, 0\.18\)' \ + "convergence app drawer surface must tint from the active accent color" +require_line "$landscape_drawer" 'fillColor: MobileShell\.SurfaceColors\.accentSurface\(Kirigami\.Theme\.backgroundColor, 0\.32, 0\.18\)' \ + "convergence action drawer surface must tint from the active accent color" +require_line "$favourites_bar" 'color: MobileShell\.SurfaceColors\.accentSurface\(Kirigami\.Theme\.backgroundColor, 0\.24, 0\.12\)' \ + "dock thumbnail popup surfaces must tint from the active accent color" +require_line "$favourites_bar" 'color: leftDesktopBtn\.isCurrent \? MobileShell\.SurfaceColors\.accent\(\) : Kirigami\.Theme\.textColor' \ + "dock workspace pager labels must use the same accent source as shell surfaces" +if grep -Eq -- 'Kirigami\.Theme\.highlightColor' "$favourites_bar"; then + fail "convergence dock must not use Kirigami.Theme.highlightColor directly; use MobileShell.SurfaceColors.accent()" +fi require_line tests/CMakeLists.txt 'NAME shift-dynamic-theming' \ "dynamic theming regression test must be registered with CTest"