Merge lp:~phablet-team/ubuntu-ui-toolkit/ubuntu-ui-toolkit-progressbar-label into lp:ubuntu-ui-toolkit/staging
- ubuntu-ui-toolkit-progressbar-label
- Merge into staging
Status: | Merged |
---|---|
Approved by: | Cris Dywan |
Approved revision: | 1055 |
Merged at revision: | 1144 |
Proposed branch: | lp:~phablet-team/ubuntu-ui-toolkit/ubuntu-ui-toolkit-progressbar-label |
Merge into: | lp:ubuntu-ui-toolkit/staging |
Prerequisite: | lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/notIn |
Diff against target: |
230 lines (+103/-5) 9 files modified
components.api (+3/-0) debian/control (+1/-0) examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml (+22/-1) modules/Ubuntu/Components/ProgressBar11.qdoc (+6/-0) modules/Ubuntu/Components/ProgressBar11.qml (+21/-0) modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml (+3/-1) modules/Ubuntu/Components/qmldir (+3/-2) tests/unit/tst_components/tst_progressbar.qml (+6/-1) tests/unit/tst_components/tst_progressbar11.qml (+38/-0) |
To merge this branch: | bzr merge lp:~phablet-team/ubuntu-ui-toolkit/ubuntu-ui-toolkit-progressbar-label |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Zsombor Egri | Approve | ||
Review via email: mp+224427@code.launchpad.net |
This proposal supersedes a proposal from 2014-06-17.
Commit message
Add a boolean property to allow hiding the ProgressBar label
Description of the change
Add a boolean property to allow hiding the ProgressBar label
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal | # |
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal | # |
Also, remove the \preliminary tag from the property declaration.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1032
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal | # |
See comments inline
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1033
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1034
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal | # |
Please update components.api as well!
Also, please submit the MR agains staging, not trunk.
Anything else looks fine. Thanks!
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal | # |
Almost forgot! Unit tests, please :)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1035
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:1038
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1039
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1043
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Cris Dywan (kalikiana) wrote : Posted in a previous version of this proposal | # |
FAIL! : components:
Loc: [/tmp/buildd/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1045
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
147 + function test_showProgre
typo: should be "test_showProgr
Cris Dywan (kalikiana) wrote : | # |
FAIL! : components:
Loc: [/tmp/buildd/
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1047
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Zsombor Egri (zsombi) wrote : | # |
See inline comments.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1048
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1049
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1050
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1051
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1052
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1053
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1055
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Zsombor Egri (zsombi) wrote : | # |
Looks good now, thanks!
Zsombor Egri (zsombi) wrote : | # |
Looks good now, thanks!
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Cris Dywan (kalikiana) wrote : | # |
NoSuchProcess: no process found with pid 3788
See bug 1329141
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'components.api' |
2 | --- components.api 2014-07-03 13:59:52 +0000 |
3 | +++ components.api 2014-07-10 07:36:58 +0000 |
4 | @@ -397,6 +397,9 @@ |
5 | property real minimumValue |
6 | property real maximumValue |
7 | property real value |
8 | +ProgressBar 1.1 |
9 | +ProgressBar |
10 | + property bool showProgressPercentage |
11 | PullToRefresh 1.1 |
12 | StyledItem |
13 | readonly property bool releaseToRefresh |
14 | |
15 | === modified file 'debian/control' |
16 | --- debian/control 2014-07-10 03:24:15 +0000 |
17 | +++ debian/control 2014-07-10 07:36:58 +0000 |
18 | @@ -39,6 +39,7 @@ |
19 | xvfb, |
20 | libgl1-mesa-dri, |
21 | locales, |
22 | + suru-icon-theme, |
23 | Standards-Version: 3.9.4 |
24 | Homepage: https://launchpad.net/ubuntu-ui-toolkit |
25 | # If you aren't a member of ~ubuntu-sdk-team but need to upload packaging |
26 | |
27 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml' |
28 | --- examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml 2014-04-23 09:39:11 +0000 |
29 | +++ examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml 2014-07-10 07:36:58 +0000 |
30 | @@ -15,7 +15,7 @@ |
31 | */ |
32 | |
33 | import QtQuick 2.0 |
34 | -import Ubuntu.Components 0.1 |
35 | +import Ubuntu.Components 1.1 |
36 | |
37 | Template { |
38 | objectName: "progressBarsTemplate" |
39 | @@ -53,6 +53,27 @@ |
40 | indeterminate: true |
41 | } |
42 | } |
43 | + |
44 | + TemplateRow { |
45 | + title: i18n.tr("No label") |
46 | + |
47 | + ProgressBar { |
48 | + id: progressNoLabel |
49 | + objectName: "progressbar_nolabel" |
50 | + width: parent.width |
51 | + showProgressPercentage: false |
52 | + |
53 | + SequentialAnimation on value { |
54 | + loops: Animation.Infinite |
55 | + NumberAnimation { |
56 | + from: progress.minimumValue |
57 | + to: progress.maximumValue |
58 | + duration: 2000 |
59 | + } |
60 | + PauseAnimation {duration: 1000} |
61 | + } |
62 | + } |
63 | + } |
64 | } |
65 | |
66 | TemplateSection { |
67 | |
68 | === renamed file 'modules/Ubuntu/Components/ProgressBar.qml' => 'modules/Ubuntu/Components/ProgressBar10.qml' |
69 | === added file 'modules/Ubuntu/Components/ProgressBar11.qdoc' |
70 | --- modules/Ubuntu/Components/ProgressBar11.qdoc 1970-01-01 00:00:00 +0000 |
71 | +++ modules/Ubuntu/Components/ProgressBar11.qdoc 2014-07-10 07:36:58 +0000 |
72 | @@ -0,0 +1,6 @@ |
73 | +/*! |
74 | +\qmlproperty bool ProgressBar::showProgressPercentage |
75 | +\since Ubuntu.Components 1.1 |
76 | + |
77 | +Specifies if the value of the progress is visible |
78 | +*/ |
79 | |
80 | === added file 'modules/Ubuntu/Components/ProgressBar11.qml' |
81 | --- modules/Ubuntu/Components/ProgressBar11.qml 1970-01-01 00:00:00 +0000 |
82 | +++ modules/Ubuntu/Components/ProgressBar11.qml 2014-07-10 07:36:58 +0000 |
83 | @@ -0,0 +1,21 @@ |
84 | +/* |
85 | + * Copyright 2014 Canonical Ltd. |
86 | + * |
87 | + * This program is free software; you can redistribute it and/or modify |
88 | + * it under the terms of the GNU Lesser General Public License as published by |
89 | + * the Free Software Foundation; version 3. |
90 | + * |
91 | + * This program is distributed in the hope that it will be useful, |
92 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
93 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
94 | + * GNU Lesser General Public License for more details. |
95 | + * |
96 | + * You should have received a copy of the GNU Lesser General Public License |
97 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
98 | + */ |
99 | + |
100 | +import QtQuick 2.0 |
101 | + |
102 | +ProgressBar { |
103 | + property bool showProgressPercentage: true |
104 | +} |
105 | |
106 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml' |
107 | --- modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2014-04-23 08:50:20 +0000 |
108 | +++ modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2014-07-10 07:36:58 +0000 |
109 | @@ -20,7 +20,7 @@ |
110 | Item { |
111 | id: progressBarStyle |
112 | |
113 | - property ProgressBar progressBar: styledItem |
114 | + property var progressBar: styledItem |
115 | |
116 | implicitWidth: units.gu(38) |
117 | implicitHeight: units.gu(4) |
118 | @@ -56,6 +56,7 @@ |
119 | color: Theme.palette.normal.baseText |
120 | text: progressBar.indeterminate ? i18n.tr("In Progress") |
121 | : "%1%".arg(Number(progressBarStyle.progress * 100.0).toFixed(0)) |
122 | + visible: !progressBar.hasOwnProperty("showProgressPercentage") || progressBar.showProgressPercentage |
123 | |
124 | SequentialAnimation on opacity { |
125 | loops: Animation.Infinite |
126 | @@ -76,5 +77,6 @@ |
127 | rightColor: Theme.palette.normal.baseText |
128 | progress: (progressBarStyle.progress * background.width - valueLabel.x) / valueLabel.width |
129 | mirror: Qt.application.layoutDirection == Qt.RightToLeft |
130 | + visible: !progressBar.hasOwnProperty("showProgressPercentage") || progressBar.showProgressPercentage |
131 | } |
132 | } |
133 | |
134 | === modified file 'modules/Ubuntu/Components/qmldir' |
135 | --- modules/Ubuntu/Components/qmldir 2014-07-03 13:59:52 +0000 |
136 | +++ modules/Ubuntu/Components/qmldir 2014-07-10 07:36:58 +0000 |
137 | @@ -15,7 +15,7 @@ |
138 | Label 0.1 Label.qml |
139 | AbstractButton 0.1 AbstractButton.qml |
140 | ActivityIndicator 0.1 ActivityIndicator.qml |
141 | -ProgressBar 0.1 ProgressBar.qml |
142 | +ProgressBar 0.1 ProgressBar10.qml |
143 | TextField 0.1 TextField.qml |
144 | TextArea 0.1 TextArea.qml |
145 | Switch 0.1 Switch.qml |
146 | @@ -65,7 +65,7 @@ |
147 | Label 1.0 Label.qml |
148 | AbstractButton 1.0 AbstractButton.qml |
149 | ActivityIndicator 1.0 ActivityIndicator.qml |
150 | -ProgressBar 1.0 ProgressBar.qml |
151 | +ProgressBar 1.0 ProgressBar10.qml |
152 | TextField 1.0 TextField.qml |
153 | TextArea 1.0 TextArea.qml |
154 | Switch 1.0 Switch.qml |
155 | @@ -93,6 +93,7 @@ |
156 | |
157 | #version 1.1 |
158 | ComboButton 1.1 ComboButton.qml |
159 | +ProgressBar 1.1 ProgressBar11.qml |
160 | CrossFadeImage 1.1 CrossFadeImage11.qml |
161 | PullToRefresh 1.1 PullToRefresh.qml |
162 | UbuntuListView 1.1 UbuntuListView11.qml |
163 | |
164 | === modified file 'tests/unit/tst_components/tst_progressbar.qml' |
165 | --- tests/unit/tst_components/tst_progressbar.qml 2014-04-23 08:50:20 +0000 |
166 | +++ tests/unit/tst_components/tst_progressbar.qml 2014-07-10 07:36:58 +0000 |
167 | @@ -16,7 +16,8 @@ |
168 | |
169 | import QtQuick 2.0 |
170 | import QtTest 1.0 |
171 | -import Ubuntu.Components 1.1 |
172 | +// Note: See tst_progressbar11.qml for the newer API tests |
173 | +import Ubuntu.Components 1.0 |
174 | |
175 | TestCase { |
176 | name: "ProgressBarAPI" |
177 | @@ -28,6 +29,10 @@ |
178 | compare(progressBar.indeterminate,newIndeterminated,"can set/get") |
179 | } |
180 | |
181 | + function test_showProgressPercentageExists() { |
182 | + verify(!progressBar.hasOwnProperty("showProgressPercentage"), "Property absent") |
183 | + } |
184 | + |
185 | function test_maximumValue() { |
186 | compare(progressBar.maximumValue,1.0,"is set to 1.0 by default") |
187 | var newMaximumValue = 20.0 |
188 | |
189 | === added file 'tests/unit/tst_components/tst_progressbar11.qml' |
190 | --- tests/unit/tst_components/tst_progressbar11.qml 1970-01-01 00:00:00 +0000 |
191 | +++ tests/unit/tst_components/tst_progressbar11.qml 2014-07-10 07:36:58 +0000 |
192 | @@ -0,0 +1,38 @@ |
193 | +/* |
194 | + * Copyright 2014 Canonical Ltd. |
195 | + * |
196 | + * This program is free software; you can redistribute it and/or modify |
197 | + * it under the terms of the GNU Lesser General Public License as published by |
198 | + * the Free Software Foundation; version 3. |
199 | + * |
200 | + * This program is distributed in the hope that it will be useful, |
201 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
202 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
203 | + * GNU Lesser General Public License for more details. |
204 | + * |
205 | + * You should have received a copy of the GNU Lesser General Public License |
206 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
207 | + */ |
208 | + |
209 | +import QtQuick 2.0 |
210 | +import QtTest 1.0 |
211 | +import Ubuntu.Components 1.1 |
212 | + |
213 | +TestCase { |
214 | + name: "ProgressBarAPI" |
215 | + |
216 | + function test_showProgressPercentageExists() { |
217 | + verify(progressBar.hasOwnProperty("showProgressPercentage"), "Property missing") |
218 | + } |
219 | + |
220 | + function test_noLabel() { |
221 | + compare(progressBar.showProgressPercentage,true, "is set by default") |
222 | + var newShowProgressPercentage = false |
223 | + progressBar.showProgressPercentage = newShowProgressPercentage |
224 | + compare(progressBar.showProgressPercentage, newShowProgressPercentage, "can set/get") |
225 | + } |
226 | + |
227 | + ProgressBar { |
228 | + id: progressBar |
229 | + } |
230 | +} |
You can only add this property to version 1.1 You are not allowed to add properties to 0.1 or 1.0