Merge lp:~aacid/unity-2d/unity-2d-shell_behaviours_shuffling into lp:~unity-2d-team/unity-2d/unity-2d-shell

Proposed by Albert Astals Cid
Status: Merged
Approved by: Florian Boucault
Approved revision: 991
Merged at revision: 992
Proposed branch: lp:~aacid/unity-2d/unity-2d-shell_behaviours_shuffling
Merge into: lp:~unity-2d-team/unity-2d/unity-2d-shell
Diff against target: 93 lines (+30/-6)
5 files modified
shell/common/visibilityBehaviors/AlwaysVisibleBehavior.qml (+2/-0)
shell/common/visibilityBehaviors/AutoHideBehavior.qml (+8/-1)
shell/common/visibilityBehaviors/BaseBehavior.qml (+7/-0)
shell/common/visibilityBehaviors/IntelliHideBehavior.qml (+10/-2)
shell/launcher/LauncherLoader.qml (+3/-3)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d-shell_behaviours_shuffling
Reviewer Review Type Date Requested Status
Florian Boucault Pending
Review via email: mp+92065@code.launchpad.net

Description of the change

Documentation on the visibility Behaviors and group them all in the same folder

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'shell/common/visibilityBehaviors'
2=== renamed file 'shell/common/AlwaysVisibleBehavior.qml' => 'shell/common/visibilityBehaviors/AlwaysVisibleBehavior.qml'
3--- shell/common/AlwaysVisibleBehavior.qml 2012-02-08 11:58:01 +0000
4+++ shell/common/visibilityBehaviors/AlwaysVisibleBehavior.qml 2012-02-08 16:39:18 +0000
5@@ -18,6 +18,8 @@
6
7 import QtQuick 1.0
8
9+// shown is always true in this behaviour
10+
11 BaseBehavior {
12 property bool shown: true
13 }
14
15=== renamed file 'shell/launcher/AutoHideBehavior.qml' => 'shell/common/visibilityBehaviors/AutoHideBehavior.qml'
16--- shell/launcher/AutoHideBehavior.qml 2012-02-07 20:19:29 +0000
17+++ shell/common/visibilityBehaviors/AutoHideBehavior.qml 2012-02-08 16:39:18 +0000
18@@ -17,7 +17,14 @@
19 */
20
21 import QtQuick 1.0
22-import "../common"
23+
24+// Shows the target when it has the focus or when you move the
25+// mouse for 500 msec to the edge of the target
26+// Hides the target when none of the above conditions are met
27+// and you have not had the mouse over it during more than 1000 msec
28+// To use this Behavior your target needs to provide two properties
29+// - containsMouse: Defines if the mouse is inside the target
30+// - outerEdgeContainsMouse: Defines if the mouse is in the edge of the target
31
32 BaseBehavior {
33 id: autoHide
34
35=== renamed file 'shell/common/BaseBehavior.qml' => 'shell/common/visibilityBehaviors/BaseBehavior.qml'
36--- shell/common/BaseBehavior.qml 2012-02-08 11:58:01 +0000
37+++ shell/common/visibilityBehaviors/BaseBehavior.qml 2012-02-08 16:39:18 +0000
38@@ -19,8 +19,15 @@
39 import QtQuick 1.0
40
41 Item {
42+ // true if the behaviour wants the target to be shown, false otherwise
43 property bool shown
44+
45+ // The target the behavior will be deciding if has to be shown or not
46 property variant target
47+
48+ // Wheter the target has been shown by an external reason
49 property bool forcedVisible: false
50+
51+ // The id that triggered the last forcedVisible change
52 property variant forcedVisibleChangeId
53 }
54
55=== renamed file 'shell/launcher/IntelliHideBehavior.qml' => 'shell/common/visibilityBehaviors/IntelliHideBehavior.qml'
56--- shell/launcher/IntelliHideBehavior.qml 2012-02-07 20:19:29 +0000
57+++ shell/common/visibilityBehaviors/IntelliHideBehavior.qml 2012-02-08 16:39:18 +0000
58@@ -18,8 +18,16 @@
59
60 import QtQuick 1.0
61 import Unity2d 1.0
62-import "../common"
63-import "../common/utils.js" as Utils
64+import "../utils.js" as Utils
65+
66+// Shows the target when it has the focus or when you move the
67+// mouse for 500 msec to the edge of the target or there are no
68+// windows that intersect with the target
69+// Hides the target when none of the above conditions are met
70+// and you have not had the mouse over it during more than 1000 msec
71+// To use this Behavior your target needs to provide two properties
72+// - containsMouse: Defines if the mouse is inside the target
73+// - outerEdgeContainsMouse: Defines if the mouse is in the edge of the target
74
75 BaseBehavior {
76 id: intellihide
77
78=== modified file 'shell/launcher/LauncherLoader.qml'
79--- shell/launcher/LauncherLoader.qml 2012-02-07 20:19:29 +0000
80+++ shell/launcher/LauncherLoader.qml 2012-02-08 16:39:18 +0000
81@@ -36,9 +36,9 @@
82 Loader {
83 id: launcherBehavior
84
85- property variant modesMap: { 0: '../common/AlwaysVisibleBehavior.qml',
86- 1: 'AutoHideBehavior.qml',
87- 2: 'IntelliHideBehavior.qml' }
88+ property variant modesMap: { 0: '../common/visibilityBehaviors/AlwaysVisibleBehavior.qml',
89+ 1: '../common/visibilityBehaviors/AutoHideBehavior.qml',
90+ 2: '../common/visibilityBehaviors/IntelliHideBehavior.qml' }
91
92 source: modesMap[Utils.clamp(launcher2dConfiguration.hideMode, 0, 2)]
93 }

Subscribers

People subscribed via source and target branches