56 lines
2.2 KiB
Diff
56 lines
2.2 KiB
Diff
From 5b3b84b687a569731a74cc6cfa1284ebb5de169b Mon Sep 17 00:00:00 2001
|
|
From: Bhushan Shah <bhush94@gmail.com>
|
|
Date: Thu, 12 Mar 2015 17:37:58 +0530
|
|
Subject: [PATCH 10/12] Take Shown and Hidden status in account when showing
|
|
sidebar
|
|
|
|
- if clicked on arrow show sidebar
|
|
- if clicked on always hidden applet show sidebar
|
|
- if clicked on always shown applet hide sidebar
|
|
- in case of passive applet show sidebar
|
|
|
|
BUG: 344795
|
|
FIXED-IN: 5.2.2
|
|
---
|
|
.../package/contents/ui/ExpandedRepresentation.qml | 18 ++++++++++++++++--
|
|
1 file changed, 16 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml b/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
|
|
index abbb9701c4b87fb9e0cfc6781eec583a9c99f353..cc01f1ac46bfa781eadb6ee408c6884c0fe918df 100644
|
|
--- a/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
|
|
+++ b/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
|
|
@@ -84,14 +84,28 @@ Item {
|
|
model: host.hiddenTasks
|
|
|
|
delegate: TaskListDelegate {}
|
|
- visible: root.expandedTask == null || root.expandedTask.status == SystemTray.Task.Passive
|
|
+ visible: {
|
|
+ // Normal system tray case; clicked on arrow
|
|
+ if (root.expandedTask == null) {
|
|
+ return true;
|
|
+ // In case applet is hidden; we should show sidebar
|
|
+ } else if (plasmoid.configuration.hiddenItems.indexOf(root.expandedTask.taskId) != -1) {
|
|
+ return true;
|
|
+ // In case applet is shown; we should not show sidebar
|
|
+ } else if (plasmoid.configuration.shownItems.indexOf(root.expandedTask.taskId) != -1) {
|
|
+ return false;
|
|
+ }
|
|
+ // At last verify the passive status of applet
|
|
+ return root.expandedTask.status == SystemTray.Task.Passive;
|
|
+ }
|
|
+
|
|
}
|
|
|
|
PlasmaCore.SvgItem {
|
|
id: separator
|
|
|
|
width: lineSvg.elementSize("vertical-line").width;
|
|
- visible: root.expandedTask != null && root.expandedTask.status == SystemTray.Task.Passive
|
|
+ visible: root.expandedTask != null && hiddenView.visible
|
|
|
|
anchors {
|
|
left: parent.left
|
|
--
|
|
2.3.1
|
|
|