panels: Use standard foreground colors when startup feedback is open

The startup feedback uses theme adjusted colors, we can use standard
foreground colors for the panels for better contrast rather than relying
on the shadow.
This commit is contained in:
Devin Lin 2025-12-04 23:01:40 -05:00
parent 088c0d985b
commit e480114d53
5 changed files with 26 additions and 6 deletions

View file

@ -14,6 +14,8 @@ Rectangle {
property int screen property int screen
property var maximizedTracker property var maximizedTracker
readonly property bool isShowing: height > 0
// Smooth animation for colored rectangle // Smooth animation for colored rectangle
NumberAnimation on height { NumberAnimation on height {
id: heightAnim id: heightAnim
@ -29,6 +31,7 @@ Rectangle {
function onShowingWindowChanged() { function onShowingWindowChanged() {
root.color = 'transparent'; root.color = 'transparent';
root.height = 0;
} }
} }

View file

@ -21,11 +21,13 @@ Item {
// Whether the background should be transparent, with content using a complementary theme on top. // Whether the background should be transparent, with content using a complementary theme on top.
required property bool transparentBackground 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). // Request the panel itself to reapply settings (ex. for updating touch area).
signal updatePanelPropertiesRequested() signal updatePanelPropertiesRequested()
Kirigami.Theme.colorSet: forcedComplementary ? Kirigami.Theme.Complementary : Kirigami.Theme.Header
Kirigami.Theme.colorSet: transparentBackground ? Kirigami.Theme.Complementary : Kirigami.Theme.Header
Kirigami.Theme.inherit: false Kirigami.Theme.inherit: false
property real offset: 0 property real offset: 0
@ -37,7 +39,7 @@ Item {
showSecondRow: false showSecondRow: false
showTime: !MobileShellState.LockscreenDBusClient.lockscreenActive // Don't show time on the lockscreen, since we already have a massive clock 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 backgroundColor: root.transparentBackground ? "transparent" : Kirigami.Theme.backgroundColor
transform: [ transform: [

View file

@ -77,6 +77,14 @@ Item {
return !containmentItem.showingApp && !containmentItem.fullscreen; 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: { state: {
// If we are on the lockscreen, always show the status panel. // If we are on the lockscreen, always show the status panel.

View file

@ -20,15 +20,20 @@ import org.kde.kirigami as Kirigami
MobileShell.NavigationPanel { MobileShell.NavigationPanel {
id: root id: root
// Whether the bar background should be opaque
required property bool opaqueBar required property bool opaqueBar
// Whether the content should be forced to be white
required property bool forcedComplementary
// background is: // background is:
// - opaque if an app is shown or vkbd is shown // - opaque if an app is shown or vkbd is shown
// - translucent if the task switcher is open // - translucent if the task switcher is open
// - transparent if on the homescreen // - transparent if on the homescreen
backgroundColor: opaqueBar ? Kirigami.Theme.backgroundColor : "transparent" backgroundColor: opaqueBar ? Kirigami.Theme.backgroundColor : "transparent"
foregroundColorGroup: opaqueBar ? Kirigami.Theme.Window : Kirigami.Theme.Complementary foregroundColorGroup: forcedComplementary ? Kirigami.Theme.Complementary : Kirigami.Theme.Window
shadow: !opaqueBar shadow: forcedComplementary
MobileShellState.PanelSettingsDBusClient { MobileShellState.PanelSettingsDBusClient {
id: panelSettings id: panelSettings

View file

@ -180,8 +180,10 @@ ContainmentItem {
// load appropriate system navigation component // load appropriate system navigation component
NavigationPanelComponent { NavigationPanelComponent {
anchors.fill: parent anchors.fill: parent
opaqueBar: root.opaqueBar
isVertical: root.inLandscape isVertical: root.inLandscape
opaqueBar: root.opaqueBar
forcedComplementary: !opaqueBar && !startupFeedbackColorAnimation.isShowing
transform: [ transform: [
Translate { Translate {