Merge lp:~nick-dedekind/unity8/indicators.overflow into lp:unity8
- indicators.overflow
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Mirco Müller | ||||
Approved revision: | 335 | ||||
Merged at revision: | 415 | ||||
Proposed branch: | lp:~nick-dedekind/unity8/indicators.overflow | ||||
Merge into: | lp:unity8 | ||||
Diff against target: |
202 lines (+65/-23) 4 files modified
Panel/IndicatorRow.qml (+52/-13) Panel/Indicators.qml (+2/-0) Panel/Panel.qml (+2/-2) Panel/SearchIndicator.qml (+9/-8) |
||||
To merge this branch: | bzr merge lp:~nick-dedekind/unity8/indicators.overflow | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mirco Müller (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Michał Sawicz | Needs Information | ||
Review via email: mp+186395@code.launchpad.net |
Commit message
Make sure overflow indicators are hidden and not the search label.
https:/
Description of the change
Make sure overflow indicators are hidden and not the search label
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:331
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:331
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:331
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Nick Dedekind (nick-dedekind) wrote : | # |
> Hmm, that just overlays the background on top of the overflow indicators,
> IIUC?
>
> There was actually an interesting (better?) solution for that earlier - the
> overflow indicators would only show (slide down from the top) when you started
> a top-drag gesture - we should probably try and find out what's the target
> behaviour here.
Design decided on opacity change. However, I change the mech to be a per item opacity change rather than a black overlay.
Nick Dedekind (nick-dedekind) wrote : | # |
Added a showAll animation when adding a new indicator becomes visible. Requested by design.
- 334. By Nick Dedekind
-
set showAll animation when setting a indicator item to visible
- 335. By Nick Dedekind
-
Fixed typo
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:333
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:335
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Mirco Müller (macslow) wrote : | # |
While the code look ok, I can't seem to trigger any overflow on the device. Is there a way to swamp the panel with indicators to see this actually in action?
Michał Sawicz (saviq) wrote : | # |
On 08.10.2013 18:47, Mirco Müller wrote:
> While the code look ok, I can't seem to trigger any overflow on the device. Is there a way to swamp the panel with indicators to see this actually in action?
Easiest is to resize the window on your desktop.
--
Michał (Saviq) Sawicz <email address hidden>
Canonical Services Ltd.
Mirco Müller (macslow) wrote : | # |
Ok, resizing the shell-window on the desktop works for triggering the new behaviour. Get's the green light from me then.
Preview Diff
1 | === modified file 'Panel/IndicatorRow.qml' |
2 | --- Panel/IndicatorRow.qml 2013-09-02 07:39:53 +0000 |
3 | +++ Panel/IndicatorRow.qml 2013-10-07 10:21:34 +0000 |
4 | @@ -27,6 +27,8 @@ |
5 | property alias row: row |
6 | property QtObject indicatorsModel: null |
7 | property var visibleIndicators: defined |
8 | + property int overFlowWidth: width |
9 | + property bool showAll: false |
10 | |
11 | width: units.gu(40) |
12 | height: units.gu(3) |
13 | @@ -42,6 +44,15 @@ |
14 | } |
15 | } |
16 | |
17 | + Timer { |
18 | + id: allVisible |
19 | + interval: 1000 |
20 | + |
21 | + onTriggered: { |
22 | + showAll = false; |
23 | + } |
24 | + } |
25 | + |
26 | Row { |
27 | id: row |
28 | |
29 | @@ -54,16 +65,31 @@ |
30 | objectName: "rowRepeater" |
31 | model: indicatorsModel ? indicatorsModel : undefined |
32 | |
33 | + property int lastCount: 0 |
34 | + onCountChanged: { |
35 | + if (lastCount < count) { |
36 | + showAll = true; |
37 | + allVisible.start(); |
38 | + } |
39 | + lastCount = count; |
40 | + } |
41 | + |
42 | Item { |
43 | id: itemWrapper |
44 | height: indicatorRow.height |
45 | width: indicatorItem.width |
46 | visible: indicatorItem.indicatorVisible |
47 | + opacity: 1.0 |
48 | + y: 0 |
49 | + state: "standard" |
50 | |
51 | property int ownIndex: index |
52 | property alias highlighted: indicatorItem.highlighted |
53 | property alias dimmed: indicatorItem.dimmed |
54 | |
55 | + property bool hidden: !showAll && !indicatorItem.highlighted && (indicatorRow.state == "locked" || indicatorRow.state == "commit") |
56 | + property bool overflow: row.width - itemWrapper.x > overFlowWidth |
57 | + |
58 | IndicatorItem { |
59 | id: indicatorItem |
60 | height: parent.height |
61 | @@ -87,22 +113,35 @@ |
62 | } |
63 | indicatorRow.visibleIndicators[model.identifier] = indicatorVisible; |
64 | indicatorRow.visibleIndicatorsChanged(); |
65 | + |
66 | + if (indicatorVisible) { |
67 | + showAll = true; |
68 | + allVisible.start(); |
69 | + } |
70 | } |
71 | } |
72 | |
73 | - opacity: { |
74 | - if (!indicatorItem.highlighted && (indicatorRow.state == "locked" || indicatorRow.state == "commit")) { |
75 | - return 0.0; |
76 | - } else { |
77 | - return 1.0; |
78 | - } |
79 | - } |
80 | - Behavior on opacity { |
81 | - StandardAnimation { |
82 | - // flow away from current index |
83 | - duration: (rowRepeater.count - Math.abs(indicatorRow.currentItemIndex - index)) * (500/rowRepeater.count) |
84 | - } |
85 | - } |
86 | + states: [ |
87 | + State { |
88 | + name: "standard" |
89 | + when: !hidden && !overflow |
90 | + }, |
91 | + State { |
92 | + name: "overflow" |
93 | + when: hidden || overflow |
94 | + PropertyChanges { target: itemWrapper; opacity: 0.0 } |
95 | + } |
96 | + ] |
97 | + |
98 | + transitions: [ |
99 | + Transition { |
100 | + StandardAnimation { |
101 | + target: itemWrapper |
102 | + property: "opacity" |
103 | + duration: 300 |
104 | + } |
105 | + } |
106 | + ] |
107 | } |
108 | } |
109 | } |
110 | |
111 | === modified file 'Panel/Indicators.qml' |
112 | --- Panel/Indicators.qml 2013-10-03 09:20:33 +0000 |
113 | +++ Panel/Indicators.qml 2013-10-07 10:21:34 +0000 |
114 | @@ -29,6 +29,8 @@ |
115 | property real openedHeight: units.gu(71) |
116 | property int panelHeight: units.gu(3) |
117 | property bool pinnedMode: true //should be set true if indicators menu can cover whole screen |
118 | + property alias overFlowWidth: indicatorRow.overFlowWidth |
119 | + property alias showAll: indicatorRow.showAll |
120 | |
121 | property int hintValue |
122 | readonly property int lockThreshold: openedHeight / 2 |
123 | |
124 | === modified file 'Panel/Panel.qml' |
125 | --- Panel/Panel.qml 2013-07-25 09:33:46 +0000 |
126 | +++ Panel/Panel.qml 2013-10-07 10:21:34 +0000 |
127 | @@ -82,6 +82,7 @@ |
128 | panelHeight: __panelMinusSeparatorLineHeight |
129 | openedHeight: parent.height + (pinnedMode ? 0 : root.panelHeight) |
130 | pinnedMode: !fullscreenMode |
131 | + overFlowWidth: search.state=="hidden" ? parent.width : parent.width - search.width |
132 | |
133 | property real unitProgress: (height - panelHeight) / (openedHeight - panelHeight) |
134 | } |
135 | @@ -120,14 +121,13 @@ |
136 | return "hidden"; |
137 | } |
138 | } |
139 | - if (root.searchVisible) { |
140 | + if (root.searchVisible && !indicatorsMenu.showAll) { |
141 | return "visible"; |
142 | } |
143 | |
144 | return "hidden"; |
145 | } |
146 | |
147 | - width: units.gu(13) |
148 | height: __panelMinusSeparatorLineHeight |
149 | anchors { |
150 | top: panelBackground.top |
151 | |
152 | === modified file 'Panel/SearchIndicator.qml' |
153 | --- Panel/SearchIndicator.qml 2013-07-17 15:07:34 +0000 |
154 | +++ Panel/SearchIndicator.qml 2013-10-07 10:21:34 +0000 |
155 | @@ -21,7 +21,7 @@ |
156 | Item { |
157 | id: search |
158 | |
159 | - width: units.gu(9) |
160 | + width: container.width + units.gu(2) |
161 | height: units.gu(3) |
162 | |
163 | property string headerText: i18n.tr("Search") |
164 | @@ -34,21 +34,24 @@ |
165 | onClicked: search.clicked() |
166 | } |
167 | |
168 | - Item { |
169 | + Row { |
170 | id: container |
171 | objectName: "container" |
172 | |
173 | - width: parent.width |
174 | height: parent.height |
175 | + width: childrenRect.width |
176 | + anchors { |
177 | + left: parent.left |
178 | + leftMargin: units.gu(1) |
179 | + } |
180 | + spacing: units.gu(1) |
181 | |
182 | - Behavior on opacity { StandardAnimation {} } |
183 | + Behavior on opacity { StandardAnimation { duration: 300 } } |
184 | |
185 | Image { |
186 | id: icon |
187 | source: "graphics/search.png" |
188 | anchors.verticalCenter: parent.verticalCenter |
189 | - anchors.left: parent.left |
190 | - anchors.leftMargin: units.gu(1) |
191 | } |
192 | |
193 | Label { |
194 | @@ -56,8 +59,6 @@ |
195 | color: Qt.rgba(0.8, 0.8, 0.8, 1.0) |
196 | fontSize: "small" |
197 | font.capitalization: Font.AllUppercase |
198 | - anchors.left: icon.right |
199 | - anchors.leftMargin: units.gu(1) |
200 | anchors.verticalCenter: parent.verticalCenter |
201 | } |
202 | } |
Hmm, that just overlays the background on top of the overflow indicators, IIUC?
There was actually an interesting (better?) solution for that earlier - the overflow indicators would only show (slide down from the top) when you started a top-drag gesture - we should probably try and find out what's the target behaviour here.