From 0c3b152f99dc29b611aac8d959d859762553b8c1 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 30 Jul 2020 12:39:13 +0200 Subject: [PATCH] color panel when startupfeedback is used --- .../panel/package/contents/ui/main.qml | 7 +++--- .../taskpanel/package/contents/ui/main.qml | 24 ++++--------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/containments/panel/package/contents/ui/main.qml b/containments/panel/package/contents/ui/main.qml index c3ad4e0f..c124f4c0 100644 --- a/containments/panel/package/contents/ui/main.qml +++ b/containments/panel/package/contents/ui/main.qml @@ -49,7 +49,8 @@ Item { property bool reorderingApps: false property var layoutManager: LayoutManager - readonly property bool showingApp: !MobileShell.HomeScreenControls.homeScreenVisible//!plasmoid.nativeInterface.showDesktop && (hasTasks || NanoShell.StartupFeedback.visible) + readonly property color backgroundColor: NanoShell.StartupFeedback.visible ? NanoShell.StartupFeedback.backgroundColor : icons.backgroundColor + readonly property bool showingApp: !MobileShell.HomeScreenControls.homeScreenVisible readonly property bool hasTasks: tasksModel.count > 0 @@ -178,11 +179,11 @@ Item { gradient: Gradient { GradientStop { position: 1.0 - color: showingApp ? icons.backgroundColor : "transparent" + color: showingApp ? root.backgroundColor : "transparent" } GradientStop { position: 0.0 - color: showingApp ? icons.backgroundColor : Qt.rgba(0, 0, 0, 0.1) + color: showingApp ? root.backgroundColor : Qt.rgba(0, 0, 0, 0.1) } } } diff --git a/containments/taskpanel/package/contents/ui/main.qml b/containments/taskpanel/package/contents/ui/main.qml index bdd035fc..4fbcc396 100644 --- a/containments/taskpanel/package/contents/ui/main.qml +++ b/containments/taskpanel/package/contents/ui/main.qml @@ -39,7 +39,8 @@ PlasmaCore.ColorScope { Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground - readonly property bool showingApp: !plasmoid.nativeInterface.allMinimized// !plasmoid.nativeInterface.showDesktop && (hasTasks || NanoShell.StartupFeedback.visible) + readonly property color backgroundColor: NanoShell.StartupFeedback.visible ? NanoShell.StartupFeedback.backgroundColor : PlasmaCore.ColorScope.backgroundColor + readonly property bool showingApp: !plasmoid.nativeInterface.allMinimized readonly property bool hasTasks: tasksModel.count > 0 @@ -167,32 +168,17 @@ PlasmaCore.ColorScope { anchors.fill: parent visible: plasmoid.configuration.PanelButtonsVisible -/* - Rectangle { - anchors.fill: parent - color: root.backgroundColor - opacity: showingApp ? 1 : 0 - Rectangle { - anchors { - left: parent.left - right: parent.right - top: parent.top - } - height: 1 - color: PlasmaCore.ColorScope.textColor - opacity: 0.2 - } - }*/ + Rectangle { anchors.fill: parent gradient: Gradient { GradientStop { position: 0 - color: showingApp ? PlasmaCore.ColorScope.backgroundColor : "transparent" + color: showingApp ? root.backgroundColor : "transparent" } GradientStop { position: 1 - color: showingApp ? PlasmaCore.ColorScope.backgroundColor : Qt.rgba(0, 0, 0, 0.05) + color: showingApp ? root.backgroundColor : Qt.rgba(0, 0, 0, 0.1) } } }