Changeset View
Standalone View
applets/systemtray/package/contents/applet/CompactApplet.qml
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright 2011 Marco Martin <mart@kde.org> | 2 | * Copyright 2011 Marco Martin <mart@kde.org> | ||
3 | * Copyright 2019 ivan tkachenko <ratijastk@kde.org> | ||||
3 | * | 4 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU Library General Public License as | 6 | * it under the terms of the GNU Library General Public License as | ||
6 | * published by the Free Software Foundation; either version 2, or | 7 | * published by the Free Software Foundation; either version 2, or | ||
7 | * (at your option) any later version. | 8 | * (at your option) any later version. | ||
8 | * | 9 | * | ||
9 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
Show All 15 Lines | |||||
26 | PlasmaCore.ToolTipArea { | 27 | PlasmaCore.ToolTipArea { | ||
27 | id: appletRoot | 28 | id: appletRoot | ||
28 | objectName: "org.kde.desktop-CompactApplet" | 29 | objectName: "org.kde.desktop-CompactApplet" | ||
29 | anchors.fill: parent | 30 | anchors.fill: parent | ||
30 | 31 | | |||
31 | icon: plasmoid.icon | 32 | icon: plasmoid.icon | ||
32 | mainText: plasmoid.toolTipMainText | 33 | mainText: plasmoid.toolTipMainText | ||
33 | subText: plasmoid.toolTipSubText | 34 | subText: plasmoid.toolTipSubText | ||
34 | location: if (plasmoid.parent && plasmoid.parent.parent.objectName === "hiddenTasksColumn" && plasmoid.location !== PlasmaCore.Types.LeftEdge) { | 35 | | ||
davidedmundson: When you say it did nothing, You'd need to test every hidden applet whilst having the panel on… | |||||
As far as I remember, one of the branches never got executed in my environment. Could you point to specific use case which requires this "almost dead" code? ratijas: As far as I remember, one of the branches never got executed in my environment. Could you point… | |||||
You will enter this branch if the system tray is on the left. It doesn't make a difference now since Dialog gained support to not not overlap panels and to switch edges if it doesn't fit. This puts the location in a "wrong" way we hit the conflict detection in Dialog and it fixes it. davidedmundson: You will enter this branch if the system tray is on the left.
It doesn't make a difference… | |||||
Honestly, I tried putting plasma panel on each of four sides (naturally including left and right), but for some reason I still did not enter the branch. Or maybe it did, but no visual changes were observed. I don't remember. It was not an easy decision to remove someone else's code which I do not understand. Whereas "(a) I do not understand; and (b) I has no visual effect" sounds a little bit more convincing. As far as i get it from your reply, it's now Dialog's unified responsibility (which is fine, I guess) so this lines were redundant already. ratijas: Honestly, I tried putting plasma panel on each of four sides (naturally including left and… | |||||
35 | return PlasmaCore.Types.RightEdge; | | |||
36 | } else { | | |||
37 | return plasmoid.location; | | |||
38 | } | | |||
39 | active: !plasmoid.expanded | 36 | active: !plasmoid.expanded | ||
40 | textFormat: plasmoid.toolTipTextFormat | 37 | textFormat: plasmoid.toolTipTextFormat | ||
41 | mainItem: plasmoid.toolTipItem ? plasmoid.toolTipItem : null | 38 | mainItem: plasmoid.toolTipItem ? plasmoid.toolTipItem : null | ||
42 | 39 | | |||
43 | property Item fullRepresentation | 40 | property Item fullRepresentation | ||
44 | property Item compactRepresentation | 41 | property Item compactRepresentation | ||
45 | 42 | | |||
46 | Connections { | 43 | Connections { | ||
Show All 36 Lines |
When you say it did nothing, You'd need to test every hidden applet whilst having the panel on the left.
See D1253
If it ain't broke...