diff --git a/components/mobileshell/qml/components/StartupFeedbackPanelFill.qml b/components/mobileshell/qml/components/StartupFeedbackPanelFill.qml index ae39ad8f..26e6866a 100644 --- a/components/mobileshell/qml/components/StartupFeedbackPanelFill.qml +++ b/components/mobileshell/qml/components/StartupFeedbackPanelFill.qml @@ -14,6 +14,8 @@ Rectangle { property int screen property var maximizedTracker + readonly property bool isShowing: height > 0 + // Smooth animation for colored rectangle NumberAnimation on height { id: heightAnim @@ -29,6 +31,7 @@ Rectangle { function onShowingWindowChanged() { root.color = 'transparent'; + root.height = 0; } } diff --git a/containments/panel/qml/StatusBarWrapper.qml b/containments/panel/qml/StatusBarWrapper.qml index f32f71f2..4488f55f 100644 --- a/containments/panel/qml/StatusBarWrapper.qml +++ b/containments/panel/qml/StatusBarWrapper.qml @@ -21,11 +21,13 @@ Item { // Whether the background should be transparent, with content using a complementary theme on top. required property bool transparentBackground + // Whether the content should be forced to be white with a drop shadow + required property bool forcedComplementary + // Request the panel itself to reapply settings (ex. for updating touch area). signal updatePanelPropertiesRequested() - - Kirigami.Theme.colorSet: transparentBackground ? Kirigami.Theme.Complementary : Kirigami.Theme.Header + Kirigami.Theme.colorSet: forcedComplementary ? Kirigami.Theme.Complementary : Kirigami.Theme.Header Kirigami.Theme.inherit: false property real offset: 0 @@ -37,7 +39,7 @@ Item { showSecondRow: false showTime: !MobileShellState.LockscreenDBusClient.lockscreenActive // Don't show time on the lockscreen, since we already have a massive clock - showDropShadow: root.transparentBackground + showDropShadow: root.forcedComplementary backgroundColor: root.transparentBackground ? "transparent" : Kirigami.Theme.backgroundColor transform: [ diff --git a/containments/panel/qml/StatusPanel.qml b/containments/panel/qml/StatusPanel.qml index 42a250c6..b1565e67 100644 --- a/containments/panel/qml/StatusPanel.qml +++ b/containments/panel/qml/StatusPanel.qml @@ -77,6 +77,14 @@ Item { return !containmentItem.showingApp && !containmentItem.fullscreen; } + forcedComplementary: { + if (MobileShellState.LockscreenDBusClient.lockscreenActive) { + return true; + } + + // Force complementary colors (white) unless the startup feedback is showing + return transparentBackground && !startupFeedbackColorAnimation.isShowing + } state: { // If we are on the lockscreen, always show the status panel. diff --git a/containments/taskpanel/qml/NavigationPanelComponent.qml b/containments/taskpanel/qml/NavigationPanelComponent.qml index 2dd16f3e..76346045 100644 --- a/containments/taskpanel/qml/NavigationPanelComponent.qml +++ b/containments/taskpanel/qml/NavigationPanelComponent.qml @@ -20,15 +20,20 @@ import org.kde.kirigami as Kirigami MobileShell.NavigationPanel { id: root + + // Whether the bar background should be opaque required property bool opaqueBar + // Whether the content should be forced to be white + required property bool forcedComplementary + // background is: // - opaque if an app is shown or vkbd is shown // - translucent if the task switcher is open // - transparent if on the homescreen backgroundColor: opaqueBar ? Kirigami.Theme.backgroundColor : "transparent" - foregroundColorGroup: opaqueBar ? Kirigami.Theme.Window : Kirigami.Theme.Complementary - shadow: !opaqueBar + foregroundColorGroup: forcedComplementary ? Kirigami.Theme.Complementary : Kirigami.Theme.Window + shadow: forcedComplementary MobileShellState.PanelSettingsDBusClient { id: panelSettings diff --git a/containments/taskpanel/qml/main.qml b/containments/taskpanel/qml/main.qml index ecaa9115..43a7c555 100644 --- a/containments/taskpanel/qml/main.qml +++ b/containments/taskpanel/qml/main.qml @@ -180,8 +180,10 @@ ContainmentItem { // load appropriate system navigation component NavigationPanelComponent { anchors.fill: parent - opaqueBar: root.opaqueBar + isVertical: root.inLandscape + opaqueBar: root.opaqueBar + forcedComplementary: !opaqueBar && !startupFeedbackColorAnimation.isShowing transform: [ Translate {