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

View file

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

View file

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

View file

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

View file

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