mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 00:47:22 +00:00
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:
parent
08264e5759
commit
9a3db42f74
8 changed files with 42 additions and 13 deletions
|
|
@ -17,6 +17,8 @@ import 'private'
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
required property Folio.HomeScreen folio
|
required property Folio.HomeScreen folio
|
||||||
|
Kirigami.Theme.inherit: false
|
||||||
|
Kirigami.Theme.colorSet: Kirigami.Theme.Window
|
||||||
|
|
||||||
property var homeScreen
|
property var homeScreen
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ MobileShell.GridView {
|
||||||
|
|
||||||
contentItem: Rectangle {
|
contentItem: Rectangle {
|
||||||
radius: width / 2
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,8 @@ Item {
|
||||||
id: root
|
id: root
|
||||||
property Folio.HomeScreen folio
|
property Folio.HomeScreen folio
|
||||||
|
|
||||||
// Do not override the colorset: in mobile mode we inherit Complementary
|
// The AppDrawer owns a Window colorset so mobile and convergence use the
|
||||||
// from the containment (wallpaper context, white text); in convergence mode
|
// same Shift theme roles.
|
||||||
// the drawerOverlay Window gives us Window context (system-adaptive).
|
|
||||||
|
|
||||||
function addSearchText(text: string) {
|
function addSearchText(text: string) {
|
||||||
searchField.text += text;
|
searchField.text += text;
|
||||||
|
|
|
||||||
|
|
@ -571,9 +571,7 @@ MouseArea {
|
||||||
Keys.onReturnPressed: root.folio.triggerOverview()
|
Keys.onReturnPressed: root.folio.triggerOverview()
|
||||||
Keys.onEnterPressed: root.folio.triggerOverview()
|
Keys.onEnterPressed: root.folio.triggerOverview()
|
||||||
Keys.onSpacePressed: root.folio.triggerOverview()
|
Keys.onSpacePressed: root.folio.triggerOverview()
|
||||||
Keys.onLeftPressed: {
|
Keys.onLeftPressed: searchButton.forceActiveFocus()
|
||||||
searchButton.forceActiveFocus()
|
|
||||||
}
|
|
||||||
|
|
||||||
KeyboardHighlight {
|
KeyboardHighlight {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -632,7 +630,7 @@ MouseArea {
|
||||||
Keys.onReturnPressed: root.folio.HomeScreenState.openSearchWidget()
|
Keys.onReturnPressed: root.folio.HomeScreenState.openSearchWidget()
|
||||||
Keys.onEnterPressed: root.folio.HomeScreenState.openSearchWidget()
|
Keys.onEnterPressed: root.folio.HomeScreenState.openSearchWidget()
|
||||||
Keys.onSpacePressed: root.folio.HomeScreenState.openSearchWidget()
|
Keys.onSpacePressed: root.folio.HomeScreenState.openSearchWidget()
|
||||||
Keys.onLeftPressed: root.focusBeforeSearch()
|
Keys.onLeftPressed: trashButton.forceActiveFocus()
|
||||||
Keys.onRightPressed: overviewButton.forceActiveFocus()
|
Keys.onRightPressed: overviewButton.forceActiveFocus()
|
||||||
|
|
||||||
KeyboardHighlight {
|
KeyboardHighlight {
|
||||||
|
|
@ -884,6 +882,8 @@ MouseArea {
|
||||||
Keys.onReturnPressed: Qt.openUrlExternally("trash:/")
|
Keys.onReturnPressed: Qt.openUrlExternally("trash:/")
|
||||||
Keys.onEnterPressed: Qt.openUrlExternally("trash:/")
|
Keys.onEnterPressed: Qt.openUrlExternally("trash:/")
|
||||||
Keys.onSpacePressed: Qt.openUrlExternally("trash:/")
|
Keys.onSpacePressed: Qt.openUrlExternally("trash:/")
|
||||||
|
Keys.onLeftPressed: root.focusBeforeSearch()
|
||||||
|
Keys.onRightPressed: searchButton.forceActiveFocus()
|
||||||
|
|
||||||
KeyboardHighlight {
|
KeyboardHighlight {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ Item {
|
||||||
property real rightMargin: 0
|
property real rightMargin: 0
|
||||||
|
|
||||||
property bool interactive: true
|
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
|
// non-widget drop animation
|
||||||
readonly property bool dropAnimationRunning: delegateDragItem.dropAnimationRunning || widgetDragItem.dropAnimationRunning
|
readonly property bool dropAnimationRunning: delegateDragItem.dropAnimationRunning || widgetDragItem.dropAnimationRunning
|
||||||
|
|
@ -363,7 +362,9 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: favouritesBarScrim
|
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)
|
Component.onCompleted: maskManager.assignToMask(this)
|
||||||
|
|
||||||
|
|
@ -389,6 +390,8 @@ Item {
|
||||||
folio: root.folio
|
folio: root.folio
|
||||||
maskManager: root.maskManager
|
maskManager: root.maskManager
|
||||||
homeScreen: root
|
homeScreen: root
|
||||||
|
Kirigami.Theme.inherit: false
|
||||||
|
Kirigami.Theme.colorSet: Kirigami.Theme.Window
|
||||||
|
|
||||||
// don't show in settings mode
|
// don't show in settings mode
|
||||||
opacity: 1 - folio.HomeScreenState.settingsOpenProgress
|
opacity: 1 - folio.HomeScreenState.settingsOpenProgress
|
||||||
|
|
|
||||||
|
|
@ -246,10 +246,12 @@ ContainmentItem {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: appDrawerBackground
|
id: appDrawerBackground
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
Kirigami.Theme.inherit: false
|
||||||
|
Kirigami.Theme.colorSet: Kirigami.Theme.Window
|
||||||
// Convergence: no scrim (popup has own background); mobile: dark scrim
|
// Convergence: no scrim (popup has own background); mobile: dark scrim
|
||||||
color: ShellSettings.Settings.convergenceModeEnabled
|
color: ShellSettings.Settings.convergenceModeEnabled
|
||||||
? "transparent"
|
? "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
|
opacity: folio.HomeScreenState.appDrawerOpenProgress
|
||||||
}
|
}
|
||||||
|
|
@ -257,7 +259,9 @@ ContainmentItem {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: searchWidgetBackground
|
id: searchWidgetBackground
|
||||||
anchors.fill: parent
|
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
|
opacity: folio.HomeScreenState.searchWidgetOpenProgress
|
||||||
}
|
}
|
||||||
|
|
@ -265,7 +269,9 @@ ContainmentItem {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: settingsViewBackground
|
id: settingsViewBackground
|
||||||
anchors.fill: parent
|
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
|
opacity: folio.HomeScreenState.settingsOpenProgress
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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" "Accessible.name: root.pagerDesktopName(leftDesktopBtn.index)"
|
||||||
require_line "$favourites_bar" "Keys.onRightPressed: {"
|
require_line "$favourites_bar" "Keys.onRightPressed: {"
|
||||||
require_line "$favourites_bar" "root.focusAfterPager()"
|
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
|
if grep -Fq "Math.ceil(virtualDesktopInfo.numberOfDesktops / 2)" "$favourites_bar"; then
|
||||||
echo "Desktop pager must not split virtual desktops between dock edges" >&2
|
echo "Desktop pager must not split virtual desktops between dock edges" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
|
|
@ -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' \
|
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"
|
"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"
|
[[ -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' \
|
reject_line lookandfeel/contents/logout/Logout.qml 'plasma_lookandfeel_org\.kde\.lookandfeel' \
|
||||||
"look-and-feel QML must use the Shift translation domain"
|
"look-and-feel QML must use the Shift translation domain"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue