diff --git a/containments/homescreens/folio/qml/AppDrawer.qml b/containments/homescreens/folio/qml/AppDrawer.qml index 54382ec2..b18c11cf 100644 --- a/containments/homescreens/folio/qml/AppDrawer.qml +++ b/containments/homescreens/folio/qml/AppDrawer.qml @@ -17,6 +17,8 @@ import 'private' Item { id: root required property Folio.HomeScreen folio + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Window property var homeScreen diff --git a/containments/homescreens/folio/qml/AppDrawerGrid.qml b/containments/homescreens/folio/qml/AppDrawerGrid.qml index fa67ef92..bd1bdffd 100644 --- a/containments/homescreens/folio/qml/AppDrawerGrid.qml +++ b/containments/homescreens/folio/qml/AppDrawerGrid.qml @@ -147,7 +147,7 @@ MobileShell.GridView { contentItem: Rectangle { radius: width / 2 - color: Qt.rgba(1, 1, 1, 0.3) + color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.3) } } } diff --git a/containments/homescreens/folio/qml/AppDrawerHeader.qml b/containments/homescreens/folio/qml/AppDrawerHeader.qml index ec2cbba9..f560256f 100644 --- a/containments/homescreens/folio/qml/AppDrawerHeader.qml +++ b/containments/homescreens/folio/qml/AppDrawerHeader.qml @@ -16,9 +16,8 @@ Item { id: root property Folio.HomeScreen folio - // Do not override the colorset: in mobile mode we inherit Complementary - // from the containment (wallpaper context, white text); in convergence mode - // the drawerOverlay Window gives us Window context (system-adaptive). + // The AppDrawer owns a Window colorset so mobile and convergence use the + // same Shift theme roles. function addSearchText(text: string) { searchField.text += text; diff --git a/containments/homescreens/folio/qml/FavouritesBar.qml b/containments/homescreens/folio/qml/FavouritesBar.qml index 2dba58e4..a23cc306 100644 --- a/containments/homescreens/folio/qml/FavouritesBar.qml +++ b/containments/homescreens/folio/qml/FavouritesBar.qml @@ -571,9 +571,7 @@ MouseArea { Keys.onReturnPressed: root.folio.triggerOverview() Keys.onEnterPressed: root.folio.triggerOverview() Keys.onSpacePressed: root.folio.triggerOverview() - Keys.onLeftPressed: { - searchButton.forceActiveFocus() - } + Keys.onLeftPressed: searchButton.forceActiveFocus() KeyboardHighlight { anchors.fill: parent @@ -632,7 +630,7 @@ MouseArea { Keys.onReturnPressed: root.folio.HomeScreenState.openSearchWidget() Keys.onEnterPressed: root.folio.HomeScreenState.openSearchWidget() Keys.onSpacePressed: root.folio.HomeScreenState.openSearchWidget() - Keys.onLeftPressed: root.focusBeforeSearch() + Keys.onLeftPressed: trashButton.forceActiveFocus() Keys.onRightPressed: overviewButton.forceActiveFocus() KeyboardHighlight { @@ -884,6 +882,8 @@ MouseArea { Keys.onReturnPressed: Qt.openUrlExternally("trash:/") Keys.onEnterPressed: Qt.openUrlExternally("trash:/") Keys.onSpacePressed: Qt.openUrlExternally("trash:/") + Keys.onLeftPressed: root.focusBeforeSearch() + Keys.onRightPressed: searchButton.forceActiveFocus() KeyboardHighlight { anchors.fill: parent diff --git a/containments/homescreens/folio/qml/FolioHomeScreen.qml b/containments/homescreens/folio/qml/FolioHomeScreen.qml index e43953b7..b21af641 100644 --- a/containments/homescreens/folio/qml/FolioHomeScreen.qml +++ b/containments/homescreens/folio/qml/FolioHomeScreen.qml @@ -31,7 +31,6 @@ Item { property real rightMargin: 0 property bool interactive: true - readonly property color favouritesBarScrimColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.14) // non-widget drop animation readonly property bool dropAnimationRunning: delegateDragItem.dropAnimationRunning || widgetDragItem.dropAnimationRunning @@ -363,7 +362,9 @@ Item { Rectangle { id: favouritesBarScrim - color: root.favouritesBarScrimColor + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Window + color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.38) Component.onCompleted: maskManager.assignToMask(this) @@ -389,6 +390,8 @@ Item { folio: root.folio maskManager: root.maskManager homeScreen: root + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Window // don't show in settings mode opacity: 1 - folio.HomeScreenState.settingsOpenProgress diff --git a/containments/homescreens/folio/qml/main.qml b/containments/homescreens/folio/qml/main.qml index c7ad5876..71aa918c 100644 --- a/containments/homescreens/folio/qml/main.qml +++ b/containments/homescreens/folio/qml/main.qml @@ -246,10 +246,12 @@ ContainmentItem { Rectangle { id: appDrawerBackground anchors.fill: parent + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Window // Convergence: no scrim (popup has own background); mobile: dark scrim color: ShellSettings.Settings.convergenceModeEnabled ? "transparent" - : Qt.rgba(0, 0, 0, 0.6) + : Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.46) opacity: folio.HomeScreenState.appDrawerOpenProgress } @@ -257,7 +259,9 @@ ContainmentItem { Rectangle { id: searchWidgetBackground anchors.fill: parent - color: Qt.rgba(0, 0, 0, 0.3) + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Window + color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.30) opacity: folio.HomeScreenState.searchWidgetOpenProgress } @@ -265,7 +269,9 @@ ContainmentItem { Rectangle { id: settingsViewBackground anchors.fill: parent - color: Qt.rgba(0, 0, 0, 0.3) + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Window + color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.30) opacity: folio.HomeScreenState.settingsOpenProgress } diff --git a/tests/check-convergence-dock-invariant.sh b/tests/check-convergence-dock-invariant.sh index 1efde31f..8000f90a 100644 --- a/tests/check-convergence-dock-invariant.sh +++ b/tests/check-convergence-dock-invariant.sh @@ -97,6 +97,8 @@ require_line "$favourites_bar" "Keys.onLeftPressed: root.focusBeforeSearch()" require_line "$favourites_bar" "Accessible.name: root.pagerDesktopName(leftDesktopBtn.index)" require_line "$favourites_bar" "Keys.onRightPressed: {" require_line "$favourites_bar" "root.focusAfterPager()" +require_line "$favourites_bar" "Keys.onLeftPressed: trashButton.forceActiveFocus()" +require_line "$favourites_bar" "Keys.onRightPressed: searchButton.forceActiveFocus()" if grep -Fq "Math.ceil(virtualDesktopInfo.numberOfDesktops / 2)" "$favourites_bar"; then echo "Desktop pager must not split virtual desktops between dock edges" >&2 exit 1 diff --git a/tests/check-shift-theme-identity.sh b/tests/check-shift-theme-identity.sh index bd1859b3..234ae46d 100644 --- a/tests/check-shift-theme-identity.sh +++ b/tests/check-shift-theme-identity.sh @@ -103,6 +103,23 @@ reject_line lookandfeel/contents/defaults 'breeze-dark|breeze-light|breeze_curso reject_line lookandfeel/contents/defaults 'widgetStyle=Shift|widgetStyle=SHIFT|widgetStyle=org\.shift' \ "look-and-feel defaults must not reference a non-existent Shift widget style" +require_line containments/homescreens/folio/qml/FolioHomeScreen.qml 'id: favouritesBarScrim' \ + "Folio homescreen must keep a themed mobile favourites bar surface" +require_line containments/homescreens/folio/qml/FolioHomeScreen.qml 'Kirigami\.Theme\.colorSet: Kirigami\.Theme\.Window' \ + "Folio mobile shell surfaces must use the Shift Window colorset" +require_line containments/homescreens/folio/qml/FolioHomeScreen.qml 'Kirigami\.Theme\.backgroundColor\.r, Kirigami\.Theme\.backgroundColor\.g, Kirigami\.Theme\.backgroundColor\.b, 0\.38' \ + "Folio mobile favourites bar must use a transparent Shift background color" +reject_line containments/homescreens/folio/qml/FolioHomeScreen.qml 'favouritesBarScrimColor|highlightColor\.r.*highlightColor\.g.*highlightColor\.b' \ + "Folio mobile favourites bar must not tint its surface from the accent color" +require_line containments/homescreens/folio/qml/AppDrawer.qml 'Kirigami\.Theme\.colorSet: Kirigami\.Theme\.Window' \ + "Folio app drawer must use the Shift Window colorset in all modes" +reject_line containments/homescreens/folio/qml/AppDrawerHeader.qml 'inherit Complementary|wallpaper context' \ + "Folio app drawer header must not rely on wallpaper/complementary inherited colors" +reject_line containments/homescreens/folio/qml/main.qml 'Qt\.rgba\(0, 0, 0, 0\.[36]\)' \ + "Folio mobile overlays must derive scrims from the Shift Window background" +reject_line containments/homescreens/folio/qml/AppDrawerGrid.qml 'Qt\.rgba\(1, 1, 1, 0\.3\)' \ + "Folio app drawer scrollbar must derive from the Shift text color" + [[ -f lookandfeel/contents/splash/Splash.qml ]] || fail "look-and-feel must provide a Shift splash implementation" reject_line lookandfeel/contents/logout/Logout.qml 'plasma_lookandfeel_org\.kde\.lookandfeel' \ "look-and-feel QML must use the Shift translation domain"