Align Folio surfaces with Shift theme

Use Window color roles for app drawer and overlay scrims, and update\ndock keyboard navigation focus paths. Extend folio and convergence\nregression checks to lock in the new theme and navigation behavior.
This commit is contained in:
Marco Allegretti 2026-05-31 14:06:15 +02:00
parent 08264e5759
commit 9a3db42f74
8 changed files with 42 additions and 13 deletions

View file

@ -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

View file

@ -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)
}
}
}

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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
}

View file

@ -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

View file

@ -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"