Merge lp:~bzoltan/ubuntu-ui-toolkit/landing_2307 into lp:ubuntu-ui-toolkit
- landing_2307
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Tim Peeters |
Approved revision: | 1166 |
Merged at revision: | 1058 |
Proposed branch: | lp:~bzoltan/ubuntu-ui-toolkit/landing_2307 |
Merge into: | lp:ubuntu-ui-toolkit |
Diff against target: |
3378 lines (+1633/-252) 78 files modified
CHANGES (+1/-0) components.api (+18/-1) debian/changelog (+53/-0) debian/control (+3/-0) examples/ubuntu-ui-toolkit-gallery/Colors.qml (+72/-0) examples/ubuntu-ui-toolkit-gallery/ListItems.qml (+13/-2) examples/ubuntu-ui-toolkit-gallery/ListItemsSection.qml (+7/-1) examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml (+22/-1) examples/ubuntu-ui-toolkit-gallery/Styles.qml (+1/-1) examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml (+5/-1) examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml (+1/-0) modules/Ubuntu/Components/AppHeader.qml (+6/-0) modules/Ubuntu/Components/Colors/FIXME (+4/-0) modules/Ubuntu/Components/Colors/UbuntuColors.qml (+131/-0) modules/Ubuntu/Components/Colors/UbuntuColors10.qml (+4/-48) modules/Ubuntu/Components/ListItems/Empty.qml (+1/-0) modules/Ubuntu/Components/MainView.qml (+2/-1) modules/Ubuntu/Components/PageHeadConfiguration.qml (+41/-2) modules/Ubuntu/Components/PageHeadSections.qml (+74/-0) modules/Ubuntu/Components/Panel.qml (+6/-4) modules/Ubuntu/Components/ProgressBar11.qdoc (+6/-0) modules/Ubuntu/Components/ProgressBar11.qml (+21/-0) modules/Ubuntu/Components/TextArea.qml (+1/-1) modules/Ubuntu/Components/TextField.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml (+6/-1) modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/PageHeadButton.qml (+15/-15) modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml (+48/-19) modules/Ubuntu/Components/Themes/Ambiance/Palette.qml (+11/-9) modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml (+3/-1) modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml (+4/-4) modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml (+2/-2) modules/Ubuntu/Components/Themes/Ambiance/TextSelectionEndCursorStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/TextSelectionStartCursorStyle.qml (+3/-2) modules/Ubuntu/Components/Themes/Ambiance/qmldir (+1/-1) modules/Ubuntu/Components/Themes/PaletteValues.qml (+4/-0) modules/Ubuntu/Components/Themes/SuruDark/Palette.qml (+4/-2) modules/Ubuntu/Components/deployment.pri (+1/-1) modules/Ubuntu/Components/plugin/adapters/alarmsadapter_organizer.cpp (+6/-9) modules/Ubuntu/Components/plugin/plugin.cpp (+10/-2) modules/Ubuntu/Components/plugin/ucfontutils.cpp (+6/-6) modules/Ubuntu/Components/qmldir (+4/-2) modules/Ubuntu/Test/UbuntuTestCase.qml (+10/-1) push_to_phone.sh (+2/-0) tests/autopilot/ubuntuuitoolkit/__init__.py (+2/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py (+35/-8) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py (+1/-2) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/pickers.py (+9/-6) tests/autopilot/ubuntuuitoolkit/base.py (+12/-4) tests/autopilot/ubuntuuitoolkit/fixture_setup.py (+97/-4) tests/autopilot/ubuntuuitoolkit/tests/__init__.py (+23/-14) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_date_picker.py (+22/-6) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py (+1/-4) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.DeprecatedHeaderSectionsTestCase.qml (+50/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.SectionsTestCase.qml (+50/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py (+71/-5) tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py (+52/-5) tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py (+21/-7) tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py (+10/-1) tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py (+3/-0) tests/autopilot/ubuntuuitoolkit/tests/gallery/test_scrollbar.py (+15/-4) tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py (+10/-2) tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py (+16/-6) tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py (+104/-3) tests/autopilot/ubuntuuitoolkit/tests/test_ubuntu_scenarios.py (+70/-0) tests/autopilot/ubuntuuitoolkit/ubuntu_scenarios.py (+54/-0) tests/qmlapicheck.py (+5/-7) tests/qmlapicheck.sh (+1/-1) tests/resources/header/header.qml (+18/-0) tests/unit/runtest.sh (+1/-0) tests/unit/tst_components/tst_fontutils.qml (+12/-12) tests/unit/tst_components/tst_header_sections.qml (+79/-0) tests/unit/tst_components/tst_progressbar.qml (+6/-1) tests/unit/tst_components/tst_progressbar11.qml (+38/-0) tests/unit_x11/tst_components/tst_animator.qml (+75/-0) tests/unit_x11/tst_components/tst_panel.qml (+21/-1) tests/unit_x11/tst_components/tst_textinput_touch.qml (+3/-5) tests/unit_x11/tst_test/tst_ubuntutestcase.qml (+10/-1) |
To merge this branch: | bzr merge lp:~bzoltan/ubuntu-ui-toolkit/landing_2307 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Tim Peeters | Pending | ||
Review via email: mp+227897@code.launchpad.net |
Commit message
Landing 24.07
Description of the change
Landing 24.07
- 1163. By Zoltan Balogh
-
Don't use component type names in header CPOs for AP tests.
- 1164. By Zoltan Balogh
-
Don't use component type names in header CPOs for AP tests.
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1164
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 1165. By Zoltan Balogh
-
Remove the hiding of the toolbar on the option selector gallery autopilot tests.
- 1166. By Zoltan Balogh
-
Remove the hiding of the toolbar on the option selector gallery autopilot tests.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1166
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'CHANGES' | |||
2 | --- CHANGES 2014-06-04 20:45:16 +0000 | |||
3 | +++ CHANGES 2014-07-24 02:10:07 +0000 | |||
4 | @@ -108,6 +108,7 @@ | |||
5 | 108 | * CHANGED IN Page: Automatic detection of flickable inside a Page to control the header is now limited to Flickables that are anchored to the top of the Page or fill the Page. Header automatically shows when flickable.contentHeight becomes <= flickable.height. | 108 | * CHANGED IN Page: Automatic detection of flickable inside a Page to control the header is now limited to Flickables that are anchored to the top of the Page or fill the Page. Header automatically shows when flickable.contentHeight becomes <= flickable.height. |
6 | 109 | * CHANGED IN Action, ActionItem, OptionSelectorDelegate: Setting iconName now always selects the requested icon from ubuntu-mobile theme, not the system icon theme. | 109 | * CHANGED IN Action, ActionItem, OptionSelectorDelegate: Setting iconName now always selects the requested icon from ubuntu-mobile theme, not the system icon theme. |
7 | 110 | * CHANGED IN TabBar: The model now needs to have a selectedIndex property. | 110 | * CHANGED IN TabBar: The model now needs to have a selectedIndex property. |
8 | 111 | * CHANGED IN Panel: The panel no longer closes automatically when the user presses outside of the opened panel. That was deprecated behavior that was useful in the first version of the Toolbar. Set __closeOnContentsClicks to restore the old behavior, but a better solution is to deal with the press in the app and call Panel.close() when needed. | ||
9 | 111 | 112 | ||
10 | 112 | SDK 0.1.46 | 113 | SDK 0.1.46 |
11 | 113 | ########## | 114 | ########## |
12 | 114 | 115 | ||
13 | === modified file 'components.api' | |||
14 | --- components.api 2014-07-10 11:50:13 +0000 | |||
15 | +++ components.api 2014-07-24 02:10:07 +0000 | |||
16 | @@ -46,6 +46,12 @@ | |||
17 | 46 | readonly property color coolGrey | 46 | readonly property color coolGrey |
18 | 47 | property Gradient orangeGradient | 47 | property Gradient orangeGradient |
19 | 48 | property Gradient greyGradient | 48 | property Gradient greyGradient |
20 | 49 | readonly property color lightGrey | ||
21 | 50 | readonly property color darkGrey | ||
22 | 51 | readonly property color red | ||
23 | 52 | readonly property color green | ||
24 | 53 | readonly property color blue | ||
25 | 54 | readonly property color purple | ||
26 | 49 | ComboButton 1.1 | 55 | ComboButton 1.1 |
27 | 50 | Button | 56 | Button |
28 | 51 | property bool expanded | 57 | property bool expanded |
29 | @@ -247,10 +253,16 @@ | |||
30 | 247 | Page10 | 253 | Page10 |
31 | 248 | readonly property PageHeadConfiguration head | 254 | readonly property PageHeadConfiguration head |
32 | 249 | PageHeadConfiguration 1.1 | 255 | PageHeadConfiguration 1.1 |
34 | 250 | QtObject | 256 | Object |
35 | 251 | property list<Action> actions | 257 | property list<Action> actions |
36 | 252 | property Action backAction | 258 | property Action backAction |
37 | 253 | property Item contents | 259 | property Item contents |
38 | 260 | readonly property PageHeadSections sections | ||
39 | 261 | PageHeadSections 1.1 | ||
40 | 262 | QtObject | ||
41 | 263 | property bool enabled | ||
42 | 264 | property var model | ||
43 | 265 | property int selectedIndex | ||
44 | 254 | PageHeadState 1.1 | 266 | PageHeadState 1.1 |
45 | 255 | State | 267 | State |
46 | 256 | property PageHeadConfiguration head | 268 | property PageHeadConfiguration head |
47 | @@ -398,6 +410,9 @@ | |||
48 | 398 | property real minimumValue | 410 | property real minimumValue |
49 | 399 | property real maximumValue | 411 | property real maximumValue |
50 | 400 | property real value | 412 | property real value |
51 | 413 | ProgressBar 1.1 | ||
52 | 414 | ProgressBar | ||
53 | 415 | property bool showProgressPercentage | ||
54 | 401 | PullToRefresh 1.1 | 416 | PullToRefresh 1.1 |
55 | 402 | StyledItem | 417 | StyledItem |
56 | 403 | readonly property bool releaseToRefresh | 418 | readonly property bool releaseToRefresh |
57 | @@ -620,6 +635,7 @@ | |||
58 | 620 | property color overlayText | 635 | property color overlayText |
59 | 621 | property color field | 636 | property color field |
60 | 622 | property color fieldText | 637 | property color fieldText |
61 | 638 | property color selection | ||
62 | 623 | ToolbarButton 0.1 1.0 | 639 | ToolbarButton 0.1 1.0 |
63 | 624 | ActionItem | 640 | ActionItem |
64 | 625 | ToolbarItems 0.1 1.0 | 641 | ToolbarItems 0.1 1.0 |
65 | @@ -657,6 +673,7 @@ | |||
66 | 657 | function flick(item, x, y, dx, dy, pressTimeout, steps, button, modifiers, delay) | 673 | function flick(item, x, y, dx, dy, pressTimeout, steps, button, modifiers, delay) |
67 | 658 | function mouseLongPress(item, x, y, button, modifiers, delay) | 674 | function mouseLongPress(item, x, y, button, modifiers, delay) |
68 | 659 | function tryCompareFunction(func, expectedResult, timeout) | 675 | function tryCompareFunction(func, expectedResult, timeout) |
69 | 676 | function typeString(string) | ||
70 | 660 | plugins.qmltypes | 677 | plugins.qmltypes |
71 | 661 | name: "FilterBehavior" | 678 | name: "FilterBehavior" |
72 | 662 | prototype: "QObject" | 679 | prototype: "QObject" |
73 | 663 | 680 | ||
74 | === modified file 'debian/changelog' | |||
75 | --- debian/changelog 2014-07-15 11:41:35 +0000 | |||
76 | +++ debian/changelog 2014-07-24 02:10:07 +0000 | |||
77 | @@ -1,3 +1,56 @@ | |||
78 | 1 | ubuntu-ui-toolkit (0.1.50+14.10.20140715-0ubuntu2) UNRELEASED; urgency=medium | ||
79 | 2 | |||
80 | 3 | [ Christian Dywan ] | ||
81 | 4 | * Wrap tempfile.NamedTemporaryFile to discard underscored | ||
82 | 5 | filenames | ||
83 | 6 | * Print errors and help to sys.stderr | ||
84 | 7 | * Fixes false positives where buttons say for example Anrufen | ||
85 | 8 | as opposed to Call depending on the local | ||
86 | 9 | * Use memory alarm backend for API/ deployment and don't warn | ||
87 | 10 | about it | ||
88 | 11 | * Update selection and cursor to blue | ||
89 | 12 | * Suppress error output from dpkg-architecture. | ||
90 | 13 | |||
91 | 14 | [ Tim Peeters ] | ||
92 | 15 | * New sizes for icons and touch areas in header. | ||
93 | 16 | * Workaround for large-timestamp autopilot bug | ||
94 | 17 | * Push modules/Ubuntu/Components/qmldir in push_to_phone.sh | ||
95 | 18 | * Various design tweaks: | ||
96 | 19 | - Update CheckBox/Switch colors | ||
97 | 20 | - Use new header by default in UITK gallery | ||
98 | 21 | - Add margins for left and rightmost buttons in header | ||
99 | 22 | * Updateed font sizes | ||
100 | 23 | * Don't automatically close a Panel when the user presses next | ||
101 | 24 | to it, and update Panel position when its height changes. | ||
102 | 25 | * Support sections in header divider. | ||
103 | 26 | * Add new colors to UbuntuColors. | ||
104 | 27 | Fixes: https://bugs.launchpad.net/bugs/1335826. | ||
105 | 28 | |||
106 | 29 | [ Renato Filho ] | ||
107 | 30 | * Reset item state if the cancelItemRemoval() function was | ||
108 | 31 | called after the item be removed. | ||
109 | 32 | |||
110 | 33 | [ Zeller Benjamin ] | ||
111 | 34 | * Work around LP: #1338602, RotationAnimator crashes application | ||
112 | 35 | |||
113 | 36 | [ Michael Zanetti ] | ||
114 | 37 | * Add typeString to UbuntuTestCase | ||
115 | 38 | |||
116 | 39 | [ Ugo Riboni ] | ||
117 | 40 | * Add a boolean property to allow hiding the ProgressBar label. | ||
118 | 41 | Fixes: https://bugs.launchpad.net/bugs/1317377. | ||
119 | 42 | |||
120 | 43 | [ Nekhelesh Ramananthan ] | ||
121 | 44 | * Adds examples to Actions, backAction and fixed the contents | ||
122 | 45 | example in the PageHeadConfiguration. | ||
123 | 46 | |||
124 | 47 | [ Leo Arias ] | ||
125 | 48 | * Simulate the supported devices on gallery autopilot tests. | ||
126 | 49 | * Remove the hiding of the toolbar on the option selector | ||
127 | 50 | gallery autopilot tests. | ||
128 | 51 | |||
129 | 52 | -- Zoltán Balogh <zoltan@bakter.hu> Wed, 23 Jul 2014 13:47:47 +0300 | ||
130 | 53 | |||
131 | 1 | ubuntu-ui-toolkit (0.1.49+14.10.20140715-0ubuntu1) utopic; urgency=low | 54 | ubuntu-ui-toolkit (0.1.49+14.10.20140715-0ubuntu1) utopic; urgency=low |
132 | 2 | 55 | ||
133 | 3 | [ Dimitri John Ledkov ] | 56 | [ Dimitri John Ledkov ] |
134 | 4 | 57 | ||
135 | === modified file 'debian/control' | |||
136 | --- debian/control 2014-07-09 17:37:43 +0000 | |||
137 | +++ debian/control 2014-07-24 02:10:07 +0000 | |||
138 | @@ -39,6 +39,7 @@ | |||
139 | 39 | xvfb, | 39 | xvfb, |
140 | 40 | libgl1-mesa-dri, | 40 | libgl1-mesa-dri, |
141 | 41 | locales, | 41 | locales, |
142 | 42 | suru-icon-theme, | ||
143 | 42 | Standards-Version: 3.9.4 | 43 | Standards-Version: 3.9.4 |
144 | 43 | Homepage: https://launchpad.net/ubuntu-ui-toolkit | 44 | Homepage: https://launchpad.net/ubuntu-ui-toolkit |
145 | 44 | # If you aren't a member of ~ubuntu-sdk-team but need to upload packaging | 45 | # If you aren't a member of ~ubuntu-sdk-team but need to upload packaging |
146 | @@ -135,10 +136,12 @@ | |||
147 | 135 | libqt5widgets5, | 136 | libqt5widgets5, |
148 | 136 | python-autopilot (>= 1.4), | 137 | python-autopilot (>= 1.4), |
149 | 137 | python-fixtures, | 138 | python-fixtures, |
150 | 139 | python-gi, | ||
151 | 138 | python-mock, | 140 | python-mock, |
152 | 139 | python-testscenarios, | 141 | python-testscenarios, |
153 | 140 | python-testtools, | 142 | python-testtools, |
154 | 141 | python3-fixtures, | 143 | python3-fixtures, |
155 | 144 | python3-gi, | ||
156 | 142 | python3-testscenarios, | 145 | python3-testscenarios, |
157 | 143 | python3-testtools, | 146 | python3-testtools, |
158 | 144 | python3-autopilot (>= 1.4), | 147 | python3-autopilot (>= 1.4), |
159 | 145 | 148 | ||
160 | === added file 'examples/ubuntu-ui-toolkit-gallery/Colors.qml' | |||
161 | --- examples/ubuntu-ui-toolkit-gallery/Colors.qml 1970-01-01 00:00:00 +0000 | |||
162 | +++ examples/ubuntu-ui-toolkit-gallery/Colors.qml 2014-07-24 02:10:07 +0000 | |||
163 | @@ -0,0 +1,72 @@ | |||
164 | 1 | /* | ||
165 | 2 | * Copyright 2014 Canonical Ltd. | ||
166 | 3 | * | ||
167 | 4 | * This program is free software; you can redistribute it and/or modify | ||
168 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
169 | 6 | * the Free Software Foundation; version 3. | ||
170 | 7 | * | ||
171 | 8 | * This program is distributed in the hope that it will be useful, | ||
172 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
173 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
174 | 11 | * GNU Lesser General Public License for more details. | ||
175 | 12 | * | ||
176 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
177 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
178 | 15 | */ | ||
179 | 16 | |||
180 | 17 | import QtQuick 2.2 | ||
181 | 18 | import Ubuntu.Components 1.1 | ||
182 | 19 | |||
183 | 20 | Template { | ||
184 | 21 | objectName: "colorsTemplate" | ||
185 | 22 | |||
186 | 23 | TemplateSection { | ||
187 | 24 | title: "UbuntuColors" | ||
188 | 25 | className: "UbuntuColors" | ||
189 | 26 | |||
190 | 27 | // Except orange, none of the colors from UbuntuComponents 1.0 | ||
191 | 28 | // are included because they may be deprecated soon. | ||
192 | 29 | TemplateRow { | ||
193 | 30 | title: i18n.tr("Orange") | ||
194 | 31 | UbuntuShape { | ||
195 | 32 | color: UbuntuColors.orange | ||
196 | 33 | } | ||
197 | 34 | } | ||
198 | 35 | TemplateRow { | ||
199 | 36 | title: i18n.tr("Light grey") | ||
200 | 37 | UbuntuShape { | ||
201 | 38 | color: UbuntuColors.lightGrey | ||
202 | 39 | } | ||
203 | 40 | } | ||
204 | 41 | TemplateRow { | ||
205 | 42 | title: i18n.tr("Dark grey") | ||
206 | 43 | UbuntuShape { | ||
207 | 44 | color: UbuntuColors.darkGrey | ||
208 | 45 | } | ||
209 | 46 | } | ||
210 | 47 | TemplateRow { | ||
211 | 48 | title: i18n.tr("Red") | ||
212 | 49 | UbuntuShape { | ||
213 | 50 | color: UbuntuColors.red | ||
214 | 51 | } | ||
215 | 52 | } | ||
216 | 53 | TemplateRow { | ||
217 | 54 | title: i18n.tr("Green") | ||
218 | 55 | UbuntuShape { | ||
219 | 56 | color: UbuntuColors.green | ||
220 | 57 | } | ||
221 | 58 | } | ||
222 | 59 | TemplateRow { | ||
223 | 60 | title: i18n.tr("Blue") | ||
224 | 61 | UbuntuShape { | ||
225 | 62 | color: UbuntuColors.blue | ||
226 | 63 | } | ||
227 | 64 | } | ||
228 | 65 | TemplateRow { | ||
229 | 66 | title: i18n.tr("Purple") | ||
230 | 67 | UbuntuShape { | ||
231 | 68 | color: UbuntuColors.purple | ||
232 | 69 | } | ||
233 | 70 | } | ||
234 | 71 | } | ||
235 | 72 | } | ||
236 | 0 | 73 | ||
237 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ListItems.qml' | |||
238 | --- examples/ubuntu-ui-toolkit-gallery/ListItems.qml 2014-05-07 11:40:37 +0000 | |||
239 | +++ examples/ubuntu-ui-toolkit-gallery/ListItems.qml 2014-07-24 02:10:07 +0000 | |||
240 | @@ -50,7 +50,7 @@ | |||
241 | 50 | 50 | ||
242 | 51 | TemplateSection { | 51 | TemplateSection { |
243 | 52 | title: i18n.tr("ThinDivider") | 52 | title: i18n.tr("ThinDivider") |
245 | 53 | className: "ThinDivider" | 53 | className: "ListItems-ThinDivider" |
246 | 54 | 54 | ||
247 | 55 | Column { | 55 | Column { |
248 | 56 | anchors.left: parent.left | 56 | anchors.left: parent.left |
249 | @@ -198,6 +198,7 @@ | |||
250 | 198 | } | 198 | } |
251 | 199 | 199 | ||
252 | 200 | ListItemsSection { | 200 | ListItemsSection { |
253 | 201 | id: removableSection | ||
254 | 201 | title: i18n.tr("Removable") | 202 | title: i18n.tr("Removable") |
255 | 202 | className: "Standard" | 203 | className: "Standard" |
256 | 203 | delegate: ListItem.Standard { | 204 | delegate: ListItem.Standard { |
257 | @@ -209,11 +210,21 @@ | |||
258 | 209 | color: Theme.palette.normal.base | 210 | color: Theme.palette.normal.base |
259 | 210 | } | 211 | } |
260 | 211 | } | 212 | } |
261 | 213 | |||
262 | 214 | Toolkit.Button { | ||
263 | 215 | text: i18n.tr("Reset") | ||
264 | 216 | anchors.right: parent.right | ||
265 | 217 | onClicked: { | ||
266 | 218 | for (var i=0, iMax=removableSection.count; i < iMax; i++) { | ||
267 | 219 | removableSection.itemAt(i).cancelItemRemoval() | ||
268 | 220 | } | ||
269 | 221 | } | ||
270 | 222 | } | ||
271 | 212 | } | 223 | } |
272 | 213 | 224 | ||
273 | 214 | TemplateSection { | 225 | TemplateSection { |
274 | 215 | title: i18n.tr("Grouped list") | 226 | title: i18n.tr("Grouped list") |
276 | 216 | className: "Header" | 227 | className: "ListItems-Header" |
277 | 217 | 228 | ||
278 | 218 | Rectangle { | 229 | Rectangle { |
279 | 219 | color: Qt.rgba(0.0, 0.0, 0.0, 0.01) | 230 | color: Qt.rgba(0.0, 0.0, 0.0, 0.01) |
280 | 220 | 231 | ||
281 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ListItemsSection.qml' | |||
282 | --- examples/ubuntu-ui-toolkit-gallery/ListItemsSection.qml 2014-04-23 09:39:11 +0000 | |||
283 | +++ examples/ubuntu-ui-toolkit-gallery/ListItemsSection.qml 2014-07-24 02:10:07 +0000 | |||
284 | @@ -20,7 +20,13 @@ | |||
285 | 20 | TemplateSection { | 20 | TemplateSection { |
286 | 21 | id: section | 21 | id: section |
287 | 22 | property alias delegate: repeater.delegate | 22 | property alias delegate: repeater.delegate |
289 | 23 | documentation: "qml-ubuntu-components-listitems0-%1.html".arg(className.toLowerCase()) | 23 | property alias count: repeater.count |
290 | 24 | documentation: "qml-ubuntu-components-listitems-%1.html".arg(className.toLowerCase()) | ||
291 | 25 | |||
292 | 26 | function itemAt(index) | ||
293 | 27 | { | ||
294 | 28 | return repeater.itemAt(index) | ||
295 | 29 | } | ||
296 | 24 | 30 | ||
297 | 25 | Column { | 31 | Column { |
298 | 26 | id: column | 32 | id: column |
299 | 27 | 33 | ||
300 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml' | |||
301 | --- examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml 2014-04-23 09:39:11 +0000 | |||
302 | +++ examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml 2014-07-24 02:10:07 +0000 | |||
303 | @@ -15,7 +15,7 @@ | |||
304 | 15 | */ | 15 | */ |
305 | 16 | 16 | ||
306 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
308 | 18 | import Ubuntu.Components 0.1 | 18 | import Ubuntu.Components 1.1 |
309 | 19 | 19 | ||
310 | 20 | Template { | 20 | Template { |
311 | 21 | objectName: "progressBarsTemplate" | 21 | objectName: "progressBarsTemplate" |
312 | @@ -53,6 +53,27 @@ | |||
313 | 53 | indeterminate: true | 53 | indeterminate: true |
314 | 54 | } | 54 | } |
315 | 55 | } | 55 | } |
316 | 56 | |||
317 | 57 | TemplateRow { | ||
318 | 58 | title: i18n.tr("No label") | ||
319 | 59 | |||
320 | 60 | ProgressBar { | ||
321 | 61 | id: progressNoLabel | ||
322 | 62 | objectName: "progressbar_nolabel" | ||
323 | 63 | width: parent.width | ||
324 | 64 | showProgressPercentage: false | ||
325 | 65 | |||
326 | 66 | SequentialAnimation on value { | ||
327 | 67 | loops: Animation.Infinite | ||
328 | 68 | NumberAnimation { | ||
329 | 69 | from: progress.minimumValue | ||
330 | 70 | to: progress.maximumValue | ||
331 | 71 | duration: 2000 | ||
332 | 72 | } | ||
333 | 73 | PauseAnimation {duration: 1000} | ||
334 | 74 | } | ||
335 | 75 | } | ||
336 | 76 | } | ||
337 | 56 | } | 77 | } |
338 | 57 | 78 | ||
339 | 58 | TemplateSection { | 79 | TemplateSection { |
340 | 59 | 80 | ||
341 | === modified file 'examples/ubuntu-ui-toolkit-gallery/Styles.qml' | |||
342 | --- examples/ubuntu-ui-toolkit-gallery/Styles.qml 2014-06-19 13:11:09 +0000 | |||
343 | +++ examples/ubuntu-ui-toolkit-gallery/Styles.qml 2014-07-24 02:10:07 +0000 | |||
344 | @@ -28,7 +28,7 @@ | |||
345 | 28 | } | 28 | } |
346 | 29 | 29 | ||
347 | 30 | OptionSelector { | 30 | OptionSelector { |
349 | 31 | model: [ i18n.tr('Header with Toolbar'), i18n.tr('New Style Header') ] | 31 | model: [ i18n.tr('New Style Header'), i18n.tr('Header with Toolbar') ] |
350 | 32 | expanded: true | 32 | expanded: true |
351 | 33 | onSelectedIndexChanged: gallery.useDeprecatedToolbar = (selectedIndex == 0) | 33 | onSelectedIndexChanged: gallery.useDeprecatedToolbar = (selectedIndex == 0) |
352 | 34 | } | 34 | } |
353 | 35 | 35 | ||
354 | === modified file 'examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml' | |||
355 | --- examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml 2014-07-02 13:39:29 +0000 | |||
356 | +++ examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml 2014-07-24 02:10:07 +0000 | |||
357 | @@ -28,7 +28,11 @@ | |||
358 | 28 | label: "Styles" | 28 | label: "Styles" |
359 | 29 | source: "Styles.qml" | 29 | source: "Styles.qml" |
360 | 30 | } | 30 | } |
362 | 31 | 31 | ListElement { | |
363 | 32 | objectName: "colorsElement" | ||
364 | 33 | label: "Colors" | ||
365 | 34 | source: "Colors.qml" | ||
366 | 35 | } | ||
367 | 32 | ListElement { | 36 | ListElement { |
368 | 33 | objectName: "togglesElement" | 37 | objectName: "togglesElement" |
369 | 34 | label: "Toggles" | 38 | label: "Toggles" |
370 | 35 | 39 | ||
371 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml' | |||
372 | --- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2014-05-23 13:03:09 +0000 | |||
373 | +++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2014-07-24 02:10:07 +0000 | |||
374 | @@ -26,6 +26,7 @@ | |||
375 | 26 | // Note! applicationName needs to match the .desktop filename | 26 | // Note! applicationName needs to match the .desktop filename |
376 | 27 | applicationName: "ubuntu-ui-toolkit-gallery" | 27 | applicationName: "ubuntu-ui-toolkit-gallery" |
377 | 28 | 28 | ||
378 | 29 | useDeprecatedToolbar: false | ||
379 | 29 | 30 | ||
380 | 30 | width: units.gu(120) | 31 | width: units.gu(120) |
381 | 31 | height: units.gu(75) | 32 | height: units.gu(75) |
382 | 32 | 33 | ||
383 | === modified file 'modules/Ubuntu/Components/AppHeader.qml' | |||
384 | --- modules/Ubuntu/Components/AppHeader.qml 2014-07-01 21:01:23 +0000 | |||
385 | +++ modules/Ubuntu/Components/AppHeader.qml 2014-07-24 02:10:07 +0000 | |||
386 | @@ -129,6 +129,12 @@ | |||
387 | 129 | property int count: tabsModel ? tabsModel.count : 0 | 129 | property int count: tabsModel ? tabsModel.count : 0 |
388 | 130 | property int selectedIndex: tabsModel ? tabsModel.selectedIndex : -1 | 130 | property int selectedIndex: tabsModel ? tabsModel.selectedIndex : -1 |
389 | 131 | } | 131 | } |
390 | 132 | Item { | ||
391 | 133 | // FIXME: This is a workaround to be able to get the properties of | ||
392 | 134 | // the sections in an autopilot test. | ||
393 | 135 | objectName: "sectionsProperties" | ||
394 | 136 | property int selectedIndex: header.config ? header.config.sections.selectedIndex : -1 | ||
395 | 137 | } | ||
396 | 132 | 138 | ||
397 | 133 | /*! | 139 | /*! |
398 | 134 | The flickable that controls the movement of the header. | 140 | The flickable that controls the movement of the header. |
399 | 135 | 141 | ||
400 | === modified file 'modules/Ubuntu/Components/Colors/FIXME' | |||
401 | --- modules/Ubuntu/Components/Colors/FIXME 2013-07-01 05:54:33 +0000 | |||
402 | +++ modules/Ubuntu/Components/Colors/FIXME 2014-07-24 02:10:07 +0000 | |||
403 | @@ -1,3 +1,7 @@ | |||
404 | 1 | UbuntuColors.qml is located in the Colors subdirectory because | 1 | UbuntuColors.qml is located in the Colors subdirectory because |
405 | 2 | QuickUtils::createQmlObject() fails if the QML file is located in a | 2 | QuickUtils::createQmlObject() fails if the QML file is located in a |
406 | 3 | folder that has a qmldir file with JavaScript modules. | 3 | folder that has a qmldir file with JavaScript modules. |
407 | 4 | |||
408 | 5 | UbuntuColors 1.1 is not in a file named UbuntuColors11.qml but in | ||
409 | 6 | UbuntuColors.qml so that qdoc can properly detect the component | ||
410 | 7 | name without a qmldir file. | ||
411 | 4 | 8 | ||
412 | === added file 'modules/Ubuntu/Components/Colors/UbuntuColors.qml' | |||
413 | --- modules/Ubuntu/Components/Colors/UbuntuColors.qml 1970-01-01 00:00:00 +0000 | |||
414 | +++ modules/Ubuntu/Components/Colors/UbuntuColors.qml 2014-07-24 02:10:07 +0000 | |||
415 | @@ -0,0 +1,131 @@ | |||
416 | 1 | /* | ||
417 | 2 | Copyright 2014 Canonical Ltd. | ||
418 | 3 | * | ||
419 | 4 | This program is free software; you can redistribute it and/or modify | ||
420 | 5 | it under the terms of the GNU Lesser General Public License as published by | ||
421 | 6 | the Free Software Foundation; version 3. | ||
422 | 7 | * | ||
423 | 8 | This program is distributed in the hope that it will be useful, | ||
424 | 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
425 | 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
426 | 11 | GNU Lesser General Public License for more details. | ||
427 | 12 | * | ||
428 | 13 | You should have received a copy of the GNU Lesser General Public License | ||
429 | 14 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
430 | 15 | */ | ||
431 | 16 | |||
432 | 17 | import QtQuick 2.2 | ||
433 | 18 | |||
434 | 19 | /*! | ||
435 | 20 | \qmltype UbuntuColors | ||
436 | 21 | \inqmlmodule Ubuntu.Components 1.1 | ||
437 | 22 | \ingroup ubuntu | ||
438 | 23 | \brief Singleton defining the Ubuntu color palette. | ||
439 | 24 | |||
440 | 25 | Each color of the Ubuntu color palette is accesible from it. | ||
441 | 26 | For more information on how to appropriately use the colors according to | ||
442 | 27 | the context, please refer to the | ||
443 | 28 | \l{http://design.ubuntu.com/brand/colour-palette}{Ubuntu brand guidelines}. | ||
444 | 29 | |||
445 | 30 | Example of use: | ||
446 | 31 | |||
447 | 32 | \qml | ||
448 | 33 | Rectangle { | ||
449 | 34 | color: UbuntuColors.orange | ||
450 | 35 | } | ||
451 | 36 | \endqml | ||
452 | 37 | */ | ||
453 | 38 | QtObject { | ||
454 | 39 | // old colors from UbuntuColors 1.0: | ||
455 | 40 | |||
456 | 41 | /*! | ||
457 | 42 | Orange. Recommended for branded elements, display progress | ||
458 | 43 | and intensity, textual links on light backgrounds. | ||
459 | 44 | */ | ||
460 | 45 | readonly property color orange: "#DD4814" | ||
461 | 46 | /*! | ||
462 | 47 | \deprecated | ||
463 | 48 | Ubuntu supporting color: light aubergine | ||
464 | 49 | */ | ||
465 | 50 | readonly property color lightAubergine: "#77216F" | ||
466 | 51 | /*! | ||
467 | 52 | \deprecated | ||
468 | 53 | Ubuntu supporting color: mid aubergine | ||
469 | 54 | */ | ||
470 | 55 | readonly property color midAubergine: "#5E2750" | ||
471 | 56 | /*! | ||
472 | 57 | \deprecated | ||
473 | 58 | Ubuntu supporting color: dark aubergine | ||
474 | 59 | */ | ||
475 | 60 | readonly property color darkAubergine: "#2C001E" | ||
476 | 61 | /*! | ||
477 | 62 | \deprecated | ||
478 | 63 | Ubuntu neutral color: warm grey | ||
479 | 64 | */ | ||
480 | 65 | readonly property color warmGrey: "#AEA79F" | ||
481 | 66 | /*! | ||
482 | 67 | \deprecated | ||
483 | 68 | Ubuntu neutral color: cool grey | ||
484 | 69 | */ | ||
485 | 70 | readonly property color coolGrey: "#333333" | ||
486 | 71 | |||
487 | 72 | /*! | ||
488 | 73 | Ubuntu orange gradient | ||
489 | 74 | |||
490 | 75 | \sa Button::gradient | ||
491 | 76 | */ | ||
492 | 77 | property Gradient orangeGradient: Gradient { | ||
493 | 78 | GradientStop { position: 0.0; color: "#DD4814" } | ||
494 | 79 | GradientStop { position: 1.0; color: "#D9722D" } | ||
495 | 80 | } | ||
496 | 81 | /*! | ||
497 | 82 | Ubuntu grey gradient | ||
498 | 83 | |||
499 | 84 | \sa Button::gradient | ||
500 | 85 | */ | ||
501 | 86 | property Gradient greyGradient: Gradient { | ||
502 | 87 | GradientStop { position: 0.0; color: "#888888" } | ||
503 | 88 | GradientStop { position: 1.0; color: "#BBBBBB" } | ||
504 | 89 | } | ||
505 | 90 | |||
506 | 91 | // New colors introduced in UbuntuColors 1.1: | ||
507 | 92 | |||
508 | 93 | /*! | ||
509 | 94 | Light grey. Recommended for neutral action buttons and | ||
510 | 95 | secondary text. | ||
511 | 96 | \since Ubuntu.Components 1.1 | ||
512 | 97 | */ | ||
513 | 98 | readonly property color lightGrey: "#888888" | ||
514 | 99 | |||
515 | 100 | /*! | ||
516 | 101 | Dark grey. Recommended for text and action icons. | ||
517 | 102 | \since Ubuntu.Components 1.1 | ||
518 | 103 | */ | ||
519 | 104 | readonly property color darkGrey: "#5d5d5d" | ||
520 | 105 | |||
521 | 106 | /*! | ||
522 | 107 | Red. Recommended for negative and irreversible action | ||
523 | 108 | buttons, errors and alerts. | ||
524 | 109 | \since Ubuntu.Components 1.1 | ||
525 | 110 | */ | ||
526 | 111 | readonly property color red: "#fc4949" | ||
527 | 112 | |||
528 | 113 | /*! | ||
529 | 114 | Green. Recommended for positive action buttons. | ||
530 | 115 | \since Ubuntu.Components 1.1 | ||
531 | 116 | */ | ||
532 | 117 | readonly property color green: "#3fb24f" | ||
533 | 118 | |||
534 | 119 | /*! | ||
535 | 120 | Blue. Recommended for text selection and text cursor. | ||
536 | 121 | \since Ubuntu.Components 1.1 | ||
537 | 122 | */ | ||
538 | 123 | readonly property color blue: "#1ab6ef" | ||
539 | 124 | |||
540 | 125 | /*! | ||
541 | 126 | Purple. Recommended for proper nouns in | ||
542 | 127 | list items. | ||
543 | 128 | \since Ubuntu.Components 1.1 | ||
544 | 129 | */ | ||
545 | 130 | readonly property color purple: "#762572" | ||
546 | 131 | } | ||
547 | 0 | 132 | ||
548 | === renamed file 'modules/Ubuntu/Components/Colors/UbuntuColors.qml' => 'modules/Ubuntu/Components/Colors/UbuntuColors10.qml' | |||
549 | --- modules/Ubuntu/Components/Colors/UbuntuColors.qml 2013-07-02 00:15:07 +0000 | |||
550 | +++ modules/Ubuntu/Components/Colors/UbuntuColors10.qml 2014-07-24 02:10:07 +0000 | |||
551 | @@ -1,5 +1,5 @@ | |||
552 | 1 | /* | 1 | /* |
554 | 2 | Copyright 2013 Canonical Ltd. | 2 | Copyright 2013-2014 Canonical Ltd. |
555 | 3 | * | 3 | * |
556 | 4 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify |
557 | 5 | it under the terms of the GNU Lesser General Public License as published by | 5 | it under the terms of the GNU Lesser General Public License as published by |
558 | @@ -14,67 +14,23 @@ | |||
559 | 14 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
560 | 15 | */ | 15 | */ |
561 | 16 | 16 | ||
563 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.2 |
564 | 18 | 18 | ||
565 | 19 | /*! | 19 | /*! |
583 | 20 | \qmltype UbuntuColors | 20 | \internal |
584 | 21 | \inqmlmodule Ubuntu.Components 0.1 | 21 | Documentation is in UbuntuColors.qml |
568 | 22 | \ingroup theming | ||
569 | 23 | \brief Singleton defining the Ubuntu color palette. | ||
570 | 24 | |||
571 | 25 | Each color of the Ubuntu color palette is accesible from it. | ||
572 | 26 | For more information on how to appropriately use the colors according to | ||
573 | 27 | the context, please refer to the | ||
574 | 28 | \l{http://design.ubuntu.com/brand/colour-palette}{Ubuntu brand guidelines}. | ||
575 | 29 | |||
576 | 30 | Example of use: | ||
577 | 31 | |||
578 | 32 | \qml | ||
579 | 33 | Rectangle { | ||
580 | 34 | color: UbuntuColors.orange | ||
581 | 35 | } | ||
582 | 36 | \endqml | ||
585 | 37 | */ | 22 | */ |
586 | 38 | QtObject { | 23 | QtObject { |
587 | 39 | /*! | ||
588 | 40 | Ubuntu core color: Ubuntu orange | ||
589 | 41 | */ | ||
590 | 42 | readonly property color orange: "#DD4814" | 24 | readonly property color orange: "#DD4814" |
591 | 43 | /*! | ||
592 | 44 | Ubuntu supporting color: light aubergine | ||
593 | 45 | */ | ||
594 | 46 | readonly property color lightAubergine: "#77216F" | 25 | readonly property color lightAubergine: "#77216F" |
595 | 47 | /*! | ||
596 | 48 | Ubuntu supporting color: mid aubergine | ||
597 | 49 | */ | ||
598 | 50 | readonly property color midAubergine: "#5E2750" | 26 | readonly property color midAubergine: "#5E2750" |
599 | 51 | /*! | ||
600 | 52 | Ubuntu supporting color: dark aubergine | ||
601 | 53 | */ | ||
602 | 54 | readonly property color darkAubergine: "#2C001E" | 27 | readonly property color darkAubergine: "#2C001E" |
603 | 55 | /*! | ||
604 | 56 | Ubuntu neutral color: warm grey | ||
605 | 57 | */ | ||
606 | 58 | readonly property color warmGrey: "#AEA79F" | 28 | readonly property color warmGrey: "#AEA79F" |
607 | 59 | /*! | ||
608 | 60 | Ubuntu neutral color: cool grey | ||
609 | 61 | */ | ||
610 | 62 | readonly property color coolGrey: "#333333" | 29 | readonly property color coolGrey: "#333333" |
611 | 63 | |||
612 | 64 | /*! | ||
613 | 65 | Ubuntu orange gradient | ||
614 | 66 | |||
615 | 67 | \sa Button::gradient | ||
616 | 68 | */ | ||
617 | 69 | property Gradient orangeGradient: Gradient { | 30 | property Gradient orangeGradient: Gradient { |
618 | 70 | GradientStop { position: 0.0; color: "#DD4814" } | 31 | GradientStop { position: 0.0; color: "#DD4814" } |
619 | 71 | GradientStop { position: 1.0; color: "#D9722D" } | 32 | GradientStop { position: 1.0; color: "#D9722D" } |
620 | 72 | } | 33 | } |
621 | 73 | /*! | ||
622 | 74 | Ubuntu grey gradient | ||
623 | 75 | |||
624 | 76 | \sa Button::gradient | ||
625 | 77 | */ | ||
626 | 78 | property Gradient greyGradient: Gradient { | 34 | property Gradient greyGradient: Gradient { |
627 | 79 | GradientStop { position: 0.0; color: "#888888" } | 35 | GradientStop { position: 0.0; color: "#888888" } |
628 | 80 | GradientStop { position: 1.0; color: "#BBBBBB" } | 36 | GradientStop { position: 1.0; color: "#BBBBBB" } |
629 | 81 | 37 | ||
630 | === modified file 'modules/Ubuntu/Components/ListItems/Empty.qml' | |||
631 | --- modules/Ubuntu/Components/ListItems/Empty.qml 2014-06-05 11:42:07 +0000 | |||
632 | +++ modules/Ubuntu/Components/ListItems/Empty.qml 2014-07-24 02:10:07 +0000 | |||
633 | @@ -175,6 +175,7 @@ | |||
634 | 175 | function cancelItemRemoval() | 175 | function cancelItemRemoval() |
635 | 176 | { | 176 | { |
636 | 177 | priv.resetDrag() | 177 | priv.resetDrag() |
637 | 178 | priv.removed = false | ||
638 | 178 | } | 179 | } |
639 | 179 | 180 | ||
640 | 180 | width: parent ? parent.width : units.gu(31) | 181 | width: parent ? parent.width : units.gu(31) |
641 | 181 | 182 | ||
642 | === modified file 'modules/Ubuntu/Components/MainView.qml' | |||
643 | --- modules/Ubuntu/Components/MainView.qml 2014-07-10 11:50:13 +0000 | |||
644 | +++ modules/Ubuntu/Components/MainView.qml 2014-07-24 02:10:07 +0000 | |||
645 | @@ -387,7 +387,8 @@ | |||
646 | 387 | config: internal.activePage && internal.activePage.hasOwnProperty("head") && | 387 | config: internal.activePage && internal.activePage.hasOwnProperty("head") && |
647 | 388 | (internal.activePage.head.actions.length > 0 || | 388 | (internal.activePage.head.actions.length > 0 || |
648 | 389 | internal.activePage.head.backAction !== null || | 389 | internal.activePage.head.backAction !== null || |
650 | 390 | internal.activePage.head.contents !== null) ? | 390 | internal.activePage.head.contents !== null || |
651 | 391 | internal.activePage.head.sections.model !== undefined) ? | ||
652 | 391 | internal.activePage.head : headerConfig | 392 | internal.activePage.head : headerConfig |
653 | 392 | 393 | ||
654 | 393 | property Item tabBar: null | 394 | property Item tabBar: null |
655 | 394 | 395 | ||
656 | === modified file 'modules/Ubuntu/Components/PageHeadConfiguration.qml' | |||
657 | --- modules/Ubuntu/Components/PageHeadConfiguration.qml 2014-07-01 11:27:29 +0000 | |||
658 | +++ modules/Ubuntu/Components/PageHeadConfiguration.qml 2014-07-24 02:10:07 +0000 | |||
659 | @@ -25,18 +25,48 @@ | |||
660 | 25 | 25 | ||
661 | 26 | For examples how to use Page.head, see \l Page. | 26 | For examples how to use Page.head, see \l Page. |
662 | 27 | */ | 27 | */ |
664 | 28 | QtObject { | 28 | Object { |
665 | 29 | // To be used inside a Page only. | 29 | // To be used inside a Page only. |
666 | 30 | id: headerConfig | 30 | id: headerConfig |
667 | 31 | 31 | ||
668 | 32 | /*! | 32 | /*! |
669 | 33 | List of actions to show in the header. | 33 | List of actions to show in the header. |
670 | 34 | |||
671 | 35 | Example: | ||
672 | 36 | \qml | ||
673 | 37 | Page { | ||
674 | 38 | title: "Custom header actions" | ||
675 | 39 | head.actions: [ | ||
676 | 40 | Action { | ||
677 | 41 | iconName: "save" | ||
678 | 42 | text: i18n.tr("Save") | ||
679 | 43 | }, | ||
680 | 44 | Action { | ||
681 | 45 | iconName: "add" | ||
682 | 46 | text: i18n.tr("Add") | ||
683 | 47 | } | ||
684 | 48 | ] | ||
685 | 49 | } | ||
686 | 50 | \endqml | ||
687 | 34 | */ | 51 | */ |
688 | 35 | property list<Action> actions | 52 | property list<Action> actions |
689 | 36 | 53 | ||
690 | 37 | /*! | 54 | /*! |
691 | 38 | Overrides the default \l PageStack back button and the | 55 | Overrides the default \l PageStack back button and the |
692 | 39 | \l Tabs drawer button in the header. | 56 | \l Tabs drawer button in the header. |
693 | 57 | |||
694 | 58 | Example: | ||
695 | 59 | \qml | ||
696 | 60 | Page { | ||
697 | 61 | title: "Back Action Page" | ||
698 | 62 | head.backAction: Action { | ||
699 | 63 | iconName: "close" | ||
700 | 64 | onTriggered: { | ||
701 | 65 | console.log("Run custom back action") | ||
702 | 66 | } | ||
703 | 67 | } | ||
704 | 68 | } | ||
705 | 69 | \endqml | ||
706 | 40 | */ | 70 | */ |
707 | 41 | property Action backAction: null | 71 | property Action backAction: null |
708 | 42 | 72 | ||
709 | @@ -52,7 +82,7 @@ | |||
710 | 52 | \qml | 82 | \qml |
711 | 53 | Page { | 83 | Page { |
712 | 54 | title: "Invisible title" | 84 | title: "Invisible title" |
714 | 55 | contents: Rectangle { | 85 | head.contents: Rectangle { |
715 | 56 | color: UbuntuColors.orange | 86 | color: UbuntuColors.orange |
716 | 57 | height: units.gu(5) | 87 | height: units.gu(5) |
717 | 58 | width: parent ? parent.width - units.gu(2) : undefined | 88 | width: parent ? parent.width - units.gu(2) : undefined |
718 | @@ -64,4 +94,13 @@ | |||
719 | 64 | be implemented. | 94 | be implemented. |
720 | 65 | */ | 95 | */ |
721 | 66 | property Item contents: null | 96 | property Item contents: null |
722 | 97 | |||
723 | 98 | /*! | ||
724 | 99 | \qmlproperty PageHeadSections sections | ||
725 | 100 | Defines the sections in the page header divider. | ||
726 | 101 | */ | ||
727 | 102 | readonly property alias sections: headSections | ||
728 | 103 | PageHeadSections { | ||
729 | 104 | id: headSections | ||
730 | 105 | } | ||
731 | 67 | } | 106 | } |
732 | 68 | 107 | ||
733 | === added file 'modules/Ubuntu/Components/PageHeadSections.qml' | |||
734 | --- modules/Ubuntu/Components/PageHeadSections.qml 1970-01-01 00:00:00 +0000 | |||
735 | +++ modules/Ubuntu/Components/PageHeadSections.qml 2014-07-24 02:10:07 +0000 | |||
736 | @@ -0,0 +1,74 @@ | |||
737 | 1 | /* | ||
738 | 2 | * Copyright 2014 Canonical Ltd. | ||
739 | 3 | * | ||
740 | 4 | * This program is free software; you can redistribute it and/or modify | ||
741 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
742 | 6 | * the Free Software Foundation; version 3. | ||
743 | 7 | * | ||
744 | 8 | * This program is distributed in the hope that it will be useful, | ||
745 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
746 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
747 | 11 | * GNU Lesser General Public License for more details. | ||
748 | 12 | * | ||
749 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
750 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
751 | 15 | */ | ||
752 | 16 | |||
753 | 17 | import QtQuick 2.2 | ||
754 | 18 | |||
755 | 19 | /*! | ||
756 | 20 | \qmltype PageHeadSections | ||
757 | 21 | \inqmlmodule Ubuntu.Components 1.1 | ||
758 | 22 | \ingroup ubuntu | ||
759 | 23 | \since Ubuntu.Components 1.1 | ||
760 | 24 | \brief PageHeadSections is used to configure the sections for a \l Page. | ||
761 | 25 | |||
762 | 26 | These sections will be shown in the bottom part of the header. This component does not | ||
763 | 27 | need to be instantiated by the developer, it is automatically part of \l PageHeadConfiguration. | ||
764 | 28 | */ | ||
765 | 29 | QtObject { | ||
766 | 30 | // To be used inside PageHeadConfiguration | ||
767 | 31 | id: sections | ||
768 | 32 | |||
769 | 33 | /*! | ||
770 | 34 | Set this property to false to disable user interaction to change the selected section. | ||
771 | 35 | Default value: true | ||
772 | 36 | */ | ||
773 | 37 | property bool enabled: true | ||
774 | 38 | |||
775 | 39 | /*! | ||
776 | 40 | List of strings that represent section names. Example: | ||
777 | 41 | \qml | ||
778 | 42 | import Ubuntu.Components 1.1 | ||
779 | 43 | import QtQuick 2.2 | ||
780 | 44 | |||
781 | 45 | MainView { | ||
782 | 46 | width: units.gu(50) | ||
783 | 47 | height: units.gu(80) | ||
784 | 48 | |||
785 | 49 | useDeprecatedToolbar: false | ||
786 | 50 | |||
787 | 51 | Page { | ||
788 | 52 | id: page | ||
789 | 53 | title: "Sections" | ||
790 | 54 | head { | ||
791 | 55 | sections { | ||
792 | 56 | model: ["one", "two", "three"] | ||
793 | 57 | } | ||
794 | 58 | } | ||
795 | 59 | |||
796 | 60 | Label { | ||
797 | 61 | anchors.centerIn: parent | ||
798 | 62 | text: "Section " + page.head.sections.selectedIndex | ||
799 | 63 | } | ||
800 | 64 | } | ||
801 | 65 | } | ||
802 | 66 | \endqml | ||
803 | 67 | */ | ||
804 | 68 | property var model | ||
805 | 69 | |||
806 | 70 | /*! | ||
807 | 71 | The index of the currently selected section in \l model. | ||
808 | 72 | */ | ||
809 | 73 | property int selectedIndex: model ? 0 : -1 | ||
810 | 74 | } | ||
811 | 0 | 75 | ||
812 | === modified file 'modules/Ubuntu/Components/Panel.qml' | |||
813 | --- modules/Ubuntu/Components/Panel.qml 2014-04-25 12:53:58 +0000 | |||
814 | +++ modules/Ubuntu/Components/Panel.qml 2014-07-24 02:10:07 +0000 | |||
815 | @@ -443,13 +443,13 @@ | |||
816 | 443 | \internal | 443 | \internal |
817 | 444 | \deprecated | 444 | \deprecated |
818 | 445 | Enable the InverseMouseArea that closes the panel when the user clicks outside of the panel. | 445 | Enable the InverseMouseArea that closes the panel when the user clicks outside of the panel. |
822 | 446 | This functionality moved to the Toolbar/Page implementation because the mouse area needs to | 446 | This functionality moved to the MainView to deal with Toolbar hiding, but this InverseMouseArea |
823 | 447 | access with the toolbar and header, but this InverseMouseArea is still in the Panel for backwards | 447 | is still in the Panel for backwards compatibility in apps that use it directly. |
824 | 448 | compatibility in apps that use it directly. Default value is true, but it is set to false in Toolbar. | 448 | Default value is false. |
825 | 449 | 449 | ||
826 | 450 | FIXME: Remove __closeOnContentsClicks and the IMA below when all apps use Toolbar instead of Panel. | 450 | FIXME: Remove __closeOnContentsClicks and the IMA below when all apps use Toolbar instead of Panel. |
827 | 451 | */ | 451 | */ |
829 | 452 | property bool __closeOnContentsClicks: true | 452 | property bool __closeOnContentsClicks: false |
830 | 453 | Toolkit.InverseMouseArea { | 453 | Toolkit.InverseMouseArea { |
831 | 454 | anchors.fill: draggingArea | 454 | anchors.fill: draggingArea |
832 | 455 | onPressed: { | 455 | onPressed: { |
833 | @@ -625,6 +625,7 @@ | |||
834 | 625 | 625 | ||
835 | 626 | Item { | 626 | Item { |
836 | 627 | id: bar | 627 | id: bar |
837 | 628 | objectName: "bar_item" | ||
838 | 628 | height: parent.height | 629 | height: parent.height |
839 | 629 | width: parent.width | 630 | width: parent.width |
840 | 630 | anchors { | 631 | anchors { |
841 | @@ -637,6 +638,7 @@ | |||
842 | 637 | property real size: internal.orientation === Qt.Horizontal ? height : width | 638 | property real size: internal.orientation === Qt.Horizontal ? height : width |
843 | 638 | //position will always be in the range 0..size, where position==0 means spread, position==size means hidden. | 639 | //position will always be in the range 0..size, where position==0 means spread, position==size means hidden. |
844 | 639 | property real position: panel.opened ? 0 : size | 640 | property real position: panel.opened ? 0 : size |
845 | 641 | onSizeChanged: position = panel.opened ? 0 : size | ||
846 | 640 | 642 | ||
847 | 641 | y: internal.align === Qt.AlignTop ? -position : internal.align === Qt.AlignBottom ? position : 0 | 643 | y: internal.align === Qt.AlignTop ? -position : internal.align === Qt.AlignBottom ? position : 0 |
848 | 642 | x: internal.align === Qt.AlignLeft ? -position : internal.align === Qt.AlignRight ? position : 0 | 644 | x: internal.align === Qt.AlignLeft ? -position : internal.align === Qt.AlignRight ? position : 0 |
849 | 643 | 645 | ||
850 | === renamed file 'modules/Ubuntu/Components/ProgressBar.qml' => 'modules/Ubuntu/Components/ProgressBar10.qml' | |||
851 | === added file 'modules/Ubuntu/Components/ProgressBar11.qdoc' | |||
852 | --- modules/Ubuntu/Components/ProgressBar11.qdoc 1970-01-01 00:00:00 +0000 | |||
853 | +++ modules/Ubuntu/Components/ProgressBar11.qdoc 2014-07-24 02:10:07 +0000 | |||
854 | @@ -0,0 +1,6 @@ | |||
855 | 1 | /*! | ||
856 | 2 | \qmlproperty bool ProgressBar::showProgressPercentage | ||
857 | 3 | \since Ubuntu.Components 1.1 | ||
858 | 4 | |||
859 | 5 | Specifies if the value of the progress is visible | ||
860 | 6 | */ | ||
861 | 0 | 7 | ||
862 | === added file 'modules/Ubuntu/Components/ProgressBar11.qml' | |||
863 | --- modules/Ubuntu/Components/ProgressBar11.qml 1970-01-01 00:00:00 +0000 | |||
864 | +++ modules/Ubuntu/Components/ProgressBar11.qml 2014-07-24 02:10:07 +0000 | |||
865 | @@ -0,0 +1,21 @@ | |||
866 | 1 | /* | ||
867 | 2 | * Copyright 2014 Canonical Ltd. | ||
868 | 3 | * | ||
869 | 4 | * This program is free software; you can redistribute it and/or modify | ||
870 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
871 | 6 | * the Free Software Foundation; version 3. | ||
872 | 7 | * | ||
873 | 8 | * This program is distributed in the hope that it will be useful, | ||
874 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
875 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
876 | 11 | * GNU Lesser General Public License for more details. | ||
877 | 12 | * | ||
878 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
879 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
880 | 15 | */ | ||
881 | 16 | |||
882 | 17 | import QtQuick 2.0 | ||
883 | 18 | |||
884 | 19 | ProgressBar { | ||
885 | 20 | property bool showProgressPercentage: true | ||
886 | 21 | } | ||
887 | 0 | 22 | ||
888 | === modified file 'modules/Ubuntu/Components/TextArea.qml' | |||
889 | --- modules/Ubuntu/Components/TextArea.qml 2014-06-28 17:26:49 +0000 | |||
890 | +++ modules/Ubuntu/Components/TextArea.qml 2014-07-24 02:10:07 +0000 | |||
891 | @@ -850,7 +850,7 @@ | |||
892 | 850 | } | 850 | } |
893 | 851 | color: control.__styleInstance.color | 851 | color: control.__styleInstance.color |
894 | 852 | selectedTextColor: Theme.palette.selected.foregroundText | 852 | selectedTextColor: Theme.palette.selected.foregroundText |
896 | 853 | selectionColor: Theme.palette.selected.foreground | 853 | selectionColor: Theme.palette.selected.selection |
897 | 854 | font.pixelSize: FontUtils.sizeToPixels("medium") | 854 | font.pixelSize: FontUtils.sizeToPixels("medium") |
898 | 855 | // forward keys to the root element so it can be captured outside of it | 855 | // forward keys to the root element so it can be captured outside of it |
899 | 856 | // as well as to InputHandler to handle PageUp/PageDown keys | 856 | // as well as to InputHandler to handle PageUp/PageDown keys |
900 | 857 | 857 | ||
901 | === modified file 'modules/Ubuntu/Components/TextField.qml' | |||
902 | --- modules/Ubuntu/Components/TextField.qml 2014-06-29 21:46:30 +0000 | |||
903 | +++ modules/Ubuntu/Components/TextField.qml 2014-07-24 02:10:07 +0000 | |||
904 | @@ -979,7 +979,7 @@ | |||
905 | 979 | } | 979 | } |
906 | 980 | color: control.__styleInstance.color | 980 | color: control.__styleInstance.color |
907 | 981 | selectedTextColor: Theme.palette.selected.foregroundText | 981 | selectedTextColor: Theme.palette.selected.foregroundText |
909 | 982 | selectionColor: Theme.palette.selected.foreground | 982 | selectionColor: Theme.palette.selected.selection |
910 | 983 | font.pixelSize: FontUtils.sizeToPixels("medium") | 983 | font.pixelSize: FontUtils.sizeToPixels("medium") |
911 | 984 | passwordCharacter: "\u2022" | 984 | passwordCharacter: "\u2022" |
912 | 985 | // forward keys to the root element so it can be captured outside of it | 985 | // forward keys to the root element so it can be captured outside of it |
913 | 986 | 986 | ||
914 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml' | |||
915 | --- modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml 2014-05-22 13:04:58 +0000 | |||
916 | +++ modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml 2014-07-24 02:10:07 +0000 | |||
917 | @@ -28,7 +28,12 @@ | |||
918 | 28 | verticalAlignment: Image.AlignVCenter | 28 | verticalAlignment: Image.AlignVCenter |
919 | 29 | source: "artwork/spinner.png" | 29 | source: "artwork/spinner.png" |
920 | 30 | 30 | ||
922 | 31 | RotationAnimator on rotation { | 31 | /* |
923 | 32 | Changed from RotationAnimator to RotationAnimation to | ||
924 | 33 | work around bug: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1338602 | ||
925 | 34 | "Activity Indicator crashes in QML/Widget mixed applications" | ||
926 | 35 | */ | ||
927 | 36 | RotationAnimation on rotation { | ||
928 | 32 | running: styledItem.running | 37 | running: styledItem.running |
929 | 33 | from: 0 | 38 | from: 0 |
930 | 34 | to: 360 | 39 | to: 360 |
931 | 35 | 40 | ||
932 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml' | |||
933 | --- modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml 2014-04-23 08:50:20 +0000 | |||
934 | +++ modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml 2014-07-24 02:10:07 +0000 | |||
935 | @@ -54,7 +54,7 @@ | |||
936 | 54 | } | 54 | } |
937 | 55 | PropertyChanges { | 55 | PropertyChanges { |
938 | 56 | target: background | 56 | target: background |
940 | 57 | color: Theme.palette.selected.foreground | 57 | color: UbuntuColors.green |
941 | 58 | } | 58 | } |
942 | 59 | }, | 59 | }, |
943 | 60 | State { | 60 | State { |
944 | 61 | 61 | ||
945 | === renamed file 'modules/Ubuntu/Components/Themes/Ambiance/HeaderButtonStyle.qml' => 'modules/Ubuntu/Components/Themes/Ambiance/PageHeadButton.qml' | |||
946 | --- modules/Ubuntu/Components/Themes/Ambiance/HeaderButtonStyle.qml 2014-05-01 15:31:38 +0000 | |||
947 | +++ modules/Ubuntu/Components/Themes/Ambiance/PageHeadButton.qml 2014-07-24 02:10:07 +0000 | |||
948 | @@ -14,30 +14,30 @@ | |||
949 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
950 | 15 | */ | 15 | */ |
951 | 16 | 16 | ||
953 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.2 |
954 | 18 | import Ubuntu.Components 1.1 | 18 | import Ubuntu.Components 1.1 |
955 | 19 | 19 | ||
964 | 20 | Item { | 20 | AbstractButton { |
965 | 21 | id: visuals | 21 | id: button |
966 | 22 | // styling properties | 22 | |
967 | 23 | property int iconWidth: units.gu(3) | 23 | property int iconWidth: units.gu(2) |
968 | 24 | property int iconHeight: units.gu(3) | 24 | property int iconHeight: iconWidth |
969 | 25 | 25 | ||
970 | 26 | width: units.gu(5) | 26 | width: visible ? units.gu(4) : 0 |
971 | 27 | height: units.gu(5) | 27 | height: parent ? parent.height : undefined |
972 | 28 | 28 | ||
973 | 29 | Image { | 29 | Image { |
974 | 30 | id: icon | 30 | id: icon |
975 | 31 | anchors { | 31 | anchors { |
976 | 32 | centerIn: parent | 32 | centerIn: parent |
977 | 33 | } | 33 | } |
982 | 34 | width: visuals.iconWidth | 34 | width: button.iconWidth |
983 | 35 | height: visuals.iconWidth | 35 | height: button.iconHeight |
984 | 36 | source: styledItem.iconSource | 36 | source: button.iconSource |
985 | 37 | opacity: styledItem.enabled ? 1.0 : 0.3 | 37 | opacity: button.enabled ? 1.0 : 0.3 |
986 | 38 | sourceSize { | 38 | sourceSize { |
989 | 39 | width: width | 39 | width: icon.width |
990 | 40 | height: height | 40 | height: icon.height |
991 | 41 | } | 41 | } |
992 | 42 | } | 42 | } |
993 | 43 | } | 43 | } |
994 | 44 | 44 | ||
995 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml' | |||
996 | --- modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml 2014-07-04 11:25:50 +0000 | |||
997 | +++ modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml 2014-07-24 02:10:07 +0000 | |||
998 | @@ -13,7 +13,7 @@ | |||
999 | 13 | * You should have received a copy of the GNU Lesser General Public License | 13 | * You should have received a copy of the GNU Lesser General Public License |
1000 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1001 | 15 | */ | 15 | */ |
1003 | 16 | import QtQuick 2.0 | 16 | import QtQuick 2.2 |
1004 | 17 | import Ubuntu.Components 1.1 | 17 | import Ubuntu.Components 1.1 |
1005 | 18 | import Ubuntu.Components.Popups 1.0 | 18 | import Ubuntu.Components.Popups 1.0 |
1006 | 19 | import Ubuntu.Components.ListItems 1.0 as ListItem | 19 | import Ubuntu.Components.ListItems 1.0 as ListItem |
1007 | @@ -32,6 +32,10 @@ | |||
1008 | 32 | 32 | ||
1009 | 33 | implicitHeight: headerStyle.contentHeight + separator.height + separatorBottom.height | 33 | implicitHeight: headerStyle.contentHeight + separator.height + separatorBottom.height |
1010 | 34 | 34 | ||
1011 | 35 | // FIXME: Workaround to get sectionsRepeater.count in autopilot tests, | ||
1012 | 36 | // see also FIXME in AppHeader where this property is used. | ||
1013 | 37 | property alias __sections_repeater_for_autopilot: sectionsRepeater | ||
1014 | 38 | |||
1015 | 35 | BorderImage { | 39 | BorderImage { |
1016 | 36 | id: separator | 40 | id: separator |
1017 | 37 | anchors { | 41 | anchors { |
1018 | @@ -40,6 +44,42 @@ | |||
1019 | 40 | right: parent.right | 44 | right: parent.right |
1020 | 41 | } | 45 | } |
1021 | 42 | source: headerStyle.separatorSource | 46 | source: headerStyle.separatorSource |
1022 | 47 | |||
1023 | 48 | property PageHeadSections sections: styledItem.config.sections | ||
1024 | 49 | |||
1025 | 50 | Row { | ||
1026 | 51 | id: sectionsRow | ||
1027 | 52 | property int itemWidth: sectionsRow.width / sectionsRepeater.count | ||
1028 | 53 | anchors.fill: parent | ||
1029 | 54 | enabled: separator.sections.enabled | ||
1030 | 55 | visible: separator.sections.model !== undefined | ||
1031 | 56 | opacity: enabled ? 1.0 : 0.5 | ||
1032 | 57 | |||
1033 | 58 | Repeater { | ||
1034 | 59 | id: sectionsRepeater | ||
1035 | 60 | model: separator.sections.model | ||
1036 | 61 | objectName: "page_head_sections_repeater" | ||
1037 | 62 | AbstractButton { | ||
1038 | 63 | id: sectionButton | ||
1039 | 64 | objectName: "section_button_" + index | ||
1040 | 65 | enabled: sectionsRow.enabled | ||
1041 | 66 | width: sectionsRow.itemWidth | ||
1042 | 67 | height: sectionsRow.height | ||
1043 | 68 | property bool selected: index === separator.sections.selectedIndex | ||
1044 | 69 | onClicked: separator.sections.selectedIndex = index; | ||
1045 | 70 | |||
1046 | 71 | Label { | ||
1047 | 72 | text: modelData | ||
1048 | 73 | fontSize: "small" | ||
1049 | 74 | anchors.fill: parent | ||
1050 | 75 | horizontalAlignment: Text.AlignHCenter | ||
1051 | 76 | color: sectionButton.selected ? | ||
1052 | 77 | Theme.palette.normal.backgroundText : | ||
1053 | 78 | Theme.palette.selected.backgroundText | ||
1054 | 79 | } | ||
1055 | 80 | } | ||
1056 | 81 | } | ||
1057 | 82 | } | ||
1058 | 43 | } | 83 | } |
1059 | 44 | Image { | 84 | Image { |
1060 | 45 | id: separatorBottom | 85 | id: separatorBottom |
1061 | @@ -56,26 +96,22 @@ | |||
1062 | 56 | anchors { | 96 | anchors { |
1063 | 57 | left: parent.left | 97 | left: parent.left |
1064 | 58 | top: parent.top | 98 | top: parent.top |
1065 | 99 | leftMargin: width > 0 ? units.gu(1) : 0 | ||
1066 | 59 | } | 100 | } |
1067 | 60 | width: childrenRect.width | 101 | width: childrenRect.width |
1068 | 61 | height: headerStyle.contentHeight | 102 | height: headerStyle.contentHeight |
1069 | 62 | 103 | ||
1071 | 63 | AbstractButton { | 104 | PageHeadButton { |
1072 | 64 | id: customBackButton | 105 | id: customBackButton |
1073 | 65 | objectName: "customBackButton" | 106 | objectName: "customBackButton" |
1074 | 66 | height: parent ? parent.height : undefined | ||
1075 | 67 | width: visible ? units.gu(5) : 0 | ||
1076 | 68 | action: styledItem.config.backAction | 107 | action: styledItem.config.backAction |
1077 | 69 | visible: null !== styledItem.config.backAction && | 108 | visible: null !== styledItem.config.backAction && |
1078 | 70 | styledItem.config.backAction.visible | 109 | styledItem.config.backAction.visible |
1079 | 71 | style: Theme.createStyleComponent("HeaderButtonStyle.qml", backButton) | ||
1080 | 72 | } | 110 | } |
1081 | 73 | 111 | ||
1083 | 74 | AbstractButton { | 112 | PageHeadButton { |
1084 | 75 | id: backButton | 113 | id: backButton |
1085 | 76 | objectName: "backButton" | 114 | objectName: "backButton" |
1086 | 77 | height: parent ? parent.height : undefined | ||
1087 | 78 | width: visible ? units.gu(5) : 0 | ||
1088 | 79 | 115 | ||
1089 | 80 | iconName: "back" | 116 | iconName: "back" |
1090 | 81 | visible: styledItem.pageStack !== null && | 117 | visible: styledItem.pageStack !== null && |
1091 | @@ -84,18 +120,15 @@ | |||
1092 | 84 | !customBackButton.visible | 120 | !customBackButton.visible |
1093 | 85 | 121 | ||
1094 | 86 | text: "back" | 122 | text: "back" |
1095 | 87 | style: Theme.createStyleComponent("HeaderButtonStyle.qml", backButton) | ||
1096 | 88 | 123 | ||
1097 | 89 | onTriggered: { | 124 | onTriggered: { |
1098 | 90 | styledItem.pageStack.pop(); | 125 | styledItem.pageStack.pop(); |
1099 | 91 | } | 126 | } |
1100 | 92 | } | 127 | } |
1101 | 93 | 128 | ||
1103 | 94 | AbstractButton { | 129 | PageHeadButton { |
1104 | 95 | id: tabsButton | 130 | id: tabsButton |
1105 | 96 | objectName: "tabsButton" | 131 | objectName: "tabsButton" |
1106 | 97 | height: parent ? parent.height : undefined | ||
1107 | 98 | width: visible ? units.gu(5) : 0 | ||
1108 | 99 | 132 | ||
1109 | 100 | iconName: "navigation-menu" | 133 | iconName: "navigation-menu" |
1110 | 101 | visible: styledItem.tabsModel !== null && | 134 | visible: styledItem.tabsModel !== null && |
1111 | @@ -103,7 +136,6 @@ | |||
1112 | 103 | !backButton.visible && | 136 | !backButton.visible && |
1113 | 104 | !customBackButton.visible | 137 | !customBackButton.visible |
1114 | 105 | text: visible ? styledItem.tabsModel.count + " tabs" : "" | 138 | text: visible ? styledItem.tabsModel.count + " tabs" : "" |
1115 | 106 | style: Theme.createStyleComponent("HeaderButtonStyle.qml", tabsButton) | ||
1116 | 107 | 139 | ||
1117 | 108 | onTriggered: { | 140 | onTriggered: { |
1118 | 109 | tabsPopover.show(); | 141 | tabsPopover.show(); |
1119 | @@ -220,29 +252,26 @@ | |||
1120 | 220 | anchors { | 252 | anchors { |
1121 | 221 | top: parent.top | 253 | top: parent.top |
1122 | 222 | right: parent.right | 254 | right: parent.right |
1123 | 255 | rightMargin: units.gu(1) | ||
1124 | 223 | } | 256 | } |
1125 | 224 | width: childrenRect.width | 257 | width: childrenRect.width |
1126 | 225 | height: headerStyle.contentHeight | 258 | height: headerStyle.contentHeight |
1127 | 226 | 259 | ||
1128 | 227 | Repeater { | 260 | Repeater { |
1129 | 228 | model: numberOfSlots.used | 261 | model: numberOfSlots.used |
1131 | 229 | AbstractButton { | 262 | PageHeadButton { |
1132 | 230 | id: actionButton | 263 | id: actionButton |
1133 | 231 | objectName: action.objectName + "_header_button" | 264 | objectName: action.objectName + "_header_button" |
1134 | 232 | action: actionsContainer.visibleActions[index] | 265 | action: actionsContainer.visibleActions[index] |
1135 | 233 | style: Theme.createStyleComponent("HeaderButtonStyle.qml", actionButton) | ||
1136 | 234 | width: units.gu(5) | ||
1137 | 235 | height: actionsContainer.height | ||
1138 | 236 | } | 266 | } |
1139 | 237 | } | 267 | } |
1140 | 238 | 268 | ||
1142 | 239 | AbstractButton { | 269 | PageHeadButton { |
1143 | 240 | id: actionsOverflowButton | 270 | id: actionsOverflowButton |
1144 | 241 | objectName: "actions_overflow_button" | 271 | objectName: "actions_overflow_button" |
1145 | 242 | visible: numberOfSlots.requested > numberOfSlots.right | 272 | visible: numberOfSlots.requested > numberOfSlots.right |
1146 | 243 | iconName: "contextual-menu" | 273 | iconName: "contextual-menu" |
1147 | 244 | width: visible ? units.gu(5) : 0 | 274 | width: visible ? units.gu(5) : 0 |
1148 | 245 | style: Theme.createStyleComponent("HeaderButtonStyle.qml", actionsOverflowButton) | ||
1149 | 246 | height: actionsContainer.height | 275 | height: actionsContainer.height |
1150 | 247 | onTriggered: actionsOverflowPopover.show() | 276 | onTriggered: actionsOverflowPopover.show() |
1151 | 248 | 277 | ||
1152 | 249 | 278 | ||
1153 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/Palette.qml' | |||
1154 | --- modules/Ubuntu/Components/Themes/Ambiance/Palette.qml 2013-07-05 12:21:32 +0000 | |||
1155 | +++ modules/Ubuntu/Components/Themes/Ambiance/Palette.qml 2014-07-24 02:10:07 +0000 | |||
1156 | @@ -15,20 +15,21 @@ | |||
1157 | 15 | */ | 15 | */ |
1158 | 16 | 16 | ||
1159 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1160 | 18 | import Ubuntu.Components 1.1 | ||
1161 | 18 | import Ubuntu.Components.Themes 0.1 | 19 | import Ubuntu.Components.Themes 0.1 |
1162 | 19 | 20 | ||
1163 | 20 | Palette { | 21 | Palette { |
1164 | 21 | normal: PaletteValues { | 22 | normal: PaletteValues { |
1165 | 22 | background: "#EDEDED" | 23 | background: "#EDEDED" |
1166 | 23 | backgroundText: "#81888888" | 24 | backgroundText: "#81888888" |
1170 | 24 | base: "#1A000000" | 25 | base: Qt.rgba(0, 0, 0, 0.1) |
1171 | 25 | baseText: "#888888" | 26 | baseText: UbuntuColors.lightGrey |
1172 | 26 | foreground: "#888888" | 27 | foreground: UbuntuColors.lightGrey |
1173 | 27 | foregroundText: "#F3F3E7" | 28 | foregroundText: "#F3F3E7" |
1174 | 28 | overlay: "#FDFDFD" | 29 | overlay: "#FDFDFD" |
1176 | 29 | overlayText: "#888888" | 30 | overlayText: UbuntuColors.lightGrey |
1177 | 30 | field: "#1A000000" | 31 | field: "#1A000000" |
1179 | 31 | fieldText: "#888888" | 32 | fieldText: UbuntuColors.darkGrey |
1180 | 32 | } | 33 | } |
1181 | 33 | selected: PaletteValues { | 34 | selected: PaletteValues { |
1182 | 34 | /* FIXME: 'background' does not come from design | 35 | /* FIXME: 'background' does not come from design |
1183 | @@ -36,10 +37,11 @@ | |||
1184 | 36 | that will go away with the new design. | 37 | that will go away with the new design. |
1185 | 37 | */ | 38 | */ |
1186 | 38 | background: "#B2E6E6E6" | 39 | background: "#B2E6E6E6" |
1190 | 39 | backgroundText: "#888888" | 40 | backgroundText: UbuntuColors.darkGrey |
1191 | 40 | foreground: "#DD4814" | 41 | selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.2) |
1192 | 41 | foregroundText: "#F3F3E7" | 42 | foreground: UbuntuColors.blue |
1193 | 43 | foregroundText: UbuntuColors.darkGrey | ||
1194 | 42 | field: "#FFFFFF" | 44 | field: "#FFFFFF" |
1196 | 43 | fieldText: "#888888" | 45 | fieldText: UbuntuColors.darkGrey |
1197 | 44 | } | 46 | } |
1198 | 45 | } | 47 | } |
1199 | 46 | 48 | ||
1200 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml' | |||
1201 | --- modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2014-04-23 08:50:20 +0000 | |||
1202 | +++ modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2014-07-24 02:10:07 +0000 | |||
1203 | @@ -20,7 +20,7 @@ | |||
1204 | 20 | Item { | 20 | Item { |
1205 | 21 | id: progressBarStyle | 21 | id: progressBarStyle |
1206 | 22 | 22 | ||
1208 | 23 | property ProgressBar progressBar: styledItem | 23 | property var progressBar: styledItem |
1209 | 24 | 24 | ||
1210 | 25 | implicitWidth: units.gu(38) | 25 | implicitWidth: units.gu(38) |
1211 | 26 | implicitHeight: units.gu(4) | 26 | implicitHeight: units.gu(4) |
1212 | @@ -56,6 +56,7 @@ | |||
1213 | 56 | color: Theme.palette.normal.baseText | 56 | color: Theme.palette.normal.baseText |
1214 | 57 | text: progressBar.indeterminate ? i18n.tr("In Progress") | 57 | text: progressBar.indeterminate ? i18n.tr("In Progress") |
1215 | 58 | : "%1%".arg(Number(progressBarStyle.progress * 100.0).toFixed(0)) | 58 | : "%1%".arg(Number(progressBarStyle.progress * 100.0).toFixed(0)) |
1216 | 59 | visible: !progressBar.hasOwnProperty("showProgressPercentage") || progressBar.showProgressPercentage | ||
1217 | 59 | 60 | ||
1218 | 60 | SequentialAnimation on opacity { | 61 | SequentialAnimation on opacity { |
1219 | 61 | loops: Animation.Infinite | 62 | loops: Animation.Infinite |
1220 | @@ -76,5 +77,6 @@ | |||
1221 | 76 | rightColor: Theme.palette.normal.baseText | 77 | rightColor: Theme.palette.normal.baseText |
1222 | 77 | progress: (progressBarStyle.progress * background.width - valueLabel.x) / valueLabel.width | 78 | progress: (progressBarStyle.progress * background.width - valueLabel.x) / valueLabel.width |
1223 | 78 | mirror: Qt.application.layoutDirection == Qt.RightToLeft | 79 | mirror: Qt.application.layoutDirection == Qt.RightToLeft |
1224 | 80 | visible: !progressBar.hasOwnProperty("showProgressPercentage") || progressBar.showProgressPercentage | ||
1225 | 79 | } | 81 | } |
1226 | 80 | } | 82 | } |
1227 | 81 | 83 | ||
1228 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml' | |||
1229 | --- modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml 2014-04-23 08:50:20 +0000 | |||
1230 | +++ modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml 2014-07-24 02:10:07 +0000 | |||
1231 | @@ -58,8 +58,8 @@ | |||
1232 | 58 | bottomMargin: switchStyle.thumbPadding | 58 | bottomMargin: switchStyle.thumbPadding |
1233 | 59 | } | 59 | } |
1234 | 60 | 60 | ||
1237 | 61 | color: styledItem.checked ? Theme.palette.selected.foreground | 61 | color: styledItem.checked ? UbuntuColors.green |
1238 | 62 | : Theme.palette.normal.foreground | 62 | : Qt.rgba(0, 0, 0, 0.2) |
1239 | 63 | 63 | ||
1240 | 64 | Behavior on x { | 64 | Behavior on x { |
1241 | 65 | UbuntuNumberAnimation { | 65 | UbuntuNumberAnimation { |
1242 | @@ -117,7 +117,7 @@ | |||
1243 | 117 | } | 117 | } |
1244 | 118 | progress: MathUtils.clamp((thumb.x - parent.x - x) / width, 0.0, 1.0) | 118 | progress: MathUtils.clamp((thumb.x - parent.x - x) / width, 0.0, 1.0) |
1245 | 119 | leftColor: "transparent" | 119 | leftColor: "transparent" |
1247 | 120 | rightColor: Theme.palette.selected.foregroundText | 120 | rightColor: Theme.palette.normal.foregroundText |
1248 | 121 | } | 121 | } |
1249 | 122 | } | 122 | } |
1250 | 123 | 123 | ||
1251 | @@ -138,7 +138,7 @@ | |||
1252 | 138 | source: "artwork/tick.png" | 138 | source: "artwork/tick.png" |
1253 | 139 | } | 139 | } |
1254 | 140 | progress: MathUtils.clamp((thumb.x + thumb.width - parent.x - x) / width, 0.0, 1.0) | 140 | progress: MathUtils.clamp((thumb.x + thumb.width - parent.x - x) / width, 0.0, 1.0) |
1256 | 141 | leftColor: Theme.palette.selected.foregroundText | 141 | leftColor: Theme.palette.normal.foregroundText |
1257 | 142 | rightColor: "transparent" | 142 | rightColor: "transparent" |
1258 | 143 | } | 143 | } |
1259 | 144 | } | 144 | } |
1260 | 145 | 145 | ||
1261 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml' | |||
1262 | --- modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml 2014-05-09 05:25:12 +0000 | |||
1263 | +++ modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml 2014-07-24 02:10:07 +0000 | |||
1264 | @@ -47,7 +47,7 @@ | |||
1265 | 47 | Component { | 47 | Component { |
1266 | 48 | id: delegate | 48 | id: delegate |
1267 | 49 | Rectangle { | 49 | Rectangle { |
1269 | 50 | width: units.dp(1) | 50 | width: units.dp(2) |
1270 | 51 | color: Theme.palette.selected.foreground | 51 | color: Theme.palette.selected.foreground |
1271 | 52 | visible: blinkTimer.timerShowCursor | 52 | visible: blinkTimer.timerShowCursor |
1272 | 53 | Timer { | 53 | Timer { |
1273 | @@ -70,7 +70,7 @@ | |||
1274 | 70 | // caretItem | 70 | // caretItem |
1275 | 71 | Image { | 71 | Image { |
1276 | 72 | id: caretItem | 72 | id: caretItem |
1278 | 73 | source: "artwork/teardrop-left.png" | 73 | source: "artwork/caret_noshadow.png" |
1279 | 74 | anchors { | 74 | anchors { |
1280 | 75 | top: parent.bottom | 75 | top: parent.bottom |
1281 | 76 | horizontalCenter: parent.horizontalCenter | 76 | horizontalCenter: parent.horizontalCenter |
1282 | 77 | 77 | ||
1283 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextSelectionEndCursorStyle.qml' | |||
1284 | --- modules/Ubuntu/Components/Themes/Ambiance/TextSelectionEndCursorStyle.qml 2014-05-09 05:25:12 +0000 | |||
1285 | +++ modules/Ubuntu/Components/Themes/Ambiance/TextSelectionEndCursorStyle.qml 2014-07-24 02:10:07 +0000 | |||
1286 | @@ -55,7 +55,7 @@ | |||
1287 | 55 | // caretItem | 55 | // caretItem |
1288 | 56 | Image { | 56 | Image { |
1289 | 57 | id: caretItem | 57 | id: caretItem |
1291 | 58 | source: "artwork/teardrop-left.png" | 58 | source: "artwork/caret_noshadow.png" |
1292 | 59 | anchors { | 59 | anchors { |
1293 | 60 | top: parent.bottom | 60 | top: parent.bottom |
1294 | 61 | horizontalCenter: parent.horizontalCenter | 61 | horizontalCenter: parent.horizontalCenter |
1295 | 62 | 62 | ||
1296 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextSelectionStartCursorStyle.qml' | |||
1297 | --- modules/Ubuntu/Components/Themes/Ambiance/TextSelectionStartCursorStyle.qml 2014-05-13 08:00:18 +0000 | |||
1298 | +++ modules/Ubuntu/Components/Themes/Ambiance/TextSelectionStartCursorStyle.qml 2014-07-24 02:10:07 +0000 | |||
1299 | @@ -55,12 +55,13 @@ | |||
1300 | 55 | // caretItem | 55 | // caretItem |
1301 | 56 | Image { | 56 | Image { |
1302 | 57 | id: caretItem | 57 | id: caretItem |
1304 | 58 | source: "artwork/teardrop-right.png" | 58 | source: "artwork/caret_noshadow.png" |
1305 | 59 | anchors { | 59 | anchors { |
1307 | 60 | top: parent.bottom | 60 | bottom: parent.top |
1308 | 61 | horizontalCenter: parent.horizontalCenter | 61 | horizontalCenter: parent.horizontalCenter |
1309 | 62 | topMargin: -units.gu(0.5) | 62 | topMargin: -units.gu(0.5) |
1310 | 63 | horizontalCenterOffset: LayoutMirroring.enabled ? -(units.gu(0.7) - caretItem.width) : -units.gu(0.7) | 63 | horizontalCenterOffset: LayoutMirroring.enabled ? -(units.gu(0.7) - caretItem.width) : -units.gu(0.7) |
1311 | 64 | } | 64 | } |
1312 | 65 | rotation: 180 | ||
1313 | 65 | } | 66 | } |
1314 | 66 | } | 67 | } |
1315 | 67 | 68 | ||
1316 | === added file 'modules/Ubuntu/Components/Themes/Ambiance/artwork/caret_noshadow@27.png' | |||
1317 | 68 | Binary files modules/Ubuntu/Components/Themes/Ambiance/artwork/caret_noshadow@27.png 1970-01-01 00:00:00 +0000 and modules/Ubuntu/Components/Themes/Ambiance/artwork/caret_noshadow@27.png 2014-07-24 02:10:07 +0000 differ | 69 | Binary files modules/Ubuntu/Components/Themes/Ambiance/artwork/caret_noshadow@27.png 1970-01-01 00:00:00 +0000 and modules/Ubuntu/Components/Themes/Ambiance/artwork/caret_noshadow@27.png 2014-07-24 02:10:07 +0000 differ |
1318 | === removed file 'modules/Ubuntu/Components/Themes/Ambiance/artwork/teardrop-left@20.png' | |||
1319 | 69 | Binary files modules/Ubuntu/Components/Themes/Ambiance/artwork/teardrop-left@20.png 2014-04-25 08:18:46 +0000 and modules/Ubuntu/Components/Themes/Ambiance/artwork/teardrop-left@20.png 1970-01-01 00:00:00 +0000 differ | 70 | Binary files modules/Ubuntu/Components/Themes/Ambiance/artwork/teardrop-left@20.png 2014-04-25 08:18:46 +0000 and modules/Ubuntu/Components/Themes/Ambiance/artwork/teardrop-left@20.png 1970-01-01 00:00:00 +0000 differ |
1320 | === removed file 'modules/Ubuntu/Components/Themes/Ambiance/artwork/teardrop-right@20.png' | |||
1321 | 70 | Binary files modules/Ubuntu/Components/Themes/Ambiance/artwork/teardrop-right@20.png 2014-04-25 08:18:46 +0000 and modules/Ubuntu/Components/Themes/Ambiance/artwork/teardrop-right@20.png 1970-01-01 00:00:00 +0000 differ | 71 | Binary files modules/Ubuntu/Components/Themes/Ambiance/artwork/teardrop-right@20.png 2014-04-25 08:18:46 +0000 and modules/Ubuntu/Components/Themes/Ambiance/artwork/teardrop-right@20.png 1970-01-01 00:00:00 +0000 differ |
1322 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/qmldir' | |||
1323 | --- modules/Ubuntu/Components/Themes/Ambiance/qmldir 2014-06-30 10:49:51 +0000 | |||
1324 | +++ modules/Ubuntu/Components/Themes/Ambiance/qmldir 2014-07-24 02:10:07 +0000 | |||
1325 | @@ -4,7 +4,7 @@ | |||
1326 | 4 | internal CheckBoxStyle CheckBoxStyle.qml | 4 | internal CheckBoxStyle CheckBoxStyle.qml |
1327 | 5 | internal DialogForegroundStyle DialogForegroundStyle.qml | 5 | internal DialogForegroundStyle DialogForegroundStyle.qml |
1328 | 6 | internal HeaderStyle HeaderStyle.qml | 6 | internal HeaderStyle HeaderStyle.qml |
1330 | 7 | internal HeaderButtonStyle HeaderButtonStyle.qml | 7 | internal PageHeadButton PageHeadButton.qml |
1331 | 8 | MainViewStyle 0.1 MainViewStyle.qml | 8 | MainViewStyle 0.1 MainViewStyle.qml |
1332 | 9 | ListItemOptionSelector 0.1 ListItemOptionSelector.qml | 9 | ListItemOptionSelector 0.1 ListItemOptionSelector.qml |
1333 | 10 | OptionSelectorStyle 0.1 OptionSelectorStyle.qml | 10 | OptionSelectorStyle 0.1 OptionSelectorStyle.qml |
1334 | 11 | 11 | ||
1335 | === modified file 'modules/Ubuntu/Components/Themes/PaletteValues.qml' | |||
1336 | --- modules/Ubuntu/Components/Themes/PaletteValues.qml 2013-07-05 16:04:07 +0000 | |||
1337 | +++ modules/Ubuntu/Components/Themes/PaletteValues.qml 2014-07-24 02:10:07 +0000 | |||
1338 | @@ -69,4 +69,8 @@ | |||
1339 | 69 | Typically used for labels and images. | 69 | Typically used for labels and images. |
1340 | 70 | */ | 70 | */ |
1341 | 71 | property color fieldText | 71 | property color fieldText |
1342 | 72 | /*! | ||
1343 | 73 | Color applied to selected text in editable components. | ||
1344 | 74 | */ | ||
1345 | 75 | property color selection | ||
1346 | 72 | } | 76 | } |
1347 | 73 | 77 | ||
1348 | === modified file 'modules/Ubuntu/Components/Themes/SuruDark/Palette.qml' | |||
1349 | --- modules/Ubuntu/Components/Themes/SuruDark/Palette.qml 2013-07-05 14:34:00 +0000 | |||
1350 | +++ modules/Ubuntu/Components/Themes/SuruDark/Palette.qml 2014-07-24 02:10:07 +0000 | |||
1351 | @@ -15,6 +15,7 @@ | |||
1352 | 15 | */ | 15 | */ |
1353 | 16 | 16 | ||
1354 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1355 | 18 | import Ubuntu.Components 1.1 | ||
1356 | 18 | import Ubuntu.Components.Themes 0.1 | 19 | import Ubuntu.Components.Themes 0.1 |
1357 | 19 | 20 | ||
1358 | 20 | Palette { | 21 | Palette { |
1359 | @@ -33,8 +34,9 @@ | |||
1360 | 33 | selected: PaletteValues { | 34 | selected: PaletteValues { |
1361 | 34 | background: "#88D6D6D6" // FIXME: not from design | 35 | background: "#88D6D6D6" // FIXME: not from design |
1362 | 35 | backgroundText: "#F3F3E7" | 36 | backgroundText: "#F3F3E7" |
1365 | 36 | foreground: "#DD4814" | 37 | selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.2) |
1366 | 37 | foregroundText: "#F3F3E7" | 38 | foreground: UbuntuColors.blue |
1367 | 39 | foregroundText: UbuntuColors.darkGrey | ||
1368 | 38 | field: "#FFFFFF" | 40 | field: "#FFFFFF" |
1369 | 39 | fieldText: "#888888" | 41 | fieldText: "#888888" |
1370 | 40 | } | 42 | } |
1371 | 41 | 43 | ||
1372 | === modified file 'modules/Ubuntu/Components/deployment.pri' | |||
1373 | --- modules/Ubuntu/Components/deployment.pri 2014-04-29 05:39:04 +0000 | |||
1374 | +++ modules/Ubuntu/Components/deployment.pri 2014-07-24 02:10:07 +0000 | |||
1375 | @@ -52,6 +52,6 @@ | |||
1376 | 52 | # Silence spam on stderr due to fonts | 52 | # Silence spam on stderr due to fonts |
1377 | 53 | # https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1256999 | 53 | # https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1256999 |
1378 | 54 | # https://bugreports.qt-project.org/browse/QTBUG-36243 | 54 | # https://bugreports.qt-project.org/browse/QTBUG-36243 |
1380 | 55 | plugins_qmltypes.extra = $$[QT_INSTALL_BINS]/qmlplugindump -notrelocatable Ubuntu.Components 0.1 ../../ 2>/dev/null > $(INSTALL_ROOT)/$$installPath/plugins.qmltypes | 55 | plugins_qmltypes.extra = ALARM_BACKEND=memory $$[QT_INSTALL_BINS]/qmlplugindump -notrelocatable Ubuntu.Components 0.1 ../../ 2>/dev/null > $(INSTALL_ROOT)/$$installPath/plugins.qmltypes |
1381 | 56 | 56 | ||
1382 | 57 | INSTALLS += qmldir_file qml_files js_files artwork_files listitems_files listitems_artwork_files popups_files picker_files styles_files plugins_qmltypes | 57 | INSTALLS += qmldir_file qml_files js_files artwork_files listitems_files listitems_artwork_files popups_files picker_files styles_files plugins_qmltypes |
1383 | 58 | 58 | ||
1384 | === modified file 'modules/Ubuntu/Components/plugin/adapters/alarmsadapter_organizer.cpp' | |||
1385 | --- modules/Ubuntu/Components/plugin/adapters/alarmsadapter_organizer.cpp 2014-04-17 14:05:49 +0000 | |||
1386 | +++ modules/Ubuntu/Components/plugin/adapters/alarmsadapter_organizer.cpp 2014-07-24 02:10:07 +0000 | |||
1387 | @@ -57,17 +57,14 @@ | |||
1388 | 57 | , fetchRequest(0) | 57 | , fetchRequest(0) |
1389 | 58 | { | 58 | { |
1390 | 59 | QString envManager(qgetenv("ALARM_BACKEND")); | 59 | QString envManager(qgetenv("ALARM_BACKEND")); |
1396 | 60 | if (!envManager.isEmpty() && QOrganizerManager::availableManagers().contains(envManager)) { | 60 | if (envManager.isEmpty()) |
1397 | 61 | manager = new QOrganizerManager(envManager); | 61 | envManager = ALARM_MANAGER; |
1398 | 62 | } else { | 62 | if (!QOrganizerManager::availableManagers().contains(envManager)) { |
1399 | 63 | manager = QOrganizerManager::availableManagers().contains(ALARM_MANAGER) ? | 63 | qWarning() << "WARNING: alarm manager" << envManager << "not installed, using" << QString(ALARM_MANAGER_FALLBACK); |
1400 | 64 | new QOrganizerManager(ALARM_MANAGER) : new QOrganizerManager(ALARM_MANAGER_FALLBACK); | 64 | envManager = ALARM_MANAGER_FALLBACK; |
1401 | 65 | } | 65 | } |
1402 | 66 | manager = new QOrganizerManager(envManager); | ||
1403 | 66 | manager->setParent(q_ptr); | 67 | manager->setParent(q_ptr); |
1404 | 67 | if (manager->managerName() != ALARM_MANAGER) { | ||
1405 | 68 | qWarning() << "WARNING: default alarm manager not installed, using" << manager->managerName() << "manager."; | ||
1406 | 69 | qWarning() << "This manager may not provide all the needed features."; | ||
1407 | 70 | } | ||
1408 | 71 | 68 | ||
1409 | 72 | QList<QOrganizerCollection> collections = manager->collections(); | 69 | QList<QOrganizerCollection> collections = manager->collections(); |
1410 | 73 | if (collections.count() > 0) { | 70 | if (collections.count() > 0) { |
1411 | 74 | 71 | ||
1412 | === modified file 'modules/Ubuntu/Components/plugin/plugin.cpp' | |||
1413 | --- modules/Ubuntu/Components/plugin/plugin.cpp 2014-06-10 11:47:09 +0000 | |||
1414 | +++ modules/Ubuntu/Components/plugin/plugin.cpp 2014-07-24 02:10:07 +0000 | |||
1415 | @@ -92,7 +92,14 @@ | |||
1416 | 92 | return uriHandler; | 92 | return uriHandler; |
1417 | 93 | } | 93 | } |
1418 | 94 | 94 | ||
1420 | 95 | static QObject *registerUbuntuColors(QQmlEngine *engine, QJSEngine *scriptEngine) | 95 | static QObject *registerUbuntuColors10(QQmlEngine *engine, QJSEngine *scriptEngine) |
1421 | 96 | { | ||
1422 | 97 | Q_UNUSED(scriptEngine) | ||
1423 | 98 | return UbuntuComponentsPlugin::registerQmlSingletonType(engine, | ||
1424 | 99 | "Ubuntu.Components", "Colors/UbuntuColors10.qml"); | ||
1425 | 100 | } | ||
1426 | 101 | |||
1427 | 102 | static QObject *registerUbuntuColors11(QQmlEngine *engine, QJSEngine *scriptEngine) | ||
1428 | 96 | { | 103 | { |
1429 | 97 | Q_UNUSED(scriptEngine) | 104 | Q_UNUSED(scriptEngine) |
1430 | 98 | return UbuntuComponentsPlugin::registerQmlSingletonType(engine, | 105 | return UbuntuComponentsPlugin::registerQmlSingletonType(engine, |
1431 | @@ -154,7 +161,7 @@ | |||
1432 | 154 | 161 | ||
1433 | 155 | void UbuntuComponentsPlugin::registerTypesToVersion(const char *uri, int major, int minor) | 162 | void UbuntuComponentsPlugin::registerTypesToVersion(const char *uri, int major, int minor) |
1434 | 156 | { | 163 | { |
1436 | 157 | qmlRegisterSingletonType<QObject>(uri, major, minor, "UbuntuColors", registerUbuntuColors); | 164 | qmlRegisterSingletonType<QObject>(uri, major, minor, "UbuntuColors", registerUbuntuColors10); |
1437 | 158 | qmlRegisterUncreatableType<UbuntuI18n>(uri, major, minor, "i18n", "Singleton object"); | 165 | qmlRegisterUncreatableType<UbuntuI18n>(uri, major, minor, "i18n", "Singleton object"); |
1438 | 159 | qmlRegisterExtendedType<QQuickImageBase, UCQQuickImageExtension>(uri, major, minor, "QQuickImageBase"); | 166 | qmlRegisterExtendedType<QQuickImageBase, UCQQuickImageExtension>(uri, major, minor, "QQuickImageBase"); |
1439 | 160 | qmlRegisterUncreatableType<UCUnits>(uri, major, minor, "UCUnits", "Not instantiable"); | 167 | qmlRegisterUncreatableType<UCUnits>(uri, major, minor, "UCUnits", "Not instantiable"); |
1440 | @@ -184,6 +191,7 @@ | |||
1441 | 184 | // register 0.1 for backward compatibility | 191 | // register 0.1 for backward compatibility |
1442 | 185 | registerTypesToVersion(uri, 0, 1); | 192 | registerTypesToVersion(uri, 0, 1); |
1443 | 186 | registerTypesToVersion(uri, 1, 0); | 193 | registerTypesToVersion(uri, 1, 0); |
1444 | 194 | qmlRegisterSingletonType<QObject>(uri, 1, 1, "UbuntuColors", registerUbuntuColors11); | ||
1445 | 187 | 195 | ||
1446 | 188 | // register custom event | 196 | // register custom event |
1447 | 189 | ForwardedEvent::registerForwardedEvent(); | 197 | ForwardedEvent::registerForwardedEvent(); |
1448 | 190 | 198 | ||
1449 | === modified file 'modules/Ubuntu/Components/plugin/ucfontutils.cpp' | |||
1450 | --- modules/Ubuntu/Components/plugin/ucfontutils.cpp 2014-04-23 08:50:20 +0000 | |||
1451 | +++ modules/Ubuntu/Components/plugin/ucfontutils.cpp 2014-07-24 02:10:07 +0000 | |||
1452 | @@ -83,17 +83,17 @@ | |||
1453 | 83 | qreal UCFontUtils::modularScale(const QString &size) | 83 | qreal UCFontUtils::modularScale(const QString &size) |
1454 | 84 | { | 84 | { |
1455 | 85 | if (size == "xx-small") { | 85 | if (size == "xx-small") { |
1457 | 86 | return 0.606; | 86 | return 0.677; |
1458 | 87 | } else if (size == "x-small") { | 87 | } else if (size == "x-small") { |
1460 | 88 | return 0.707; | 88 | return 0.804; |
1461 | 89 | } else if (size == "small") { | 89 | } else if (size == "small") { |
1463 | 90 | return 0.857; | 90 | return 0.931; |
1464 | 91 | } else if (size == "medium") { | 91 | } else if (size == "medium") { |
1466 | 92 | return 1.0; | 92 | return 1.079; |
1467 | 93 | } else if (size == "large") { | 93 | } else if (size == "large") { |
1469 | 94 | return 1.414; | 94 | return 1.291; |
1470 | 95 | } else if (size == "x-large") { | 95 | } else if (size == "x-large") { |
1472 | 96 | return 1.905; | 96 | return 1.714; |
1473 | 97 | } | 97 | } |
1474 | 98 | return 0.0; | 98 | return 0.0; |
1475 | 99 | } | 99 | } |
1476 | 100 | 100 | ||
1477 | === modified file 'modules/Ubuntu/Components/qmldir' | |||
1478 | --- modules/Ubuntu/Components/qmldir 2014-07-03 13:59:52 +0000 | |||
1479 | +++ modules/Ubuntu/Components/qmldir 2014-07-24 02:10:07 +0000 | |||
1480 | @@ -15,7 +15,7 @@ | |||
1481 | 15 | Label 0.1 Label.qml | 15 | Label 0.1 Label.qml |
1482 | 16 | AbstractButton 0.1 AbstractButton.qml | 16 | AbstractButton 0.1 AbstractButton.qml |
1483 | 17 | ActivityIndicator 0.1 ActivityIndicator.qml | 17 | ActivityIndicator 0.1 ActivityIndicator.qml |
1485 | 18 | ProgressBar 0.1 ProgressBar.qml | 18 | ProgressBar 0.1 ProgressBar10.qml |
1486 | 19 | TextField 0.1 TextField.qml | 19 | TextField 0.1 TextField.qml |
1487 | 20 | TextArea 0.1 TextArea.qml | 20 | TextArea 0.1 TextArea.qml |
1488 | 21 | Switch 0.1 Switch.qml | 21 | Switch 0.1 Switch.qml |
1489 | @@ -65,7 +65,7 @@ | |||
1490 | 65 | Label 1.0 Label.qml | 65 | Label 1.0 Label.qml |
1491 | 66 | AbstractButton 1.0 AbstractButton.qml | 66 | AbstractButton 1.0 AbstractButton.qml |
1492 | 67 | ActivityIndicator 1.0 ActivityIndicator.qml | 67 | ActivityIndicator 1.0 ActivityIndicator.qml |
1494 | 68 | ProgressBar 1.0 ProgressBar.qml | 68 | ProgressBar 1.0 ProgressBar10.qml |
1495 | 69 | TextField 1.0 TextField.qml | 69 | TextField 1.0 TextField.qml |
1496 | 70 | TextArea 1.0 TextArea.qml | 70 | TextArea 1.0 TextArea.qml |
1497 | 71 | Switch 1.0 Switch.qml | 71 | Switch 1.0 Switch.qml |
1498 | @@ -93,10 +93,12 @@ | |||
1499 | 93 | 93 | ||
1500 | 94 | #version 1.1 | 94 | #version 1.1 |
1501 | 95 | ComboButton 1.1 ComboButton.qml | 95 | ComboButton 1.1 ComboButton.qml |
1502 | 96 | ProgressBar 1.1 ProgressBar11.qml | ||
1503 | 96 | CrossFadeImage 1.1 CrossFadeImage11.qml | 97 | CrossFadeImage 1.1 CrossFadeImage11.qml |
1504 | 97 | PullToRefresh 1.1 PullToRefresh.qml | 98 | PullToRefresh 1.1 PullToRefresh.qml |
1505 | 98 | UbuntuListView 1.1 UbuntuListView11.qml | 99 | UbuntuListView 1.1 UbuntuListView11.qml |
1506 | 99 | internal PageBase Page10.qml | 100 | internal PageBase Page10.qml |
1507 | 100 | Page 1.1 Page11.qml | 101 | Page 1.1 Page11.qml |
1508 | 101 | PageHeadConfiguration 1.1 PageHeadConfiguration.qml | 102 | PageHeadConfiguration 1.1 PageHeadConfiguration.qml |
1509 | 103 | PageHeadSections 1.1 PageHeadSections.qml | ||
1510 | 102 | PageHeadState 1.1 PageHeadState.qml | 104 | PageHeadState 1.1 PageHeadState.qml |
1511 | 103 | 105 | ||
1512 | === modified file 'modules/Ubuntu/Test/UbuntuTestCase.qml' | |||
1513 | --- modules/Ubuntu/Test/UbuntuTestCase.qml 2014-06-19 08:15:49 +0000 | |||
1514 | +++ modules/Ubuntu/Test/UbuntuTestCase.qml 2014-07-24 02:10:07 +0000 | |||
1515 | @@ -223,5 +223,14 @@ | |||
1516 | 223 | throw new Error("QtQuickTest::fail") | 223 | throw new Error("QtQuickTest::fail") |
1517 | 224 | } | 224 | } |
1518 | 225 | } | 225 | } |
1520 | 226 | } | 226 | |
1521 | 227 | /*! | ||
1522 | 228 | Convenience function to allow typing a full string instead of single characters | ||
1523 | 229 | */ | ||
1524 | 230 | function typeString(string) { | ||
1525 | 231 | for (var i = 0; i < string.length; i++) { | ||
1526 | 232 | keyClick(string[i]); | ||
1527 | 233 | } | ||
1528 | 234 | } | ||
1529 | 235 | } | ||
1530 | 227 | 236 | ||
1531 | 228 | 237 | ||
1532 | === modified file 'push_to_phone.sh' | |||
1533 | --- push_to_phone.sh 2014-05-30 09:59:17 +0000 | |||
1534 | +++ push_to_phone.sh 2014-07-24 02:10:07 +0000 | |||
1535 | @@ -30,6 +30,8 @@ | |||
1536 | 30 | echo modules/$i '->' /usr/lib/$ARCH/qt5/qml/Ubuntu/Components/ | 30 | echo modules/$i '->' /usr/lib/$ARCH/qt5/qml/Ubuntu/Components/ |
1537 | 31 | adb push $i /usr/lib/$ARCH/qt5/qml/Ubuntu/Components/ | 31 | adb push $i /usr/lib/$ARCH/qt5/qml/Ubuntu/Components/ |
1538 | 32 | done | 32 | done |
1539 | 33 | echo modules/Ubuntu/Components/qmldir '->' /usr/lib/$ARCH/qt5/qml/Ubuntu/Components/ | ||
1540 | 34 | adb push Ubuntu/Components/qmldir /usr/lib/$ARCH/qt5/qml/Ubuntu/Components/ | ||
1541 | 33 | cd .. | 35 | cd .. |
1542 | 34 | for i in ListItems Pickers Popups Colors Styles Themes artwork; do | 36 | for i in ListItems Pickers Popups Colors Styles Themes artwork; do |
1543 | 35 | adb push modules/Ubuntu/Components/$i/ /usr/lib/$ARCH/qt5/qml/Ubuntu/Components/$i || exit 1 | 37 | adb push modules/Ubuntu/Components/$i/ /usr/lib/$ARCH/qt5/qml/Ubuntu/Components/$i || exit 1 |
1544 | 36 | 38 | ||
1545 | === modified file 'tests/autopilot/ubuntuuitoolkit/__init__.py' | |||
1546 | --- tests/autopilot/ubuntuuitoolkit/__init__.py 2014-06-30 10:49:51 +0000 | |||
1547 | +++ tests/autopilot/ubuntuuitoolkit/__init__.py 2014-07-24 02:10:07 +0000 | |||
1548 | @@ -41,6 +41,7 @@ | |||
1549 | 41 | 'TextField', | 41 | 'TextField', |
1550 | 42 | 'Toolbar', | 42 | 'Toolbar', |
1551 | 43 | 'ToolkitException', | 43 | 'ToolkitException', |
1552 | 44 | 'ubuntu_scenarios', | ||
1553 | 44 | 'UbuntuListView11', | 45 | 'UbuntuListView11', |
1554 | 45 | 'UbuntuUIToolkitCustomProxyObjectBase', | 46 | 'UbuntuUIToolkitCustomProxyObjectBase', |
1555 | 46 | ] | 47 | ] |
1556 | @@ -52,6 +53,7 @@ | |||
1557 | 52 | environment, | 53 | environment, |
1558 | 53 | fixture_setup, | 54 | fixture_setup, |
1559 | 54 | tests, | 55 | tests, |
1560 | 56 | ubuntu_scenarios | ||
1561 | 55 | ) | 57 | ) |
1562 | 56 | from ubuntuuitoolkit._custom_proxy_objects import ( | 58 | from ubuntuuitoolkit._custom_proxy_objects import ( |
1563 | 57 | AppHeader, | 59 | AppHeader, |
1564 | 58 | 60 | ||
1565 | === modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py' | |||
1566 | --- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py 2014-06-04 22:17:49 +0000 | |||
1567 | +++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py 2014-07-24 02:10:07 +0000 | |||
1568 | @@ -52,14 +52,44 @@ | |||
1569 | 52 | self.pointing_device.drag(start_x, start_y, stop_x, stop_y) | 52 | self.pointing_device.drag(start_x, start_y, stop_x, stop_y) |
1570 | 53 | self.y.wait_for(0) | 53 | self.y.wait_for(0) |
1571 | 54 | 54 | ||
1572 | 55 | @autopilot_logging.log_action(logger.info) | ||
1573 | 56 | def switch_to_section_by_index(self, index): | ||
1574 | 57 | """Select a section in the header divider | ||
1575 | 58 | |||
1576 | 59 | :parameter index: The index of the section to select | ||
1577 | 60 | :raise ToolkitEmulatorException: If the selection index is out of | ||
1578 | 61 | range or useDeprecatedToolbar is set. | ||
1579 | 62 | |||
1580 | 63 | """ | ||
1581 | 64 | self._show_if_not_visible() | ||
1582 | 65 | |||
1583 | 66 | if self.useDeprecatedToolbar: | ||
1584 | 67 | raise _common.ToolkitException('Old header has no sections') | ||
1585 | 68 | |||
1586 | 69 | try: | ||
1587 | 70 | object_name = "section_button_" + str(index) | ||
1588 | 71 | button = self.select_single(objectName=object_name) | ||
1589 | 72 | except dbus.StateNotFoundError: | ||
1590 | 73 | raise _common.ToolkitException( | ||
1591 | 74 | 'Button for section with given index not found') | ||
1592 | 75 | |||
1593 | 76 | self.pointing_device.click_object(button) | ||
1594 | 77 | |||
1595 | 78 | def get_selected_section_index(self): | ||
1596 | 79 | if self.useDeprecatedToolbar: | ||
1597 | 80 | raise _common.ToolkitException('Old header has no sections') | ||
1598 | 81 | |||
1599 | 82 | sectionsProperties = self.select_single( | ||
1600 | 83 | 'QQuickItem', objectName='sectionsProperties') | ||
1601 | 84 | return sectionsProperties.selectedIndex | ||
1602 | 85 | |||
1603 | 55 | def click_back_button(self): | 86 | def click_back_button(self): |
1604 | 56 | self._show_if_not_visible() | 87 | self._show_if_not_visible() |
1605 | 57 | 88 | ||
1606 | 58 | if self.useDeprecatedToolbar: | 89 | if self.useDeprecatedToolbar: |
1607 | 59 | raise _common.ToolkitException('Old header has no back button') | 90 | raise _common.ToolkitException('Old header has no back button') |
1608 | 60 | try: | 91 | try: |
1611 | 61 | back_button = self.select_single( | 92 | back_button = self.select_single(objectName='backButton') |
1610 | 62 | 'AbstractButton', objectName='backButton') | ||
1612 | 63 | except dbus.StateNotFoundError: | 93 | except dbus.StateNotFoundError: |
1613 | 64 | raise _common.ToolkitException('Missing back button in header') | 94 | raise _common.ToolkitException('Missing back button in header') |
1614 | 65 | if not back_button.visible: | 95 | if not back_button.visible: |
1615 | @@ -74,7 +104,7 @@ | |||
1616 | 74 | 'Old header has no custom back button') | 104 | 'Old header has no custom back button') |
1617 | 75 | try: | 105 | try: |
1618 | 76 | custom_back_button = self.select_single( | 106 | custom_back_button = self.select_single( |
1620 | 77 | 'AbstractButton', objectName='customBackButton') | 107 | objectName='customBackButton') |
1621 | 78 | except dbus.StateNotFoundError: | 108 | except dbus.StateNotFoundError: |
1622 | 79 | raise _common.ToolkitException( | 109 | raise _common.ToolkitException( |
1623 | 80 | 'Missing custom back button in header') | 110 | 'Missing custom back button in header') |
1624 | @@ -138,8 +168,7 @@ | |||
1625 | 138 | 168 | ||
1626 | 139 | def _switch_to_tab_in_drawer_by_index(self, index): | 169 | def _switch_to_tab_in_drawer_by_index(self, index): |
1627 | 140 | try: | 170 | try: |
1630 | 141 | tabs_drawer_button = self.select_single( | 171 | tabs_drawer_button = self.select_single(objectName='tabsButton') |
1629 | 142 | 'AbstractButton', objectName='tabsButton') | ||
1631 | 143 | except dbus.StateNotFoundError: | 172 | except dbus.StateNotFoundError: |
1632 | 144 | raise _common.ToolkitException(_NO_TABS_ERROR) | 173 | raise _common.ToolkitException(_NO_TABS_ERROR) |
1633 | 145 | self.pointing_device.click_object(tabs_drawer_button) | 174 | self.pointing_device.click_object(tabs_drawer_button) |
1634 | @@ -175,8 +204,7 @@ | |||
1635 | 175 | def _get_action_button(self, action_object_name): | 204 | def _get_action_button(self, action_object_name): |
1636 | 176 | try: | 205 | try: |
1637 | 177 | object_name = action_object_name + "_header_button" | 206 | object_name = action_object_name + "_header_button" |
1640 | 178 | button = self.select_single( | 207 | button = self.select_single(objectName=object_name) |
1639 | 179 | 'AbstractButton', objectName=object_name) | ||
1641 | 180 | except dbus.StateNotFoundError: | 208 | except dbus.StateNotFoundError: |
1642 | 181 | # the button is not in the header, but it may be in the overflow | 209 | # the button is not in the header, but it may be in the overflow |
1643 | 182 | try: | 210 | try: |
1644 | @@ -190,7 +218,6 @@ | |||
1645 | 190 | 218 | ||
1646 | 191 | def _get_action_button_in_overflow(self, action_object_name): | 219 | def _get_action_button_in_overflow(self, action_object_name): |
1647 | 192 | actions_overflow_button = self.select_single( | 220 | actions_overflow_button = self.select_single( |
1648 | 193 | 'AbstractButton', | ||
1649 | 194 | objectName='actions_overflow_button') | 221 | objectName='actions_overflow_button') |
1650 | 195 | 222 | ||
1651 | 196 | if not actions_overflow_button.visible: | 223 | if not actions_overflow_button.visible: |
1652 | 197 | 224 | ||
1653 | === modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py' | |||
1654 | --- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py 2014-06-02 23:21:48 +0000 | |||
1655 | +++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py 2014-07-24 02:10:07 +0000 | |||
1656 | @@ -41,8 +41,7 @@ | |||
1657 | 41 | def get_header(self): | 41 | def get_header(self): |
1658 | 42 | """Return the AppHeader emulator of the MainView.""" | 42 | """Return the AppHeader emulator of the MainView.""" |
1659 | 43 | try: | 43 | try: |
1662 | 44 | return self.select_single( | 44 | return self.select_single(objectName='MainView_Header') |
1661 | 45 | 'AppHeader', objectName='MainView_Header') | ||
1663 | 46 | except dbus.StateNotFoundError: | 45 | except dbus.StateNotFoundError: |
1664 | 47 | raise _common.ToolkitException('The main view has no header.') | 46 | raise _common.ToolkitException('The main view has no header.') |
1665 | 48 | 47 | ||
1666 | 49 | 48 | ||
1667 | === modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/pickers.py' | |||
1668 | --- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/pickers.py 2014-05-09 05:39:20 +0000 | |||
1669 | +++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/pickers.py 2014-07-24 02:10:07 +0000 | |||
1670 | @@ -127,15 +127,18 @@ | |||
1671 | 127 | if not self._is_time_picker(): | 127 | if not self._is_time_picker(): |
1672 | 128 | raise _common.ToolkitException( | 128 | raise _common.ToolkitException( |
1673 | 129 | "Can't pick time. The picker mode is: {!r}.".format(self.mode)) | 129 | "Can't pick time. The picker mode is: {!r}.".format(self.mode)) |
1674 | 130 | # Workaround https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1346669 | ||
1675 | 131 | # By setting seconds, then minutes, then hours, erratic behavoir | ||
1676 | 132 | # can be dealt with | ||
1677 | 133 | if 'Seconds' in self.mode: | ||
1678 | 134 | self._pick_second(time.second) | ||
1679 | 135 | self.seconds.wait_for(time.second) | ||
1680 | 136 | if 'Minutes' in self.mode: | ||
1681 | 137 | self._pick_minute(time.minute) | ||
1682 | 138 | self.minutes.wait_for(time.minute) | ||
1683 | 130 | if 'Hours' in self.mode: | 139 | if 'Hours' in self.mode: |
1684 | 131 | self._pick_hour(time.hour) | 140 | self._pick_hour(time.hour) |
1685 | 132 | self.hours.wait_for(time.hour) | 141 | self.hours.wait_for(time.hour) |
1686 | 133 | if 'Minutes' in self.mode: | ||
1687 | 134 | self._pick_minute(time.minute) | ||
1688 | 135 | self.minutes.wait_for(time.minute) | ||
1689 | 136 | if 'Seconds' in self.mode: | ||
1690 | 137 | self._pick_second(time.second) | ||
1691 | 138 | self.seconds.wait_for(time.second) | ||
1692 | 139 | 142 | ||
1693 | 140 | def _is_time_picker(self): | 143 | def _is_time_picker(self): |
1694 | 141 | mode = self.mode | 144 | mode = self.mode |
1695 | 142 | 145 | ||
1696 | === modified file 'tests/autopilot/ubuntuuitoolkit/base.py' | |||
1697 | --- tests/autopilot/ubuntuuitoolkit/base.py 2014-01-14 00:44:05 +0000 | |||
1698 | +++ tests/autopilot/ubuntuuitoolkit/base.py 2014-07-24 02:10:07 +0000 | |||
1699 | @@ -1,6 +1,6 @@ | |||
1700 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
1701 | 2 | # | 2 | # |
1703 | 3 | # Copyright (C) 2013 Canonical Ltd. | 3 | # Copyright (C) 2013, 2014 Canonical Ltd. |
1704 | 4 | # | 4 | # |
1705 | 5 | # 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 |
1706 | 6 | # it under the terms of the GNU Lesser General Public License as published by | 6 | # it under the terms of the GNU Lesser General Public License as published by |
1707 | @@ -16,6 +16,7 @@ | |||
1708 | 16 | 16 | ||
1709 | 17 | """Base classes for Autopilot tests using the Ubuntu UI Toolkit.""" | 17 | """Base classes for Autopilot tests using the Ubuntu UI Toolkit.""" |
1710 | 18 | 18 | ||
1711 | 19 | import os | ||
1712 | 19 | import subprocess | 20 | import subprocess |
1713 | 20 | 21 | ||
1714 | 21 | from autopilot import ( | 22 | from autopilot import ( |
1715 | @@ -25,14 +26,21 @@ | |||
1716 | 25 | ) | 26 | ) |
1717 | 26 | 27 | ||
1718 | 27 | 28 | ||
1719 | 29 | def get_host_multiarch(): | ||
1720 | 30 | if 'deb_host_multiarch' not in os.environ: | ||
1721 | 31 | # Discard errors: the one known message is "GCC not installed" | ||
1722 | 32 | os.environ['deb_host_multiarch'] = subprocess.check_output( | ||
1723 | 33 | ["dpkg-architecture", "-qDEB_HOST_MULTIARCH"], | ||
1724 | 34 | universal_newlines=True, stderr=subprocess.PIPE).strip() | ||
1725 | 35 | return os.environ['deb_host_multiarch'] | ||
1726 | 36 | |||
1727 | 37 | |||
1728 | 28 | def get_qmlscene_launch_command(): | 38 | def get_qmlscene_launch_command(): |
1729 | 29 | """Return the command to launch qmlscene for autopilot tests.""" | 39 | """Return the command to launch qmlscene for autopilot tests.""" |
1730 | 30 | # We need to specify qt5 because qtchooser doesn't have a default | 40 | # We need to specify qt5 because qtchooser doesn't have a default |
1731 | 31 | # configuration on devices and it seems the environment variable | 41 | # configuration on devices and it seems the environment variable |
1732 | 32 | # QT_SELECT=qt5 doesn't work for autopilot tests. --Mirv - 2013-10-03 | 42 | # QT_SELECT=qt5 doesn't work for autopilot tests. --Mirv - 2013-10-03 |
1736 | 33 | arch = subprocess.check_output( | 43 | arch = get_host_multiarch() |
1734 | 34 | ["dpkg-architecture", "-qDEB_HOST_MULTIARCH"], | ||
1735 | 35 | universal_newlines=True).strip() | ||
1737 | 36 | return '/usr/lib/{}/qt5/bin/qmlscene'.format(arch) | 44 | return '/usr/lib/{}/qt5/bin/qmlscene'.format(arch) |
1738 | 37 | 45 | ||
1739 | 38 | 46 | ||
1740 | 39 | 47 | ||
1741 | === modified file 'tests/autopilot/ubuntuuitoolkit/fixture_setup.py' | |||
1742 | --- tests/autopilot/ubuntuuitoolkit/fixture_setup.py 2014-05-26 06:40:24 +0000 | |||
1743 | +++ tests/autopilot/ubuntuuitoolkit/fixture_setup.py 2014-07-24 02:10:07 +0000 | |||
1744 | @@ -15,11 +15,14 @@ | |||
1745 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1746 | 16 | 16 | ||
1747 | 17 | import copy | 17 | import copy |
1748 | 18 | import logging | ||
1749 | 18 | import os | 19 | import os |
1750 | 19 | import shutil | 20 | import shutil |
1751 | 20 | import tempfile | 21 | import tempfile |
1752 | 21 | 22 | ||
1753 | 22 | import fixtures | 23 | import fixtures |
1754 | 24 | from autopilot import display | ||
1755 | 25 | from gi.repository import Gio | ||
1756 | 23 | 26 | ||
1757 | 24 | from ubuntuuitoolkit import base, environment | 27 | from ubuntuuitoolkit import base, environment |
1758 | 25 | 28 | ||
1759 | @@ -46,6 +49,9 @@ | |||
1760 | 46 | } | 49 | } |
1761 | 47 | 50 | ||
1762 | 48 | 51 | ||
1763 | 52 | logger = logging.getLogger(__name__) | ||
1764 | 53 | |||
1765 | 54 | |||
1766 | 49 | class FakeApplication(fixtures.Fixture): | 55 | class FakeApplication(fixtures.Fixture): |
1767 | 50 | 56 | ||
1768 | 51 | def __init__( | 57 | def __init__( |
1769 | @@ -71,18 +77,26 @@ | |||
1770 | 71 | return qml_file_path, desktop_file_path | 77 | return qml_file_path, desktop_file_path |
1771 | 72 | 78 | ||
1772 | 73 | def _write_test_qml_file(self): | 79 | def _write_test_qml_file(self): |
1775 | 74 | qml_file = tempfile.NamedTemporaryFile( | 80 | qml_file = self._named_temporary_file(suffix='.qml') |
1774 | 75 | mode='w+t', suffix='.qml', delete=False) | ||
1776 | 76 | qml_file.write(self._qml_file_contents) | 81 | qml_file.write(self._qml_file_contents) |
1777 | 77 | qml_file.close() | 82 | qml_file.close() |
1778 | 78 | return qml_file.name | 83 | return qml_file.name |
1779 | 79 | 84 | ||
1780 | 85 | def _named_temporary_file(self, dir=None, mode='w+t', | ||
1781 | 86 | delete=False, suffix=''): | ||
1782 | 87 | # Discard files with underscores which look like an APP_ID to Unity | ||
1783 | 88 | # See https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1329141 | ||
1784 | 89 | chars = tempfile._RandomNameSequence.characters.strip("_") | ||
1785 | 90 | tempfile._RandomNameSequence.characters = chars | ||
1786 | 91 | return tempfile.NamedTemporaryFile(dir=dir, mode=mode, | ||
1787 | 92 | delete=delete, suffix=suffix) | ||
1788 | 93 | |||
1789 | 80 | def _write_test_desktop_file(self, qml_file_path): | 94 | def _write_test_desktop_file(self, qml_file_path): |
1790 | 81 | desktop_file_dir = self._get_local_desktop_file_directory() | 95 | desktop_file_dir = self._get_local_desktop_file_directory() |
1791 | 82 | if not os.path.exists(desktop_file_dir): | 96 | if not os.path.exists(desktop_file_dir): |
1792 | 83 | os.makedirs(desktop_file_dir) | 97 | os.makedirs(desktop_file_dir) |
1795 | 84 | desktop_file = tempfile.NamedTemporaryFile( | 98 | desktop_file = self._named_temporary_file(suffix='.desktop', |
1796 | 85 | mode='w+t', suffix='.desktop', dir=desktop_file_dir, delete=False) | 99 | dir=desktop_file_dir) |
1797 | 86 | self._desktop_file_dict['Exec'] = ( | 100 | self._desktop_file_dict['Exec'] = ( |
1798 | 87 | self._desktop_file_dict['Exec'].format( | 101 | self._desktop_file_dict['Exec'].format( |
1799 | 88 | qmlscene=base.get_qmlscene_launch_command(), | 102 | qmlscene=base.get_qmlscene_launch_command(), |
1800 | @@ -163,3 +177,82 @@ | |||
1801 | 163 | shutil.copyfile( | 177 | shutil.copyfile( |
1802 | 164 | xauthority_file_path, | 178 | xauthority_file_path, |
1803 | 165 | os.path.join(directory, '.Xauthority')) | 179 | os.path.join(directory, '.Xauthority')) |
1804 | 180 | |||
1805 | 181 | |||
1806 | 182 | class HideUnity7Launcher(fixtures.Fixture): | ||
1807 | 183 | |||
1808 | 184 | """Hide the Unity7 launcher if it is visible and restore it on clean up.""" | ||
1809 | 185 | |||
1810 | 186 | _UNITYSHELL_GSETTINGS_SCHEMA = 'org.compiz.unityshell' | ||
1811 | 187 | _UNITYSHELL_GSETTINGS_PATH = ( | ||
1812 | 188 | '/org/compiz/profiles/unity/plugins/unityshell/') | ||
1813 | 189 | _UNITYSHELL_LAUNCHER_KEY = 'launcher-hide-mode' | ||
1814 | 190 | _UNITYSHELL_LAUNCHER_HIDDEN_MODE = 1 # launcher hidden | ||
1815 | 191 | |||
1816 | 192 | def setUp(self): | ||
1817 | 193 | super(HideUnity7Launcher, self).setUp() | ||
1818 | 194 | self._hide_launcher() | ||
1819 | 195 | |||
1820 | 196 | def _hide_launcher(self): | ||
1821 | 197 | if (self._UNITYSHELL_GSETTINGS_SCHEMA in | ||
1822 | 198 | Gio.Settings.list_relocatable_schemas()): | ||
1823 | 199 | unityshell_schema = Gio.Settings.new_with_path( | ||
1824 | 200 | self._UNITYSHELL_GSETTINGS_SCHEMA, | ||
1825 | 201 | self._UNITYSHELL_GSETTINGS_PATH) | ||
1826 | 202 | self._hide_launcher_from_schema(unityshell_schema) | ||
1827 | 203 | else: | ||
1828 | 204 | logger.warning('Unity Shell gsettings schema not found.') | ||
1829 | 205 | |||
1830 | 206 | def _hide_launcher_from_schema(self, unityshell_schema): | ||
1831 | 207 | original_mode = self._get_launcher_mode(unityshell_schema) | ||
1832 | 208 | self.addCleanup( | ||
1833 | 209 | self._set_launcher_mode, unityshell_schema, original_mode) | ||
1834 | 210 | self._set_launcher_mode( | ||
1835 | 211 | unityshell_schema, self._UNITYSHELL_LAUNCHER_HIDDEN_MODE) | ||
1836 | 212 | |||
1837 | 213 | def _get_launcher_mode(self, unityshell_schema): | ||
1838 | 214 | return unityshell_schema.get_int(self._UNITYSHELL_LAUNCHER_KEY) | ||
1839 | 215 | |||
1840 | 216 | def _set_launcher_mode(self, unityshell_schema, mode): | ||
1841 | 217 | unityshell_schema.set_int(self._UNITYSHELL_LAUNCHER_KEY, mode) | ||
1842 | 218 | |||
1843 | 219 | |||
1844 | 220 | class SimulateDevice(fixtures.Fixture): | ||
1845 | 221 | |||
1846 | 222 | def __init__(self, app_width, app_height, grid_unit_px): | ||
1847 | 223 | super(SimulateDevice, self).__init__() | ||
1848 | 224 | self.app_width = app_width | ||
1849 | 225 | self.app_height = app_height | ||
1850 | 226 | self.grid_unit_px = grid_unit_px | ||
1851 | 227 | self._screen = None | ||
1852 | 228 | |||
1853 | 229 | def setUp(self): | ||
1854 | 230 | super(SimulateDevice, self).setUp() | ||
1855 | 231 | if self._is_geometry_larger_than_display( | ||
1856 | 232 | self.app_width, self.app_height): | ||
1857 | 233 | scale_divisor = self._get_scale_divisor() | ||
1858 | 234 | self.grid_unit_px = self.grid_unit_px // scale_divisor | ||
1859 | 235 | self.app_width = self.app_width // scale_divisor | ||
1860 | 236 | self.app_height = self.app_height // scale_divisor | ||
1861 | 237 | self.useFixture( | ||
1862 | 238 | fixtures.EnvironmentVariable( | ||
1863 | 239 | 'GRID_UNIT_PX', str(self.grid_unit_px))) | ||
1864 | 240 | |||
1865 | 241 | def _get_scale_divisor(self): | ||
1866 | 242 | scale_divisor = 2 | ||
1867 | 243 | while self._is_geometry_larger_than_display( | ||
1868 | 244 | self.app_width // scale_divisor, | ||
1869 | 245 | self.app_height // scale_divisor): | ||
1870 | 246 | scale_divisor = scale_divisor * 2 | ||
1871 | 247 | return scale_divisor | ||
1872 | 248 | |||
1873 | 249 | def _is_geometry_larger_than_display(self, width, height): | ||
1874 | 250 | screen = self._get_screen() | ||
1875 | 251 | screen_width = screen.get_screen_width() | ||
1876 | 252 | screen_height = screen.get_screen_height() | ||
1877 | 253 | return (width > screen_width) or (height > screen_height) | ||
1878 | 254 | |||
1879 | 255 | def _get_screen(self): | ||
1880 | 256 | if self._screen is None: | ||
1881 | 257 | self._screen = display.Display.create() | ||
1882 | 258 | return self._screen | ||
1883 | 166 | 259 | ||
1884 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/__init__.py' | |||
1885 | --- tests/autopilot/ubuntuuitoolkit/tests/__init__.py 2014-06-16 12:07:41 +0000 | |||
1886 | +++ tests/autopilot/ubuntuuitoolkit/tests/__init__.py 2014-07-24 02:10:07 +0000 | |||
1887 | @@ -39,6 +39,10 @@ | |||
1888 | 39 | desktop_file_dir = get_local_desktop_file_directory() | 39 | desktop_file_dir = get_local_desktop_file_directory() |
1889 | 40 | if not os.path.exists(desktop_file_dir): | 40 | if not os.path.exists(desktop_file_dir): |
1890 | 41 | os.makedirs(desktop_file_dir) | 41 | os.makedirs(desktop_file_dir) |
1891 | 42 | # Strip underscores which look like an APP_ID to Unity | ||
1892 | 43 | # See https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1329141 | ||
1893 | 44 | chars = tempfile._RandomNameSequence.characters.strip("_") | ||
1894 | 45 | tempfile._RandomNameSequence.characters = chars | ||
1895 | 42 | desktop_file = tempfile.NamedTemporaryFile( | 46 | desktop_file = tempfile.NamedTemporaryFile( |
1896 | 43 | suffix='.desktop', dir=desktop_file_dir, delete=False) | 47 | suffix='.desktop', dir=desktop_file_dir, delete=False) |
1897 | 44 | desktop_file.write(_DESKTOP_FILE_CONTENTS.encode('utf-8')) | 48 | desktop_file.write(_DESKTOP_FILE_CONTENTS.encode('utf-8')) |
1898 | @@ -60,8 +64,8 @@ | |||
1899 | 60 | os.path.dirname(__file__), '..', '..', '..', '..')) | 64 | os.path.dirname(__file__), '..', '..', '..', '..')) |
1900 | 61 | 65 | ||
1901 | 62 | 66 | ||
1904 | 63 | class QMLStringAppTestCase(base.UbuntuUIToolkitAppTestCase): | 67 | class UbuntuUIToolkitWithFakeAppRunningTestCase( |
1905 | 64 | """Base test case for self tests that define the QML on an string.""" | 68 | base.UbuntuUIToolkitAppTestCase): |
1906 | 65 | 69 | ||
1907 | 66 | test_qml = (""" | 70 | test_qml = (""" |
1908 | 67 | import QtQuick 2.0 | 71 | import QtQuick 2.0 |
1909 | @@ -69,13 +73,12 @@ | |||
1910 | 69 | 73 | ||
1911 | 70 | MainView { | 74 | MainView { |
1912 | 71 | width: units.gu(48) | 75 | width: units.gu(48) |
1914 | 72 | height: units.gu(60) | 76 | height: units.gu(80) |
1915 | 73 | } | 77 | } |
1916 | 74 | """) | 78 | """) |
1917 | 75 | 79 | ||
1918 | 76 | def setUp(self): | 80 | def setUp(self): |
1921 | 77 | super(QMLStringAppTestCase, self).setUp() | 81 | super(UbuntuUIToolkitWithFakeAppRunningTestCase, self).setUp() |
1920 | 78 | self.pointing_device = Pointer(self.input_device_class.create()) | ||
1922 | 79 | self.launch_application() | 82 | self.launch_application() |
1923 | 80 | 83 | ||
1924 | 81 | def launch_application(self): | 84 | def launch_application(self): |
1925 | @@ -83,18 +86,24 @@ | |||
1926 | 83 | qml_file_contents=self.test_qml) | 86 | qml_file_contents=self.test_qml) |
1927 | 84 | self.useFixture(fake_application) | 87 | self.useFixture(fake_application) |
1928 | 85 | 88 | ||
1938 | 86 | self.app = self.launch_test_application( | 89 | desktop_file_name = os.path.basename( |
1939 | 87 | base.get_qmlscene_launch_command(), | 90 | fake_application.desktop_file_path) |
1940 | 88 | '-I' + _get_module_include_path(), | 91 | application_name, _ = os.path.splitext(desktop_file_name) |
1941 | 89 | fake_application.qml_file_path, | 92 | self.app = self.launch_upstart_application( |
1942 | 90 | '--desktop_file_hint={0}'.format( | 93 | application_name, |
1943 | 91 | fake_application.desktop_file_path), | 94 | emulator_base=emulators.UbuntuUIToolkitEmulatorBase) |
1944 | 92 | emulator_base=emulators.UbuntuUIToolkitEmulatorBase, | 95 | |
1945 | 93 | app_type='qt') | 96 | |
1946 | 94 | 97 | class QMLStringAppTestCase(UbuntuUIToolkitWithFakeAppRunningTestCase): | |
1947 | 98 | """Base test case for self tests that define the QML on an string.""" | ||
1948 | 99 | |||
1949 | 100 | def setUp(self): | ||
1950 | 101 | super(QMLStringAppTestCase, self).setUp() | ||
1951 | 95 | self.assertThat( | 102 | self.assertThat( |
1952 | 96 | self.main_view.visible, Eventually(Equals(True))) | 103 | self.main_view.visible, Eventually(Equals(True))) |
1953 | 97 | 104 | ||
1954 | 105 | self.pointing_device = Pointer(self.input_device_class.create()) | ||
1955 | 106 | |||
1956 | 98 | @property | 107 | @property |
1957 | 99 | def main_view(self): | 108 | def main_view(self): |
1958 | 100 | return self.app.select_single(emulators.MainView) | 109 | return self.app.select_single(emulators.MainView) |
1959 | 101 | 110 | ||
1960 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_date_picker.py' | |||
1961 | --- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_date_picker.py 2014-05-09 05:39:20 +0000 | |||
1962 | +++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_date_picker.py 2014-07-24 02:10:07 +0000 | |||
1963 | @@ -36,11 +36,19 @@ | |||
1964 | 36 | id: datePicker | 36 | id: datePicker |
1965 | 37 | objectName: 'datePicker' | 37 | objectName: 'datePicker' |
1966 | 38 | mode: 'Years|Months|Days' | 38 | mode: 'Years|Months|Days' |
1967 | 39 | maximum: { | ||
1968 | 40 | var d = new Date() | ||
1969 | 41 | d.setFullYear('2030') | ||
1970 | 42 | return d | ||
1971 | 43 | } | ||
1972 | 44 | minimum: { | ||
1973 | 45 | var d = new Date() | ||
1974 | 46 | d.setFullYear('1990') | ||
1975 | 47 | return d | ||
1976 | 48 | } | ||
1977 | 39 | date: { | 49 | date: { |
1978 | 40 | var d = new Date() | 50 | var d = new Date() |
1982 | 41 | // Make sure that the picker will have higher and lower values | 51 | d.setFullYear('2010') |
1980 | 42 | // to select. | ||
1981 | 43 | d.setFullYear(d.getFullYear() + 25) | ||
1983 | 44 | d.setMonth('5') | 52 | d.setMonth('5') |
1984 | 45 | d.setDate('15') | 53 | d.setDate('15') |
1985 | 46 | return d | 54 | return d |
1986 | @@ -50,10 +58,18 @@ | |||
1987 | 50 | id: timePicker | 58 | id: timePicker |
1988 | 51 | objectName: 'timePicker' | 59 | objectName: 'timePicker' |
1989 | 52 | mode: 'Hours|Minutes|Seconds' | 60 | mode: 'Hours|Minutes|Seconds' |
1990 | 61 | maximum: { | ||
1991 | 62 | var d = new Date() | ||
1992 | 63 | d.setFullYear('2030') | ||
1993 | 64 | return d | ||
1994 | 65 | } | ||
1995 | 66 | minimum: { | ||
1996 | 67 | var d = new Date() | ||
1997 | 68 | d.setFullYear('1990') | ||
1998 | 69 | return d | ||
1999 | 70 | } | ||
2000 | 53 | date: { | 71 | date: { |
2001 | 54 | var d = new Date() | 72 | var d = new Date() |
2002 | 55 | // Make sure that the picker will have higher and lower values | ||
2003 | 56 | // to select. | ||
2004 | 57 | d.setHours(12) | 73 | d.setHours(12) |
2005 | 58 | d.setMinutes('30') | 74 | d.setMinutes('30') |
2006 | 59 | d.setSeconds('30') | 75 | d.setSeconds('30') |
2007 | @@ -133,7 +149,7 @@ | |||
2008 | 133 | 149 | ||
2009 | 134 | class PickDateFromDatePickerTestCase(DatePickerBaseTestCase): | 150 | class PickDateFromDatePickerTestCase(DatePickerBaseTestCase): |
2010 | 135 | 151 | ||
2012 | 136 | SELECTED_YEAR = datetime.date.today().year + 25 | 152 | SELECTED_YEAR = 2010 |
2013 | 137 | SELECTED_MONTH = 6 # June | 153 | SELECTED_MONTH = 6 # June |
2014 | 138 | SELECTED_DAY = 15 | 154 | SELECTED_DAY = 15 |
2015 | 139 | 155 | ||
2016 | 140 | 156 | ||
2017 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py' | |||
2018 | --- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py 2014-06-17 07:12:49 +0000 | |||
2019 | +++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py 2014-07-24 02:10:07 +0000 | |||
2020 | @@ -15,7 +15,6 @@ | |||
2021 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
2022 | 16 | 16 | ||
2023 | 17 | import os | 17 | import os |
2024 | 18 | import subprocess | ||
2025 | 19 | 18 | ||
2026 | 20 | import testtools | 19 | import testtools |
2027 | 21 | import ubuntuuitoolkit | 20 | import ubuntuuitoolkit |
2028 | @@ -207,9 +206,7 @@ | |||
2029 | 207 | if os.path.exists(path_to_local_launcher): | 206 | if os.path.exists(path_to_local_launcher): |
2030 | 208 | return path_to_local_launcher | 207 | return path_to_local_launcher |
2031 | 209 | else: | 208 | else: |
2035 | 210 | arch = subprocess.check_output( | 209 | arch = ubuntuuitoolkit.base.get_host_multiarch() |
2033 | 211 | ["dpkg-architecture", "-qDEB_HOST_MULTIARCH"], | ||
2034 | 212 | universal_newlines=True).strip() | ||
2036 | 213 | path_to_installed_launcher = os.path.join( | 210 | path_to_installed_launcher = os.path.join( |
2037 | 214 | '/', 'usr', 'lib', arch, 'ubuntu-ui-toolkit', 'launcher') | 211 | '/', 'usr', 'lib', arch, 'ubuntu-ui-toolkit', 'launcher') |
2038 | 215 | return path_to_installed_launcher | 212 | return path_to_installed_launcher |
2039 | 216 | 213 | ||
2040 | === renamed file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.HeaderActionsTestCase.qml' => 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.ActionsTestCase.qml' | |||
2041 | === added file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.DeprecatedHeaderSectionsTestCase.qml' | |||
2042 | --- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.DeprecatedHeaderSectionsTestCase.qml 1970-01-01 00:00:00 +0000 | |||
2043 | +++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.DeprecatedHeaderSectionsTestCase.qml 2014-07-24 02:10:07 +0000 | |||
2044 | @@ -0,0 +1,50 @@ | |||
2045 | 1 | /* | ||
2046 | 2 | * Copyright 2014 Canonical Ltd. | ||
2047 | 3 | * | ||
2048 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2049 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
2050 | 6 | * the Free Software Foundation; version 3. | ||
2051 | 7 | * | ||
2052 | 8 | * This program is distributed in the hope that it will be useful, | ||
2053 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2054 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2055 | 11 | * GNU Lesser General Public License for more details. | ||
2056 | 12 | * | ||
2057 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
2058 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2059 | 15 | */ | ||
2060 | 16 | |||
2061 | 17 | import QtQuick 2.0 | ||
2062 | 18 | import Ubuntu.Components 1.1 | ||
2063 | 19 | |||
2064 | 20 | MainView { | ||
2065 | 21 | width: units.gu(48) | ||
2066 | 22 | height: units.gu(60) | ||
2067 | 23 | |||
2068 | 24 | useDeprecatedToolbar: true | ||
2069 | 25 | |||
2070 | 26 | Page { | ||
2071 | 27 | id: page | ||
2072 | 28 | title: "Test title" | ||
2073 | 29 | |||
2074 | 30 | Column { | ||
2075 | 31 | spacing: units.gu(1) | ||
2076 | 32 | width: childrenRect.width | ||
2077 | 33 | anchors.centerIn: parent | ||
2078 | 34 | |||
2079 | 35 | Label { | ||
2080 | 36 | text: "Sections enabled" | ||
2081 | 37 | } | ||
2082 | 38 | Switch { | ||
2083 | 39 | id: sectionsEnabledSWitch | ||
2084 | 40 | objectName: "sections_enabled_switch" | ||
2085 | 41 | checked: page.head.sections.enabled | ||
2086 | 42 | onCheckedChanged: page.head.sections.enabled = checked | ||
2087 | 43 | } | ||
2088 | 44 | } | ||
2089 | 45 | |||
2090 | 46 | head { | ||
2091 | 47 | sections.model: ["one", "two", "three"] | ||
2092 | 48 | } | ||
2093 | 49 | } | ||
2094 | 50 | } | ||
2095 | 0 | 51 | ||
2096 | === added file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.SectionsTestCase.qml' | |||
2097 | --- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.SectionsTestCase.qml 1970-01-01 00:00:00 +0000 | |||
2098 | +++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.SectionsTestCase.qml 2014-07-24 02:10:07 +0000 | |||
2099 | @@ -0,0 +1,50 @@ | |||
2100 | 1 | /* | ||
2101 | 2 | * Copyright 2014 Canonical Ltd. | ||
2102 | 3 | * | ||
2103 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2104 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
2105 | 6 | * the Free Software Foundation; version 3. | ||
2106 | 7 | * | ||
2107 | 8 | * This program is distributed in the hope that it will be useful, | ||
2108 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2109 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2110 | 11 | * GNU Lesser General Public License for more details. | ||
2111 | 12 | * | ||
2112 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
2113 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2114 | 15 | */ | ||
2115 | 16 | |||
2116 | 17 | import QtQuick 2.0 | ||
2117 | 18 | import Ubuntu.Components 1.1 | ||
2118 | 19 | |||
2119 | 20 | MainView { | ||
2120 | 21 | width: units.gu(48) | ||
2121 | 22 | height: units.gu(60) | ||
2122 | 23 | |||
2123 | 24 | useDeprecatedToolbar: false | ||
2124 | 25 | |||
2125 | 26 | Page { | ||
2126 | 27 | id: page | ||
2127 | 28 | title: "Test title" | ||
2128 | 29 | |||
2129 | 30 | Column { | ||
2130 | 31 | spacing: units.gu(1) | ||
2131 | 32 | width: childrenRect.width | ||
2132 | 33 | anchors.centerIn: parent | ||
2133 | 34 | |||
2134 | 35 | Label { | ||
2135 | 36 | text: "Sections enabled" | ||
2136 | 37 | } | ||
2137 | 38 | Switch { | ||
2138 | 39 | id: sectionsEnabledSWitch | ||
2139 | 40 | objectName: "sections_enabled_switch" | ||
2140 | 41 | checked: page.head.sections.enabled | ||
2141 | 42 | onCheckedChanged: page.head.sections.enabled = checked | ||
2142 | 43 | } | ||
2143 | 44 | } | ||
2144 | 45 | |||
2145 | 46 | head { | ||
2146 | 47 | sections.model: ["one", "two", "three"] | ||
2147 | 48 | } | ||
2148 | 49 | } | ||
2149 | 50 | } | ||
2150 | 0 | 51 | ||
2151 | === renamed file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.HeaderToolsTestCase.qml' => 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.ToolsTestCase.qml' | |||
2152 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py' | |||
2153 | --- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py 2014-06-29 21:44:06 +0000 | |||
2154 | +++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py 2014-07-24 02:10:07 +0000 | |||
2155 | @@ -24,14 +24,14 @@ | |||
2156 | 24 | from ubuntuuitoolkit import tests | 24 | from ubuntuuitoolkit import tests |
2157 | 25 | 25 | ||
2158 | 26 | 26 | ||
2160 | 27 | class HeaderTestCase(tests.QMLFileAppTestCase): | 27 | class ActionsTestCase(tests.QMLFileAppTestCase): |
2161 | 28 | 28 | ||
2162 | 29 | path = os.path.abspath(__file__) | 29 | path = os.path.abspath(__file__) |
2163 | 30 | dir_path = os.path.dirname(path) | 30 | dir_path = os.path.dirname(path) |
2164 | 31 | tools_test_qml_file_path = os.path.join( | 31 | tools_test_qml_file_path = os.path.join( |
2166 | 32 | dir_path, 'test_header.HeaderToolsTestCase.qml') | 32 | dir_path, 'test_header.ToolsTestCase.qml') |
2167 | 33 | actions_test_qml_file_path = os.path.join( | 33 | actions_test_qml_file_path = os.path.join( |
2169 | 34 | dir_path, 'test_header.HeaderActionsTestCase.qml') | 34 | dir_path, 'test_header.ActionsTestCase.qml') |
2170 | 35 | 35 | ||
2171 | 36 | scenarios = [ | 36 | scenarios = [ |
2172 | 37 | ('deprecated tools', | 37 | ('deprecated tools', |
2173 | @@ -41,7 +41,7 @@ | |||
2174 | 41 | ] | 41 | ] |
2175 | 42 | 42 | ||
2176 | 43 | def setUp(self): | 43 | def setUp(self): |
2178 | 44 | super(HeaderTestCase, self).setUp() | 44 | super(ActionsTestCase, self).setUp() |
2179 | 45 | self.header = self.main_view.get_header() | 45 | self.header = self.main_view.get_header() |
2180 | 46 | self.label = self.app.select_single( | 46 | self.label = self.app.select_single( |
2181 | 47 | 'Label', objectName='clicked_label') | 47 | 'Label', objectName='clicked_label') |
2182 | @@ -85,7 +85,6 @@ | |||
2183 | 85 | def test_overflow_button(self): | 85 | def test_overflow_button(self): |
2184 | 86 | # there are 5 actions plus a custom back action | 86 | # there are 5 actions plus a custom back action |
2185 | 87 | overflow_button = self.header.select_single( | 87 | overflow_button = self.header.select_single( |
2186 | 88 | 'AbstractButton', | ||
2187 | 89 | objectName='actions_overflow_button') | 88 | objectName='actions_overflow_button') |
2188 | 90 | self.assertEqual(overflow_button.visible, True) | 89 | self.assertEqual(overflow_button.visible, True) |
2189 | 91 | 90 | ||
2190 | @@ -98,6 +97,73 @@ | |||
2191 | 98 | self.assertEqual(overflow_button.visible, False) | 97 | self.assertEqual(overflow_button.visible, False) |
2192 | 99 | 98 | ||
2193 | 100 | 99 | ||
2194 | 100 | class SectionsTestCase(tests.QMLFileAppTestCase): | ||
2195 | 101 | |||
2196 | 102 | path = os.path.abspath(__file__) | ||
2197 | 103 | dir_path = os.path.dirname(path) | ||
2198 | 104 | test_qml_file_path = os.path.join( | ||
2199 | 105 | dir_path, 'test_header.SectionsTestCase.qml') | ||
2200 | 106 | |||
2201 | 107 | def setUp(self): | ||
2202 | 108 | super(SectionsTestCase, self).setUp() | ||
2203 | 109 | self.header = self.main_view.get_header() | ||
2204 | 110 | # initially, section 0 is selected | ||
2205 | 111 | self.assertEqual(self.header.get_selected_section_index(), 0) | ||
2206 | 112 | |||
2207 | 113 | def test_select_sections(self): | ||
2208 | 114 | for index in [1, 0, 2]: | ||
2209 | 115 | self.header.switch_to_section_by_index(index) | ||
2210 | 116 | self.assertEqual(self.header.get_selected_section_index(), index) | ||
2211 | 117 | |||
2212 | 118 | def test_select_sections_with_sections_disabled(self): | ||
2213 | 119 | sectionsEnabledSwitch = self.app.select_single( | ||
2214 | 120 | 'CheckBox', objectName='sections_enabled_switch') | ||
2215 | 121 | sectionsEnabledSwitch.uncheck() | ||
2216 | 122 | for index in [1, 0, 2]: | ||
2217 | 123 | self.header.switch_to_section_by_index(index) | ||
2218 | 124 | # cannot change section by tapping the section name in divider | ||
2219 | 125 | self.assertEqual(self.header.get_selected_section_index(), 0) | ||
2220 | 126 | |||
2221 | 127 | |||
2222 | 128 | class DeprecatedHeaderSectionsTestCase(tests.QMLFileAppTestCase): | ||
2223 | 129 | |||
2224 | 130 | path = os.path.abspath(__file__) | ||
2225 | 131 | dir_path = os.path.dirname(path) | ||
2226 | 132 | test_qml_file_path = os.path.join( | ||
2227 | 133 | dir_path, 'test_header.DeprecatedHeaderSectionsTestCase.qml') | ||
2228 | 134 | |||
2229 | 135 | def setUp(self): | ||
2230 | 136 | super(DeprecatedHeaderSectionsTestCase, self).setUp() | ||
2231 | 137 | self.header = self.main_view.get_header() | ||
2232 | 138 | |||
2233 | 139 | def test_get_selection_index(self): | ||
2234 | 140 | error = self.assertRaises( | ||
2235 | 141 | ubuntuuitoolkit.ToolkitException, | ||
2236 | 142 | self.header.get_selected_section_index) | ||
2237 | 143 | self.assertEqual( | ||
2238 | 144 | str(error), | ||
2239 | 145 | 'Old header has no sections') | ||
2240 | 146 | |||
2241 | 147 | def test_select_sections(self): | ||
2242 | 148 | error = self.assertRaises( | ||
2243 | 149 | ubuntuuitoolkit.ToolkitException, | ||
2244 | 150 | self.header.switch_to_section_by_index, 1) | ||
2245 | 151 | self.assertEqual( | ||
2246 | 152 | str(error), | ||
2247 | 153 | 'Old header has no sections') | ||
2248 | 154 | |||
2249 | 155 | def test_select_sections_with_sections_disabled(self): | ||
2250 | 156 | sectionsEnabledSwitch = self.app.select_single( | ||
2251 | 157 | 'CheckBox', objectName='sections_enabled_switch') | ||
2252 | 158 | sectionsEnabledSwitch.uncheck() | ||
2253 | 159 | error = self.assertRaises( | ||
2254 | 160 | ubuntuuitoolkit.ToolkitException, | ||
2255 | 161 | self.header.switch_to_section_by_index, 1) | ||
2256 | 162 | self.assertEqual( | ||
2257 | 163 | str(error), | ||
2258 | 164 | 'Old header has no sections') | ||
2259 | 165 | |||
2260 | 166 | |||
2261 | 101 | class CustomMainView(ubuntuuitoolkit.MainView): | 167 | class CustomMainView(ubuntuuitoolkit.MainView): |
2262 | 102 | """Autopilot helper for a custom main view.""" | 168 | """Autopilot helper for a custom main view.""" |
2263 | 103 | 169 | ||
2264 | 104 | 170 | ||
2265 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py' | |||
2266 | --- tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py 2014-06-04 18:45:04 +0000 | |||
2267 | +++ tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py 2014-07-24 02:10:07 +0000 | |||
2268 | @@ -19,24 +19,71 @@ | |||
2269 | 19 | import os | 19 | import os |
2270 | 20 | import shutil | 20 | import shutil |
2271 | 21 | 21 | ||
2272 | 22 | from autopilot.matchers import Eventually | ||
2273 | 23 | from testtools.matchers import Equals | ||
2274 | 24 | |||
2275 | 22 | import ubuntuuitoolkit | 25 | import ubuntuuitoolkit |
2276 | 26 | from ubuntuuitoolkit import fixture_setup | ||
2277 | 23 | 27 | ||
2278 | 24 | 28 | ||
2279 | 25 | class GalleryTestCase(ubuntuuitoolkit.tests.QMLFileAppTestCase): | 29 | class GalleryTestCase(ubuntuuitoolkit.tests.QMLFileAppTestCase): |
2280 | 30 | |||
2281 | 26 | """Base class for gallery test cases.""" | 31 | """Base class for gallery test cases.""" |
2282 | 27 | 32 | ||
2283 | 28 | local_desktop_file_path = None | 33 | local_desktop_file_path = None |
2284 | 29 | 34 | ||
2285 | 30 | def setUp(self): | 35 | def setUp(self): |
2291 | 31 | if self._application_source_exists(): | 36 | self.test_source_path = self._get_test_source_path() |
2287 | 32 | self.test_source_path = self._get_path_to_gallery_source() | ||
2288 | 33 | else: | ||
2289 | 34 | self.test_source_path = self._get_path_to_installed_gallery() | ||
2290 | 35 | assert os.path.exists(self.test_source_path) | ||
2292 | 36 | self.test_qml_file_path = self._get_test_qml_file_path() | 37 | self.test_qml_file_path = self._get_test_qml_file_path() |
2293 | 37 | self.desktop_file_path = self._get_desktop_file_path() | 38 | self.desktop_file_path = self._get_desktop_file_path() |
2294 | 39 | |||
2295 | 40 | if self.should_simulate_device(): | ||
2296 | 41 | # Hide the Unity7 launcher because it takes space that might be | ||
2297 | 42 | # needed by the app with the simulated size. | ||
2298 | 43 | self.useFixture(fixture_setup.HideUnity7Launcher()) | ||
2299 | 44 | # This sets the grid units, so it should be called before launching | ||
2300 | 45 | # the app. | ||
2301 | 46 | self.simulate_device() | ||
2302 | 47 | |||
2303 | 38 | super(GalleryTestCase, self).setUp() | 48 | super(GalleryTestCase, self).setUp() |
2304 | 39 | 49 | ||
2305 | 50 | if self.should_simulate_device(): | ||
2306 | 51 | # XXX Currently we have no way to launch the application with a | ||
2307 | 52 | # specific size, so we must resize it after it's launched. | ||
2308 | 53 | # --elopio - 2014-06-25 | ||
2309 | 54 | self.resize_window() | ||
2310 | 55 | |||
2311 | 56 | def should_simulate_device(self): | ||
2312 | 57 | return (hasattr(self, 'app_width') and hasattr(self, 'app_height') and | ||
2313 | 58 | hasattr(self, 'grid_unit_px')) | ||
2314 | 59 | |||
2315 | 60 | def simulate_device(self): | ||
2316 | 61 | simulate_device_fixture = self.useFixture(fixture_setup.SimulateDevice( | ||
2317 | 62 | self.app_width, self.app_height, self.grid_unit_px)) | ||
2318 | 63 | self.app_width = simulate_device_fixture.app_width | ||
2319 | 64 | self.app_height = simulate_device_fixture.app_height | ||
2320 | 65 | |||
2321 | 66 | def resize_window(self): | ||
2322 | 67 | application = self.process_manager.get_running_applications()[0] | ||
2323 | 68 | window = application.get_windows()[0] | ||
2324 | 69 | window.resize(self.app_width, self.app_height) | ||
2325 | 70 | |||
2326 | 71 | def get_window_size(): | ||
2327 | 72 | _, _, window_width, window_height = window.geometry | ||
2328 | 73 | return window_width, window_height | ||
2329 | 74 | |||
2330 | 75 | self.assertThat( | ||
2331 | 76 | get_window_size, | ||
2332 | 77 | Eventually(Equals((self.app_width, self.app_height)))) | ||
2333 | 78 | |||
2334 | 79 | def _get_test_source_path(self): | ||
2335 | 80 | if self._application_source_exists(): | ||
2336 | 81 | test_source_path = self._get_path_to_gallery_source() | ||
2337 | 82 | else: | ||
2338 | 83 | test_source_path = self._get_path_to_installed_gallery() | ||
2339 | 84 | assert os.path.exists(test_source_path) | ||
2340 | 85 | return test_source_path | ||
2341 | 86 | |||
2342 | 40 | def _get_path_to_gallery_source(self): | 87 | def _get_path_to_gallery_source(self): |
2343 | 41 | return os.path.join( | 88 | return os.path.join( |
2344 | 42 | ubuntuuitoolkit.tests.get_path_to_source_root(), 'examples', | 89 | ubuntuuitoolkit.tests.get_path_to_source_root(), 'examples', |
2345 | 43 | 90 | ||
2346 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py' | |||
2347 | --- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py 2014-05-30 14:24:27 +0000 | |||
2348 | +++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py 2014-07-24 02:10:07 +0000 | |||
2349 | @@ -1,6 +1,6 @@ | |||
2350 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
2351 | 2 | # | 2 | # |
2353 | 3 | # Copyright (C) 2012, 2013 Canonical Ltd. | 3 | # Copyright (C) 2012, 2013, 2014 Canonical Ltd. |
2354 | 4 | # | 4 | # |
2355 | 5 | # 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 |
2356 | 6 | # it under the terms of the GNU Lesser General Public License as published by | 6 | # it under the terms of the GNU Lesser General Public License as published by |
2357 | @@ -16,14 +16,19 @@ | |||
2358 | 16 | 16 | ||
2359 | 17 | """Tests for the Ubuntu UI Toolkit Gallery - Button component""" | 17 | """Tests for the Ubuntu UI Toolkit Gallery - Button component""" |
2360 | 18 | 18 | ||
2361 | 19 | import testscenarios | ||
2362 | 19 | from autopilot.matchers import Eventually | 20 | from autopilot.matchers import Eventually |
2363 | 20 | from testtools.matchers import Equals | 21 | from testtools.matchers import Equals |
2370 | 21 | from ubuntuuitoolkit.tests.gallery import GalleryTestCase | 22 | |
2371 | 22 | 23 | from ubuntuuitoolkit import ubuntu_scenarios | |
2372 | 23 | 24 | from ubuntuuitoolkit.tests import gallery | |
2373 | 24 | class ButtonsTestCase(GalleryTestCase): | 25 | |
2374 | 25 | 26 | import os | |
2375 | 26 | scenarios = [ | 27 | |
2376 | 28 | |||
2377 | 29 | class ButtonsTestCase(gallery.GalleryTestCase): | ||
2378 | 30 | |||
2379 | 31 | buttons_scenarios = [ | ||
2380 | 27 | ('standard button', dict( | 32 | ('standard button', dict( |
2381 | 28 | button_name="button_text", is_enabled=True, color=None, icon=None, | 33 | button_name="button_text", is_enabled=True, color=None, icon=None, |
2382 | 29 | text="Call")), | 34 | text="Call")), |
2383 | @@ -44,6 +49,15 @@ | |||
2384 | 44 | icon=None, text="Call")) | 49 | icon=None, text="Call")) |
2385 | 45 | ] | 50 | ] |
2386 | 46 | 51 | ||
2387 | 52 | scenarios = testscenarios.multiply_scenarios( | ||
2388 | 53 | ubuntu_scenarios.get_device_simulation_scenarios(), | ||
2389 | 54 | buttons_scenarios) | ||
2390 | 55 | |||
2391 | 56 | def setUp(self): | ||
2392 | 57 | # Reset the locale to English | ||
2393 | 58 | os.environ['LANGUAGE'] = 'en' | ||
2394 | 59 | super(ButtonsTestCase, self).setUp() | ||
2395 | 60 | |||
2396 | 47 | def test_buttons(self): | 61 | def test_buttons(self): |
2397 | 48 | self.open_page('buttonsElement') | 62 | self.open_page('buttonsElement') |
2398 | 49 | 63 | ||
2399 | 50 | 64 | ||
2400 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py' | |||
2401 | --- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py 2014-06-18 05:35:24 +0000 | |||
2402 | +++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py 2014-07-24 02:10:07 +0000 | |||
2403 | @@ -16,13 +16,18 @@ | |||
2404 | 16 | 16 | ||
2405 | 17 | """Tests for the Ubuntu UI Toolkit Gallery""" | 17 | """Tests for the Ubuntu UI Toolkit Gallery""" |
2406 | 18 | 18 | ||
2407 | 19 | import testscenarios | ||
2408 | 20 | |||
2409 | 19 | import ubuntuuitoolkit | 21 | import ubuntuuitoolkit |
2410 | 22 | from ubuntuuitoolkit import ubuntu_scenarios | ||
2411 | 20 | from ubuntuuitoolkit.tests import gallery | 23 | from ubuntuuitoolkit.tests import gallery |
2412 | 21 | 24 | ||
2413 | 22 | 25 | ||
2414 | 23 | class GalleryAppTestCase(gallery.GalleryTestCase): | 26 | class GalleryAppTestCase(gallery.GalleryTestCase): |
2415 | 24 | """Generic tests for the Gallery""" | 27 | """Generic tests for the Gallery""" |
2416 | 25 | 28 | ||
2417 | 29 | scenarios = ubuntu_scenarios.get_device_simulation_scenarios() | ||
2418 | 30 | |||
2419 | 26 | def test_select_main_view_must_return_main_window_emulator(self): | 31 | def test_select_main_view_must_return_main_window_emulator(self): |
2420 | 27 | main_view = self.main_view | 32 | main_view = self.main_view |
2421 | 28 | self.assertIsInstance(main_view, ubuntuuitoolkit.MainView) | 33 | self.assertIsInstance(main_view, ubuntuuitoolkit.MainView) |
2422 | @@ -91,13 +96,17 @@ | |||
2423 | 91 | 'sheets', 'animations' | 96 | 'sheets', 'animations' |
2424 | 92 | ] | 97 | ] |
2425 | 93 | 98 | ||
2427 | 94 | scenarios = [ | 99 | pages_scenarios = [ |
2428 | 95 | (name, dict( | 100 | (name, dict( |
2429 | 96 | element_name=name+'Element', | 101 | element_name=name+'Element', |
2430 | 97 | template_name=name+'Template')) | 102 | template_name=name+'Template')) |
2431 | 98 | for name in names | 103 | for name in names |
2432 | 99 | ] | 104 | ] |
2433 | 100 | 105 | ||
2434 | 106 | scenarios = testscenarios.multiply_scenarios( | ||
2435 | 107 | ubuntu_scenarios.get_device_simulation_scenarios(), | ||
2436 | 108 | pages_scenarios) | ||
2437 | 109 | |||
2438 | 101 | def test_open_page(self): | 110 | def test_open_page(self): |
2439 | 102 | self.open_page(self.element_name) | 111 | self.open_page(self.element_name) |
2440 | 103 | element = self.main_view.select_single( | 112 | element = self.main_view.select_single( |
2441 | 104 | 113 | ||
2442 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py' | |||
2443 | --- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py 2014-05-30 14:24:27 +0000 | |||
2444 | +++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py 2014-07-24 02:10:07 +0000 | |||
2445 | @@ -17,11 +17,14 @@ | |||
2446 | 17 | """Tests for the Ubuntu UI Toolkit Gallery - OptionSelector component.""" | 17 | """Tests for the Ubuntu UI Toolkit Gallery - OptionSelector component.""" |
2447 | 18 | 18 | ||
2448 | 19 | import ubuntuuitoolkit | 19 | import ubuntuuitoolkit |
2449 | 20 | from ubuntuuitoolkit import ubuntu_scenarios | ||
2450 | 20 | from ubuntuuitoolkit.tests.gallery import GalleryTestCase | 21 | from ubuntuuitoolkit.tests.gallery import GalleryTestCase |
2451 | 21 | 22 | ||
2452 | 22 | 23 | ||
2453 | 23 | class OptionSelectorTestCase(GalleryTestCase): | 24 | class OptionSelectorTestCase(GalleryTestCase): |
2454 | 24 | 25 | ||
2455 | 26 | scenarios = ubuntu_scenarios.get_device_simulation_scenarios() | ||
2456 | 27 | |||
2457 | 25 | def setUp(self): | 28 | def setUp(self): |
2458 | 26 | super(OptionSelectorTestCase, self).setUp() | 29 | super(OptionSelectorTestCase, self).setUp() |
2459 | 27 | self.open_page('optionSelectorsElement') | 30 | self.open_page('optionSelectorsElement') |
2460 | 28 | 31 | ||
2461 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_scrollbar.py' | |||
2462 | --- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_scrollbar.py 2014-06-09 17:20:43 +0000 | |||
2463 | +++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_scrollbar.py 2014-07-24 02:10:07 +0000 | |||
2464 | @@ -16,11 +16,14 @@ | |||
2465 | 16 | 16 | ||
2466 | 17 | from autopilot import platform | 17 | from autopilot import platform |
2467 | 18 | 18 | ||
2468 | 19 | from ubuntuuitoolkit import ubuntu_scenarios | ||
2469 | 19 | from ubuntuuitoolkit.tests import gallery | 20 | from ubuntuuitoolkit.tests import gallery |
2470 | 20 | 21 | ||
2471 | 21 | 22 | ||
2472 | 22 | class ScrollBarTestCase(gallery.GalleryTestCase): | 23 | class ScrollBarTestCase(gallery.GalleryTestCase): |
2473 | 23 | 24 | ||
2474 | 25 | scenarios = ubuntu_scenarios.get_device_simulation_scenarios() | ||
2475 | 26 | |||
2476 | 24 | def setUp(self): | 27 | def setUp(self): |
2477 | 25 | super(ScrollBarTestCase, self).setUp() | 28 | super(ScrollBarTestCase, self).setUp() |
2478 | 26 | self.open_page('navigationElement') | 29 | self.open_page('navigationElement') |
2479 | @@ -30,9 +33,12 @@ | |||
2480 | 30 | def move_mouse_to_thumb(self): | 33 | def move_mouse_to_thumb(self): |
2481 | 31 | # TODO we need a helper to move the interactive thumb. | 34 | # TODO we need a helper to move the interactive thumb. |
2482 | 32 | # --elopio 2014-05-06 | 35 | # --elopio 2014-05-06 |
2484 | 33 | thumb = self.scrollbar.select_single( | 36 | thumb = self.get_mouse_thumb() |
2485 | 37 | self.pointing_device.move_to_object(thumb) | ||
2486 | 38 | |||
2487 | 39 | def get_mouse_thumb(self): | ||
2488 | 40 | return self.scrollbar.select_single( | ||
2489 | 34 | objectName='interactiveScrollbarThumb') | 41 | objectName='interactiveScrollbarThumb') |
2490 | 35 | self.pointing_device.move_to_object(thumb) | ||
2491 | 36 | 42 | ||
2492 | 37 | def test_scrollbar_must_start_without_interactive_thumb(self): | 43 | def test_scrollbar_must_start_without_interactive_thumb(self): |
2493 | 38 | self.assertEqual(self.scrollbar.interactive, False) | 44 | self.assertEqual(self.scrollbar.interactive, False) |
2494 | @@ -57,7 +63,12 @@ | |||
2495 | 57 | self.assertEqual(flickable.is_child_visible(bottom_section), False) | 63 | self.assertEqual(flickable.is_child_visible(bottom_section), False) |
2496 | 58 | 64 | ||
2497 | 59 | self.move_mouse_to_thumb() | 65 | self.move_mouse_to_thumb() |
2500 | 60 | x, y = self.pointing_device.position() | 66 | mouse_thumb = self.get_mouse_thumb() |
2501 | 61 | self.pointing_device.drag(x, y, x, self.main_view.height) | 67 | x, y, width, height = mouse_thumb.globalRect |
2502 | 68 | start_x = stop_x = x + (width // 2) | ||
2503 | 69 | start_y = y + (height // 0.8) | ||
2504 | 70 | |||
2505 | 71 | self.pointing_device.drag( | ||
2506 | 72 | start_x, start_y, stop_x, self.main_view.height) | ||
2507 | 62 | 73 | ||
2508 | 63 | self.assertEqual(flickable.is_child_visible(bottom_section), True) | 74 | self.assertEqual(flickable.is_child_visible(bottom_section), True) |
2509 | 64 | 75 | ||
2510 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py' | |||
2511 | --- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py 2014-05-30 14:24:27 +0000 | |||
2512 | +++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py 2014-07-24 02:10:07 +0000 | |||
2513 | @@ -16,7 +16,9 @@ | |||
2514 | 16 | 16 | ||
2515 | 17 | """Tests for the Ubuntu UI Toolkit Gallery - TextInput components""" | 17 | """Tests for the Ubuntu UI Toolkit Gallery - TextInput components""" |
2516 | 18 | 18 | ||
2518 | 19 | from ubuntuuitoolkit import emulators | 19 | import testscenarios |
2519 | 20 | |||
2520 | 21 | from ubuntuuitoolkit import emulators, ubuntu_scenarios | ||
2521 | 20 | from ubuntuuitoolkit.tests.gallery import GalleryTestCase | 22 | from ubuntuuitoolkit.tests.gallery import GalleryTestCase |
2522 | 21 | import locale | 23 | import locale |
2523 | 22 | 24 | ||
2524 | @@ -31,7 +33,7 @@ | |||
2525 | 31 | 33 | ||
2526 | 32 | # text_to_write is a function to ensure | 34 | # text_to_write is a function to ensure |
2527 | 33 | # that locale is evaluated after setUp | 35 | # that locale is evaluated after setUp |
2529 | 34 | scenarios = [ | 36 | text_input_scenarios = [ |
2530 | 35 | ('standard textfield', dict( | 37 | ('standard textfield', dict( |
2531 | 36 | objectName='textfield_standard', | 38 | objectName='textfield_standard', |
2532 | 37 | text_to_write=text_to_write_string, | 39 | text_to_write=text_to_write_string, |
2533 | @@ -49,6 +51,10 @@ | |||
2534 | 49 | expected_text='-100123')) | 51 | expected_text='-100123')) |
2535 | 50 | ] | 52 | ] |
2536 | 51 | 53 | ||
2537 | 54 | scenarios = testscenarios.multiply_scenarios( | ||
2538 | 55 | ubuntu_scenarios.get_device_simulation_scenarios(), | ||
2539 | 56 | text_input_scenarios) | ||
2540 | 57 | |||
2541 | 52 | def setUp(self): | 58 | def setUp(self): |
2542 | 53 | super(WriteAndClearTextInputTestCase, self).setUp() | 59 | super(WriteAndClearTextInputTestCase, self).setUp() |
2543 | 54 | # Apply the user locale from the environment | 60 | # Apply the user locale from the environment |
2544 | @@ -74,6 +80,8 @@ | |||
2545 | 74 | 80 | ||
2546 | 75 | class DisabledTextInputTestCase(GalleryTestCase): | 81 | class DisabledTextInputTestCase(GalleryTestCase): |
2547 | 76 | 82 | ||
2548 | 83 | scenarios = ubuntu_scenarios.get_device_simulation_scenarios() | ||
2549 | 84 | |||
2550 | 77 | def setUp(self): | 85 | def setUp(self): |
2551 | 78 | super(DisabledTextInputTestCase, self).setUp() | 86 | super(DisabledTextInputTestCase, self).setUp() |
2552 | 79 | self.open_page('textinputsElement') | 87 | self.open_page('textinputsElement') |
2553 | 80 | 88 | ||
2554 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py' | |||
2555 | --- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py 2014-05-30 14:24:27 +0000 | |||
2556 | +++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py 2014-07-24 02:10:07 +0000 | |||
2557 | @@ -1,6 +1,6 @@ | |||
2558 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
2559 | 2 | # | 2 | # |
2561 | 3 | # Copyright (C) 2012, 2013 Canonical Ltd. | 3 | # Copyright (C) 2012, 2013, 2014 Canonical Ltd. |
2562 | 4 | # | 4 | # |
2563 | 5 | # 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 |
2564 | 6 | # it under the terms of the GNU Lesser General Public License as published by | 6 | # it under the terms of the GNU Lesser General Public License as published by |
2565 | @@ -14,15 +14,17 @@ | |||
2566 | 14 | # You should have received a copy of the GNU Lesser General Public License | 14 | # You should have received a copy of the GNU Lesser General Public License |
2567 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
2568 | 16 | 16 | ||
2570 | 17 | from ubuntuuitoolkit import emulators | 17 | import testscenarios |
2571 | 18 | |||
2572 | 19 | from testtools.matchers import Equals | ||
2573 | 20 | |||
2574 | 21 | from ubuntuuitoolkit import emulators, ubuntu_scenarios | ||
2575 | 18 | from ubuntuuitoolkit.tests import gallery | 22 | from ubuntuuitoolkit.tests import gallery |
2576 | 19 | 23 | ||
2577 | 20 | from testtools.matchers import Equals | ||
2578 | 21 | |||
2579 | 22 | 24 | ||
2580 | 23 | class EnabledTogglesTestCase(gallery.GalleryTestCase): | 25 | class EnabledTogglesTestCase(gallery.GalleryTestCase): |
2581 | 24 | 26 | ||
2583 | 25 | scenarios = [ | 27 | toggles_scenarios = [ |
2584 | 26 | ('checkbox unchecked', dict( | 28 | ('checkbox unchecked', dict( |
2585 | 27 | object_name='checkbox_unchecked', initial_state=False)), | 29 | object_name='checkbox_unchecked', initial_state=False)), |
2586 | 28 | ('checkbox checked', dict( | 30 | ('checkbox checked', dict( |
2587 | @@ -33,6 +35,10 @@ | |||
2588 | 33 | object_name='switch_checked', initial_state=True)) | 35 | object_name='switch_checked', initial_state=True)) |
2589 | 34 | ] | 36 | ] |
2590 | 35 | 37 | ||
2591 | 38 | scenarios = testscenarios.multiply_scenarios( | ||
2592 | 39 | ubuntu_scenarios.get_device_simulation_scenarios(), | ||
2593 | 40 | toggles_scenarios) | ||
2594 | 41 | |||
2595 | 36 | def setUp(self): | 42 | def setUp(self): |
2596 | 37 | super(EnabledTogglesTestCase, self).setUp() | 43 | super(EnabledTogglesTestCase, self).setUp() |
2597 | 38 | self.open_page('togglesElement') | 44 | self.open_page('togglesElement') |
2598 | @@ -49,7 +55,7 @@ | |||
2599 | 49 | 55 | ||
2600 | 50 | class DisabledTogglesTestCase(gallery.GalleryTestCase): | 56 | class DisabledTogglesTestCase(gallery.GalleryTestCase): |
2601 | 51 | 57 | ||
2603 | 52 | scenarios = [ | 58 | toggles_scenarios = [ |
2604 | 53 | ('checkbox disabled unchecked', dict( | 59 | ('checkbox disabled unchecked', dict( |
2605 | 54 | object_name='checkbox_disabled_unchecked', initial_state=False)), | 60 | object_name='checkbox_disabled_unchecked', initial_state=False)), |
2606 | 55 | ('checkbox disabled checked', dict( | 61 | ('checkbox disabled checked', dict( |
2607 | @@ -60,6 +66,10 @@ | |||
2608 | 60 | object_name='switch_disabled_checked', initial_state=True)) | 66 | object_name='switch_disabled_checked', initial_state=True)) |
2609 | 61 | ] | 67 | ] |
2610 | 62 | 68 | ||
2611 | 69 | scenarios = testscenarios.multiply_scenarios( | ||
2612 | 70 | ubuntu_scenarios.get_device_simulation_scenarios(), | ||
2613 | 71 | toggles_scenarios) | ||
2614 | 72 | |||
2615 | 63 | def setUp(self): | 73 | def setUp(self): |
2616 | 64 | super(DisabledTogglesTestCase, self).setUp() | 74 | super(DisabledTogglesTestCase, self).setUp() |
2617 | 65 | self.open_page('togglesElement') | 75 | self.open_page('togglesElement') |
2618 | 66 | 76 | ||
2619 | === modified file 'tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py' | |||
2620 | --- tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py 2014-06-03 20:10:53 +0000 | |||
2621 | +++ tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py 2014-07-24 02:10:07 +0000 | |||
2622 | @@ -24,10 +24,15 @@ | |||
2623 | 24 | # Python 2 add-on: python-mock. | 24 | # Python 2 add-on: python-mock. |
2624 | 25 | import mock | 25 | import mock |
2625 | 26 | import testtools | 26 | import testtools |
2628 | 27 | from autopilot import testcase as autopilot_testcase | 27 | from autopilot import ( |
2629 | 28 | from testtools.matchers import Contains, FileExists, Not | 28 | display, |
2630 | 29 | platform, | ||
2631 | 30 | testcase as autopilot_testcase | ||
2632 | 31 | ) | ||
2633 | 32 | from autopilot.matchers import Eventually | ||
2634 | 33 | from testtools.matchers import Contains, Equals, FileExists, Not | ||
2635 | 29 | 34 | ||
2637 | 30 | from ubuntuuitoolkit import base, environment, fixture_setup | 35 | from ubuntuuitoolkit import base, environment, fixture_setup, tests |
2638 | 31 | 36 | ||
2639 | 32 | 37 | ||
2640 | 33 | class FakeApplicationTestCase(testtools.TestCase): | 38 | class FakeApplicationTestCase(testtools.TestCase): |
2641 | @@ -304,3 +309,99 @@ | |||
2642 | 304 | self.assertTrue( | 309 | self.assertTrue( |
2643 | 305 | os.path.exists( | 310 | os.path.exists( |
2644 | 306 | os.path.join(os.environ.get('HOME'), '.Xauthority'))) | 311 | os.path.join(os.environ.get('HOME'), '.Xauthority'))) |
2645 | 312 | |||
2646 | 313 | |||
2647 | 314 | class HideUnity7LauncherTestCase( | ||
2648 | 315 | tests.UbuntuUIToolkitWithFakeAppRunningTestCase): | ||
2649 | 316 | |||
2650 | 317 | def setUp(self): | ||
2651 | 318 | if platform.model() != 'Desktop': | ||
2652 | 319 | self.skipTest('Unity 7 runs only on desktop.') | ||
2653 | 320 | self.useFixture(fixture_setup.HideUnity7Launcher()) | ||
2654 | 321 | super(HideUnity7LauncherTestCase, self).setUp() | ||
2655 | 322 | |||
2656 | 323 | def test_maximized_application_must_use_all_screen_width(self): | ||
2657 | 324 | application = self.process_manager.get_running_applications()[0] | ||
2658 | 325 | window = application.get_windows()[0] | ||
2659 | 326 | |||
2660 | 327 | # Maximize window. | ||
2661 | 328 | screen = display.Display.create() | ||
2662 | 329 | screen_width = screen.get_screen_width() | ||
2663 | 330 | screen_height = screen.get_screen_height() | ||
2664 | 331 | window.resize(screen_width, screen_height) | ||
2665 | 332 | |||
2666 | 333 | def get_window_width(): | ||
2667 | 334 | _, _, window_width, _ = window.geometry | ||
2668 | 335 | return window_width | ||
2669 | 336 | |||
2670 | 337 | self.assertThat( | ||
2671 | 338 | get_window_width, | ||
2672 | 339 | Eventually(Equals(screen_width))) | ||
2673 | 340 | |||
2674 | 341 | |||
2675 | 342 | class FakeDisplay(object): | ||
2676 | 343 | |||
2677 | 344 | """Fake display with fixed widht and height for use in tests.""" | ||
2678 | 345 | |||
2679 | 346 | def __init__(self, width, height): | ||
2680 | 347 | super(FakeDisplay, self).__init__() | ||
2681 | 348 | self.width = width | ||
2682 | 349 | self.height = height | ||
2683 | 350 | |||
2684 | 351 | def get_screen_width(self): | ||
2685 | 352 | return self.width | ||
2686 | 353 | |||
2687 | 354 | def get_screen_height(self): | ||
2688 | 355 | return self.height | ||
2689 | 356 | |||
2690 | 357 | |||
2691 | 358 | class SimulateDeviceTestCase(autopilot_testcase.AutopilotTestCase): | ||
2692 | 359 | |||
2693 | 360 | scenarios = [ | ||
2694 | 361 | ('Device equal to screen', { | ||
2695 | 362 | 'device_width': 100, 'device_height': 100, 'device_grid_unit': 20, | ||
2696 | 363 | 'screen_width': 100, 'screen_height': 100, | ||
2697 | 364 | 'expected_width': 100, 'expected_height': 100, | ||
2698 | 365 | 'expected_grid_unit': 20}), | ||
2699 | 366 | ('Device smaller than screen', { | ||
2700 | 367 | 'device_width': 100, 'device_height': 90, 'device_grid_unit': 20, | ||
2701 | 368 | 'screen_width': 110, 'screen_height': 100, | ||
2702 | 369 | 'expected_width': 100, 'expected_height': 90, | ||
2703 | 370 | 'expected_grid_unit': 20}), | ||
2704 | 371 | ('Device wider than screen', { | ||
2705 | 372 | 'device_width': 200, 'device_height': 90, 'device_grid_unit': 20, | ||
2706 | 373 | 'screen_width': 110, 'screen_height': 100, | ||
2707 | 374 | 'expected_width': 100, 'expected_height': 45, | ||
2708 | 375 | 'expected_grid_unit': 10}), | ||
2709 | 376 | ('Device taller than screen', { | ||
2710 | 377 | 'device_width': 100, 'device_height': 180, 'device_grid_unit': 20, | ||
2711 | 378 | 'screen_width': 110, 'screen_height': 100, | ||
2712 | 379 | 'expected_width': 50, 'expected_height': 90, | ||
2713 | 380 | 'expected_grid_unit': 10}), | ||
2714 | 381 | ('Device bigger than screen', { | ||
2715 | 382 | 'device_width': 200, 'device_height': 180, 'device_grid_unit': 20, | ||
2716 | 383 | 'screen_width': 110, 'screen_height': 100, | ||
2717 | 384 | 'expected_width': 100, 'expected_height': 90, | ||
2718 | 385 | 'expected_grid_unit': 10}), | ||
2719 | 386 | ] | ||
2720 | 387 | |||
2721 | 388 | def test_simulate_device_fixture_with_size_smaller_than_screen(self): | ||
2722 | 389 | """Test the simulation of a device that fits the screen. | ||
2723 | 390 | |||
2724 | 391 | All the attributes of the fixture must remain the same. | ||
2725 | 392 | |||
2726 | 393 | """ | ||
2727 | 394 | |||
2728 | 395 | simulate_device_fixture = fixture_setup.SimulateDevice( | ||
2729 | 396 | self.device_width, self.device_height, self.device_grid_unit) | ||
2730 | 397 | fake_display = FakeDisplay(self.screen_width, self.screen_height) | ||
2731 | 398 | simulate_device_fixture._screen = fake_display | ||
2732 | 399 | |||
2733 | 400 | self.useFixture(simulate_device_fixture) | ||
2734 | 401 | |||
2735 | 402 | self.assertEqual( | ||
2736 | 403 | int(os.environ.get('GRID_UNIT_PX')), self.expected_grid_unit) | ||
2737 | 404 | self.assertEqual( | ||
2738 | 405 | simulate_device_fixture.app_width, self.expected_width) | ||
2739 | 406 | self.assertEqual( | ||
2740 | 407 | simulate_device_fixture.app_height, self.expected_height) | ||
2741 | 307 | 408 | ||
2742 | === added file 'tests/autopilot/ubuntuuitoolkit/tests/test_ubuntu_scenarios.py' | |||
2743 | --- tests/autopilot/ubuntuuitoolkit/tests/test_ubuntu_scenarios.py 1970-01-01 00:00:00 +0000 | |||
2744 | +++ tests/autopilot/ubuntuuitoolkit/tests/test_ubuntu_scenarios.py 2014-07-24 02:10:07 +0000 | |||
2745 | @@ -0,0 +1,70 @@ | |||
2746 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
2747 | 2 | # | ||
2748 | 3 | # Copyright (C) 2014 Canonical Ltd. | ||
2749 | 4 | # | ||
2750 | 5 | # This program is free software; you can redistribute it and/or modify | ||
2751 | 6 | # it under the terms of the GNU Lesser General Public License as published by | ||
2752 | 7 | # the Free Software Foundation; version 3. | ||
2753 | 8 | # | ||
2754 | 9 | # This program is distributed in the hope that it will be useful, | ||
2755 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2756 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2757 | 12 | # GNU Lesser General Public License for more details. | ||
2758 | 13 | # | ||
2759 | 14 | # You should have received a copy of the GNU Lesser General Public License | ||
2760 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2761 | 16 | |||
2762 | 17 | try: | ||
2763 | 18 | from unittest import mock | ||
2764 | 19 | except ImportError: | ||
2765 | 20 | import mock | ||
2766 | 21 | |||
2767 | 22 | import testtools | ||
2768 | 23 | |||
2769 | 24 | from ubuntuuitoolkit import ubuntu_scenarios | ||
2770 | 25 | |||
2771 | 26 | |||
2772 | 27 | class ScenariosTestCase(testtools.TestCase): | ||
2773 | 28 | |||
2774 | 29 | def test_get_nexus_4_scenario(self): | ||
2775 | 30 | expected_scenarios = [ | ||
2776 | 31 | ('Simulating Nexus 4 in desktop', | ||
2777 | 32 | dict(app_width=768, app_height=1280, grid_unit_px=18)), | ||
2778 | 33 | ] | ||
2779 | 34 | with mock.patch('autopilot.platform.model') as mock_model: | ||
2780 | 35 | mock_model.return_value = 'Desktop' | ||
2781 | 36 | scenarios = ubuntu_scenarios.get_device_simulation_scenarios( | ||
2782 | 37 | devices=ubuntu_scenarios.NEXUS4_DEVICE) | ||
2783 | 38 | self.assertEqual(expected_scenarios, scenarios) | ||
2784 | 39 | |||
2785 | 40 | def test_get_nexus_10_scenario(self): | ||
2786 | 41 | expected_scenarios = [ | ||
2787 | 42 | ('Simulating Nexus 10 in desktop', | ||
2788 | 43 | dict(app_width=2560, app_height=1600, grid_unit_px=20)) | ||
2789 | 44 | ] | ||
2790 | 45 | |||
2791 | 46 | with mock.patch('autopilot.platform.model') as mock_model: | ||
2792 | 47 | mock_model.return_value = 'Desktop' | ||
2793 | 48 | scenarios = ubuntu_scenarios.get_device_simulation_scenarios( | ||
2794 | 49 | devices=ubuntu_scenarios.NEXUS10_DEVICE) | ||
2795 | 50 | self.assertEqual(expected_scenarios, scenarios) | ||
2796 | 51 | |||
2797 | 52 | def test_get_default_scenarios_must_return_supported_devices(self): | ||
2798 | 53 | expected_scenarios = [ | ||
2799 | 54 | ('Simulating Nexus 4 in desktop', | ||
2800 | 55 | dict(app_width=768, app_height=1280, grid_unit_px=18)), | ||
2801 | 56 | ('Simulating Nexus 10 in desktop', | ||
2802 | 57 | dict(app_width=2560, app_height=1600, grid_unit_px=20)) | ||
2803 | 58 | ] | ||
2804 | 59 | |||
2805 | 60 | with mock.patch('autopilot.platform.model') as mock_model: | ||
2806 | 61 | mock_model.return_value = 'Desktop' | ||
2807 | 62 | scenarios = ubuntu_scenarios.get_device_simulation_scenarios() | ||
2808 | 63 | self.assertEqual(expected_scenarios, scenarios) | ||
2809 | 64 | |||
2810 | 65 | def test_get_scenarios_on_device_must_return_no_simulation_scenarios(self): | ||
2811 | 66 | with mock.patch('autopilot.platform.model') as mock_model: | ||
2812 | 67 | mock_model.return_value = 'Not Desktop' | ||
2813 | 68 | scenarios = ubuntu_scenarios.get_device_simulation_scenarios() | ||
2814 | 69 | |||
2815 | 70 | self.assertEqual([('Not Desktop', {})], scenarios) | ||
2816 | 0 | 71 | ||
2817 | === added file 'tests/autopilot/ubuntuuitoolkit/ubuntu_scenarios.py' | |||
2818 | --- tests/autopilot/ubuntuuitoolkit/ubuntu_scenarios.py 1970-01-01 00:00:00 +0000 | |||
2819 | +++ tests/autopilot/ubuntuuitoolkit/ubuntu_scenarios.py 2014-07-24 02:10:07 +0000 | |||
2820 | @@ -0,0 +1,54 @@ | |||
2821 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
2822 | 2 | # | ||
2823 | 3 | # Copyright (C) 2014 Canonical Ltd. | ||
2824 | 4 | # | ||
2825 | 5 | # This program is free software; you can redistribute it and/or modify | ||
2826 | 6 | # it under the terms of the GNU Lesser General Public License as published by | ||
2827 | 7 | # the Free Software Foundation; version 3. | ||
2828 | 8 | # | ||
2829 | 9 | # This program is distributed in the hope that it will be useful, | ||
2830 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2831 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2832 | 12 | # GNU Lesser General Public License for more details. | ||
2833 | 13 | # | ||
2834 | 14 | # You should have received a copy of the GNU Lesser General Public License | ||
2835 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2836 | 16 | |||
2837 | 17 | from autopilot import platform | ||
2838 | 18 | |||
2839 | 19 | |||
2840 | 20 | NEXUS4_DEVICE = 'Nexus4' | ||
2841 | 21 | NEXUS10_DEVICE = 'Nexus10' | ||
2842 | 22 | DEFAULT_DEVICES = (NEXUS4_DEVICE, NEXUS10_DEVICE) | ||
2843 | 23 | |||
2844 | 24 | |||
2845 | 25 | def get_device_simulation_scenarios(devices=DEFAULT_DEVICES): | ||
2846 | 26 | """Return a list of devices to be simulated on tests. | ||
2847 | 27 | |||
2848 | 28 | :param devices: The device or devices to simulate. Default value is all the | ||
2849 | 29 | officially supported devices. | ||
2850 | 30 | :type devices: string or sequence of strings. | ||
2851 | 31 | :return: A list of scenarios to be used with the testscenarios python | ||
2852 | 32 | module, with the values of app_width, app_height and grid_unit | ||
2853 | 33 | corresponding to the selected device. | ||
2854 | 34 | |||
2855 | 35 | """ | ||
2856 | 36 | if platform.model() == 'Desktop': | ||
2857 | 37 | return _get_device_simulation_scenarios_for_desktop(devices) | ||
2858 | 38 | else: | ||
2859 | 39 | return [(platform.model(), {})] | ||
2860 | 40 | |||
2861 | 41 | |||
2862 | 42 | def _get_device_simulation_scenarios_for_desktop(devices): | ||
2863 | 43 | scenarios = [] | ||
2864 | 44 | if NEXUS4_DEVICE in devices: | ||
2865 | 45 | scenarios.append( | ||
2866 | 46 | ('Simulating Nexus 4 in desktop', | ||
2867 | 47 | dict(app_width=768, app_height=1280, grid_unit_px=18)) | ||
2868 | 48 | ) | ||
2869 | 49 | if NEXUS10_DEVICE in devices: | ||
2870 | 50 | scenarios.append( | ||
2871 | 51 | ('Simulating Nexus 10 in desktop', | ||
2872 | 52 | dict(app_width=2560, app_height=1600, grid_unit_px=20)) | ||
2873 | 53 | ) | ||
2874 | 54 | return scenarios | ||
2875 | 0 | 55 | ||
2876 | === modified file 'tests/qmlapicheck.py' | |||
2877 | --- tests/qmlapicheck.py 2014-07-03 13:30:32 +0000 | |||
2878 | +++ tests/qmlapicheck.py 2014-07-24 02:10:07 +0000 | |||
2879 | @@ -23,7 +23,7 @@ | |||
2880 | 23 | 23 | ||
2881 | 24 | if len(sys.argv) < 2 or '-h' in sys.argv or '--help' in sys.argv: | 24 | if len(sys.argv) < 2 or '-h' in sys.argv or '--help' in sys.argv: |
2882 | 25 | basename = os.path.basename(sys.argv[0]) | 25 | basename = os.path.basename(sys.argv[0]) |
2884 | 26 | print ( | 26 | sys.exit( |
2885 | 27 | 'Usage:\n env BUILTINS=foo,bar %s FILENAME [FILENAME2..N]\n\n' | 27 | 'Usage:\n env BUILTINS=foo,bar %s FILENAME [FILENAME2..N]\n\n' |
2886 | 28 | ' Generate a QML API file\n' | 28 | ' Generate a QML API file\n' |
2887 | 29 | 'Example:\n' | 29 | 'Example:\n' |
2888 | @@ -42,7 +42,6 @@ | |||
2889 | 42 | '\n' | 42 | '\n' |
2890 | 43 | 'Use the following command to see changes in the API:\n' | 43 | 'Use the following command to see changes in the API:\n' |
2891 | 44 | ' diff -Fqml -u components.api{,.new}\n' % (basename, basename)) | 44 | ' diff -Fqml -u components.api{,.new}\n' % (basename, basename)) |
2892 | 45 | sys.exit(1) | ||
2893 | 46 | 45 | ||
2894 | 47 | builtins = os.getenv('BUILTINS', '').split(',') | 46 | builtins = os.getenv('BUILTINS', '').split(',') |
2895 | 48 | inputfiles = [] | 47 | inputfiles = [] |
2896 | @@ -96,8 +95,7 @@ | |||
2897 | 96 | 'prototype', | 95 | 'prototype', |
2898 | 97 | 'exports'] | 96 | 'exports'] |
2899 | 98 | else: | 97 | else: |
2902 | 99 | print('Unknown filetype %s' % fileinput.filename()) | 98 | sys.exit('Unknown filetype %s' % fileinput.filename()) |
2901 | 100 | sys.exit(1) | ||
2903 | 101 | if fileinput.filename() in classes: | 99 | if fileinput.filename() in classes: |
2904 | 102 | classname = ' '.join(classes[fileinput.filename()]) | 100 | classname = ' '.join(classes[fileinput.filename()]) |
2905 | 103 | else: | 101 | else: |
2906 | @@ -187,9 +185,9 @@ | |||
2907 | 187 | annotated_properties[name] = 'internal' | 185 | annotated_properties[name] = 'internal' |
2908 | 188 | del annotated_properties['internal'] | 186 | del annotated_properties['internal'] |
2909 | 189 | if name not in annotated_properties: | 187 | if name not in annotated_properties: |
2913 | 190 | print(' %s' % (signature)) | 188 | sys.exit( |
2914 | 191 | print('Error: Missing \\qmlproperty for %s' % name) | 189 | ' %s\nError: Missing \\qmlproperty for %s' |
2915 | 192 | sys.exit(1) | 190 | % (signature, name)) |
2916 | 193 | real_type = annotated_properties[name] | 191 | real_type = annotated_properties[name] |
2917 | 194 | signature = signature.replace('alias', real_type) | 192 | signature = signature.replace('alias', real_type) |
2918 | 195 | elif filetype == 'qmltypes': | 193 | elif filetype == 'qmltypes': |
2919 | 196 | 194 | ||
2920 | === modified file 'tests/qmlapicheck.sh' | |||
2921 | --- tests/qmlapicheck.sh 2014-06-19 07:21:53 +0000 | |||
2922 | +++ tests/qmlapicheck.sh 2014-07-24 02:10:07 +0000 | |||
2923 | @@ -25,7 +25,7 @@ | |||
2924 | 25 | # Silence spam on stderr due to fonts | 25 | # Silence spam on stderr due to fonts |
2925 | 26 | # https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1256999 | 26 | # https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1256999 |
2926 | 27 | # https://bugreports.qt-project.org/browse/QTBUG-36243 | 27 | # https://bugreports.qt-project.org/browse/QTBUG-36243 |
2928 | 28 | qmlplugindump $i 0.1 modules 1>> plugins.qmltypes | 28 | ALARM_BACKEND=memory qmlplugindump $i 0.1 modules 1>> plugins.qmltypes |
2929 | 29 | test $? != 0 && ERRORS=1 | 29 | test $? != 0 && ERRORS=1 |
2930 | 30 | done | 30 | done |
2931 | 31 | test $ERRORS = 1 && echo Error: qmlplugindump failed && exit 1 | 31 | test $ERRORS = 1 && echo Error: qmlplugindump failed && exit 1 |
2932 | 32 | 32 | ||
2933 | === renamed directory 'tests/resources/toolbar' => 'tests/resources/header' | |||
2934 | === modified file 'tests/resources/header/header.qml' | |||
2935 | --- tests/resources/toolbar/header.qml 2014-07-04 11:25:50 +0000 | |||
2936 | +++ tests/resources/header/header.qml 2014-07-24 02:10:07 +0000 | |||
2937 | @@ -178,6 +178,24 @@ | |||
2938 | 178 | ] | 178 | ] |
2939 | 179 | } | 179 | } |
2940 | 180 | } | 180 | } |
2941 | 181 | Tab { | ||
2942 | 182 | title: "Sections" | ||
2943 | 183 | page: Page { | ||
2944 | 184 | id: sectionsPage | ||
2945 | 185 | head { | ||
2946 | 186 | sections { | ||
2947 | 187 | model: ["navy", "lightblue", "brown", "cyan", "darkgrey"] | ||
2948 | 188 | } | ||
2949 | 189 | } | ||
2950 | 190 | Rectangle { | ||
2951 | 191 | anchors { | ||
2952 | 192 | fill: parent | ||
2953 | 193 | margins: units.gu(2) | ||
2954 | 194 | } | ||
2955 | 195 | color: sectionsPage.head.sections.model[sectionsPage.head.sections.selectedIndex] | ||
2956 | 196 | } | ||
2957 | 197 | } | ||
2958 | 198 | } | ||
2959 | 181 | } | 199 | } |
2960 | 182 | } | 200 | } |
2961 | 183 | 201 | ||
2962 | 184 | 202 | ||
2963 | === modified file 'tests/unit/runtest.sh' | |||
2964 | --- tests/unit/runtest.sh 2014-06-16 08:02:48 +0000 | |||
2965 | +++ tests/unit/runtest.sh 2014-07-24 02:10:07 +0000 | |||
2966 | @@ -45,6 +45,7 @@ | |||
2967 | 45 | # https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1256999 | 45 | # https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1256999 |
2968 | 46 | # https://bugreports.qt-project.org/browse/QTBUG-36243 | 46 | # https://bugreports.qt-project.org/browse/QTBUG-36243 |
2969 | 47 | QML2_IMPORT_PATH=../../../modules:$QML2_IMPORT_PATH UBUNTU_UI_TOOLKIT_THEMES_PATH=../../../modules \ | 47 | QML2_IMPORT_PATH=../../../modules:$QML2_IMPORT_PATH UBUNTU_UI_TOOLKIT_THEMES_PATH=../../../modules \ |
2970 | 48 | ALARM_BACKEND=memory \ | ||
2971 | 48 | $_CMD $_ARGS 2>&1 | grep -v 'QFontDatabase: Cannot find font directory' | 49 | $_CMD $_ARGS 2>&1 | grep -v 'QFontDatabase: Cannot find font directory' |
2972 | 49 | # Note: Get first command before the pipe, $? would be ambiguous | 50 | # Note: Get first command before the pipe, $? would be ambiguous |
2973 | 50 | RESULT=${PIPESTATUS[0]} | 51 | RESULT=${PIPESTATUS[0]} |
2974 | 51 | 52 | ||
2975 | === modified file 'tests/unit/tst_components/tst_fontutils.qml' | |||
2976 | --- tests/unit/tst_components/tst_fontutils.qml 2014-04-23 08:50:20 +0000 | |||
2977 | +++ tests/unit/tst_components/tst_fontutils.qml 2014-07-24 02:10:07 +0000 | |||
2978 | @@ -22,12 +22,12 @@ | |||
2979 | 22 | name: "FontUtilsAPI" | 22 | name: "FontUtilsAPI" |
2980 | 23 | 23 | ||
2981 | 24 | function test_modularScale() { | 24 | function test_modularScale() { |
2988 | 25 | compare(FontUtils.modularScale("xx-small"), 0.606, "xx-small scale"); | 25 | compare(FontUtils.modularScale("xx-small"), 0.677, "xx-small scale"); |
2989 | 26 | compare(FontUtils.modularScale("x-small"), 0.707, "x-small scale"); | 26 | compare(FontUtils.modularScale("x-small"), 0.804, "x-small scale"); |
2990 | 27 | compare(FontUtils.modularScale("small"), 0.857, "small scale"); | 27 | compare(FontUtils.modularScale("small"), 0.931, "small scale"); |
2991 | 28 | compare(FontUtils.modularScale("medium"), 1.0, "medium scale"); | 28 | compare(FontUtils.modularScale("medium"), 1.079, "medium scale"); |
2992 | 29 | compare(FontUtils.modularScale("large"), 1.414, "large scale"); | 29 | compare(FontUtils.modularScale("large"), 1.291, "large scale"); |
2993 | 30 | compare(FontUtils.modularScale("x-large"), 1.905, "x-large scale"); | 30 | compare(FontUtils.modularScale("x-large"), 1.714, "x-large scale"); |
2994 | 31 | } | 31 | } |
2995 | 32 | 32 | ||
2996 | 33 | function test_modularScale_failures() { | 33 | function test_modularScale_failures() { |
2997 | @@ -36,12 +36,12 @@ | |||
2998 | 36 | } | 36 | } |
2999 | 37 | 37 | ||
3000 | 38 | function test_sizeToPixels() { | 38 | function test_sizeToPixels() { |
3007 | 39 | compare(FontUtils.sizeToPixels("xx-small"), 0.606 * units.dp(14), "xx-small scale"); | 39 | compare(FontUtils.sizeToPixels("xx-small"), 0.677 * units.dp(14), "xx-small scale"); |
3008 | 40 | compare(FontUtils.sizeToPixels("x-small"), 0.707 * units.dp(14), "x-small scale"); | 40 | compare(FontUtils.sizeToPixels("x-small"), 0.804 * units.dp(14), "x-small scale"); |
3009 | 41 | compare(FontUtils.sizeToPixels("small"), 0.857 * units.dp(14), "small scale"); | 41 | compare(FontUtils.sizeToPixels("small"), 0.931 * units.dp(14), "small scale"); |
3010 | 42 | compare(FontUtils.sizeToPixels("medium"), 1.0 * units.dp(14), "medium scale"); | 42 | compare(FontUtils.sizeToPixels("medium"), 1.079 * units.dp(14), "medium scale"); |
3011 | 43 | compare(FontUtils.sizeToPixels("large"), 1.414 * units.dp(14), "large scale"); | 43 | compare(FontUtils.sizeToPixels("large"), 1.291 * units.dp(14), "large scale"); |
3012 | 44 | compare(FontUtils.sizeToPixels("x-large"), 1.905 * units.dp(14), "x-large scale"); | 44 | compare(FontUtils.sizeToPixels("x-large"), 1.714 * units.dp(14), "x-large scale"); |
3013 | 45 | } | 45 | } |
3014 | 46 | 46 | ||
3015 | 47 | function test_sizeToPixels_failures() { | 47 | function test_sizeToPixels_failures() { |
3016 | 48 | 48 | ||
3017 | === added file 'tests/unit/tst_components/tst_header_sections.qml' | |||
3018 | --- tests/unit/tst_components/tst_header_sections.qml 1970-01-01 00:00:00 +0000 | |||
3019 | +++ tests/unit/tst_components/tst_header_sections.qml 2014-07-24 02:10:07 +0000 | |||
3020 | @@ -0,0 +1,79 @@ | |||
3021 | 1 | /* | ||
3022 | 2 | * Copyright 2014 Canonical Ltd. | ||
3023 | 3 | * | ||
3024 | 4 | * This program is free software; you can redistribute it and/or modify | ||
3025 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
3026 | 6 | * the Free Software Foundation; version 3. | ||
3027 | 7 | * | ||
3028 | 8 | * This program is distributed in the hope that it will be useful, | ||
3029 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3030 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3031 | 11 | * GNU Lesser General Public License for more details. | ||
3032 | 12 | * | ||
3033 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
3034 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3035 | 15 | */ | ||
3036 | 16 | |||
3037 | 17 | import QtQuick 2.2 | ||
3038 | 18 | import QtTest 1.0 | ||
3039 | 19 | import Ubuntu.Components 1.1 | ||
3040 | 20 | import Ubuntu.Test 1.0 | ||
3041 | 21 | |||
3042 | 22 | UbuntuTestCase { | ||
3043 | 23 | name: "PageHeadSectionsAPI" | ||
3044 | 24 | |||
3045 | 25 | MainView { | ||
3046 | 26 | id: mainView | ||
3047 | 27 | width: units.gu(50) | ||
3048 | 28 | height: units.gu(80) | ||
3049 | 29 | |||
3050 | 30 | useDeprecatedToolbar: false | ||
3051 | 31 | |||
3052 | 32 | Page { | ||
3053 | 33 | id: page | ||
3054 | 34 | title: "Sections" | ||
3055 | 35 | head { | ||
3056 | 36 | sections { | ||
3057 | 37 | model: ["one", "two", "three"] | ||
3058 | 38 | } | ||
3059 | 39 | } | ||
3060 | 40 | } | ||
3061 | 41 | } | ||
3062 | 42 | |||
3063 | 43 | function initTestCase() { | ||
3064 | 44 | compare(mainView.active, true, "MainView always active."); | ||
3065 | 45 | compare(page.active, true, "Single page is active in MainView."); | ||
3066 | 46 | } | ||
3067 | 47 | |||
3068 | 48 | function test_number_of_sections() { | ||
3069 | 49 | var sectionsRepeater = findChild(mainView, "page_head_sections_repeater"); | ||
3070 | 50 | compare(sectionsRepeater.count, 3, "Number of sections initialization failed."); | ||
3071 | 51 | page.head.sections.model = ["one"] | ||
3072 | 52 | compare(sectionsRepeater.count, 1, "Number of sections not updated."); | ||
3073 | 53 | page.head.sections.model = ["one", "two", "three"]; | ||
3074 | 54 | compare(sectionsRepeater.count, 3, "Number of sections reverted."); | ||
3075 | 55 | } | ||
3076 | 56 | |||
3077 | 57 | function check_selected_button(numberOfButtons, selectedButtonIndex) { | ||
3078 | 58 | for (var i = 0; i < numberOfButtons; i++) { | ||
3079 | 59 | var button = findChild(mainView, "section_button_"+i); | ||
3080 | 60 | if (i === selectedButtonIndex) { | ||
3081 | 61 | compare(button.selected, true, "Button "+i+" is not selected."); | ||
3082 | 62 | } else { | ||
3083 | 63 | compare(button.selected, false, "Button "+i+" is selected."); | ||
3084 | 64 | } | ||
3085 | 65 | } | ||
3086 | 66 | } | ||
3087 | 67 | |||
3088 | 68 | function test_selected_section() { | ||
3089 | 69 | var sectionsRepeater = findChild(mainView, "page_head_sections_repeater"); | ||
3090 | 70 | var count = sectionsRepeater.count; | ||
3091 | 71 | check_selected_button(count, 0); | ||
3092 | 72 | page.head.sections.selectedIndex = 2; | ||
3093 | 73 | check_selected_button(count, 2); | ||
3094 | 74 | page.head.sections.selectedIndex = 1; | ||
3095 | 75 | check_selected_button(count, 1); | ||
3096 | 76 | page.head.sections.selectedIndex = 0; | ||
3097 | 77 | check_selected_button(count, 0); | ||
3098 | 78 | } | ||
3099 | 79 | } | ||
3100 | 0 | 80 | ||
3101 | === modified file 'tests/unit/tst_components/tst_progressbar.qml' | |||
3102 | --- tests/unit/tst_components/tst_progressbar.qml 2014-04-23 08:50:20 +0000 | |||
3103 | +++ tests/unit/tst_components/tst_progressbar.qml 2014-07-24 02:10:07 +0000 | |||
3104 | @@ -16,7 +16,8 @@ | |||
3105 | 16 | 16 | ||
3106 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
3107 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
3109 | 19 | import Ubuntu.Components 1.1 | 19 | // Note: See tst_progressbar11.qml for the newer API tests |
3110 | 20 | import Ubuntu.Components 1.0 | ||
3111 | 20 | 21 | ||
3112 | 21 | TestCase { | 22 | TestCase { |
3113 | 22 | name: "ProgressBarAPI" | 23 | name: "ProgressBarAPI" |
3114 | @@ -28,6 +29,10 @@ | |||
3115 | 28 | compare(progressBar.indeterminate,newIndeterminated,"can set/get") | 29 | compare(progressBar.indeterminate,newIndeterminated,"can set/get") |
3116 | 29 | } | 30 | } |
3117 | 30 | 31 | ||
3118 | 32 | function test_showProgressPercentageExists() { | ||
3119 | 33 | verify(!progressBar.hasOwnProperty("showProgressPercentage"), "Property absent") | ||
3120 | 34 | } | ||
3121 | 35 | |||
3122 | 31 | function test_maximumValue() { | 36 | function test_maximumValue() { |
3123 | 32 | compare(progressBar.maximumValue,1.0,"is set to 1.0 by default") | 37 | compare(progressBar.maximumValue,1.0,"is set to 1.0 by default") |
3124 | 33 | var newMaximumValue = 20.0 | 38 | var newMaximumValue = 20.0 |
3125 | 34 | 39 | ||
3126 | === added file 'tests/unit/tst_components/tst_progressbar11.qml' | |||
3127 | --- tests/unit/tst_components/tst_progressbar11.qml 1970-01-01 00:00:00 +0000 | |||
3128 | +++ tests/unit/tst_components/tst_progressbar11.qml 2014-07-24 02:10:07 +0000 | |||
3129 | @@ -0,0 +1,38 @@ | |||
3130 | 1 | /* | ||
3131 | 2 | * Copyright 2014 Canonical Ltd. | ||
3132 | 3 | * | ||
3133 | 4 | * This program is free software; you can redistribute it and/or modify | ||
3134 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
3135 | 6 | * the Free Software Foundation; version 3. | ||
3136 | 7 | * | ||
3137 | 8 | * This program is distributed in the hope that it will be useful, | ||
3138 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3139 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3140 | 11 | * GNU Lesser General Public License for more details. | ||
3141 | 12 | * | ||
3142 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
3143 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3144 | 15 | */ | ||
3145 | 16 | |||
3146 | 17 | import QtQuick 2.0 | ||
3147 | 18 | import QtTest 1.0 | ||
3148 | 19 | import Ubuntu.Components 1.1 | ||
3149 | 20 | |||
3150 | 21 | TestCase { | ||
3151 | 22 | name: "ProgressBarAPI" | ||
3152 | 23 | |||
3153 | 24 | function test_showProgressPercentageExists() { | ||
3154 | 25 | verify(progressBar.hasOwnProperty("showProgressPercentage"), "Property missing") | ||
3155 | 26 | } | ||
3156 | 27 | |||
3157 | 28 | function test_noLabel() { | ||
3158 | 29 | compare(progressBar.showProgressPercentage,true, "is set by default") | ||
3159 | 30 | var newShowProgressPercentage = false | ||
3160 | 31 | progressBar.showProgressPercentage = newShowProgressPercentage | ||
3161 | 32 | compare(progressBar.showProgressPercentage, newShowProgressPercentage, "can set/get") | ||
3162 | 33 | } | ||
3163 | 34 | |||
3164 | 35 | ProgressBar { | ||
3165 | 36 | id: progressBar | ||
3166 | 37 | } | ||
3167 | 38 | } | ||
3168 | 0 | 39 | ||
3169 | === added file 'tests/unit_x11/tst_components/tst_animator.qml' | |||
3170 | --- tests/unit_x11/tst_components/tst_animator.qml 1970-01-01 00:00:00 +0000 | |||
3171 | +++ tests/unit_x11/tst_components/tst_animator.qml 2014-07-24 02:10:07 +0000 | |||
3172 | @@ -0,0 +1,75 @@ | |||
3173 | 1 | /* | ||
3174 | 2 | * Copyright 2014 Canonical Ltd. | ||
3175 | 3 | * | ||
3176 | 4 | * This program is free software; you can redistribute it and/or modify | ||
3177 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
3178 | 6 | * the Free Software Foundation; version 3. | ||
3179 | 7 | * | ||
3180 | 8 | * This program is distributed in the hope that it will be useful, | ||
3181 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3182 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3183 | 11 | * GNU Lesser General Public License for more details. | ||
3184 | 12 | * | ||
3185 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
3186 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3187 | 15 | */ | ||
3188 | 16 | |||
3189 | 17 | |||
3190 | 18 | /** | ||
3191 | 19 | * Test to prevent regressions for bug: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1338602 | ||
3192 | 20 | * Activity Indicator crashes in QML/Widget mixed applications | ||
3193 | 21 | */ | ||
3194 | 22 | |||
3195 | 23 | import QtQuick 2.2 | ||
3196 | 24 | import QtQuick.Window 2.1 | ||
3197 | 25 | import QtTest 1.0 | ||
3198 | 26 | import Ubuntu.Components 1.1 | ||
3199 | 27 | |||
3200 | 28 | Item { | ||
3201 | 29 | width: 360 | ||
3202 | 30 | height: 360 | ||
3203 | 31 | Window { | ||
3204 | 32 | id: root | ||
3205 | 33 | width: 360 | ||
3206 | 34 | height: 360 | ||
3207 | 35 | |||
3208 | 36 | property int timeout: 500 | ||
3209 | 37 | property int runs: 20 | ||
3210 | 38 | property bool finished: false | ||
3211 | 39 | |||
3212 | 40 | TestCase { | ||
3213 | 41 | name: "AnimatorRegressionTest" | ||
3214 | 42 | when: windowShown | ||
3215 | 43 | |||
3216 | 44 | function test_show_hide () { | ||
3217 | 45 | tryCompare(root,"finished",true,root.timeout * (root.runs+1)); | ||
3218 | 46 | } | ||
3219 | 47 | } | ||
3220 | 48 | |||
3221 | 49 | Timer { | ||
3222 | 50 | property int hits: 0 | ||
3223 | 51 | interval: root.timeout; running: !root.finished; repeat: !root.finished | ||
3224 | 52 | onTriggered: { | ||
3225 | 53 | hits++; | ||
3226 | 54 | if (hits >= root.runs) { | ||
3227 | 55 | root.visible = true; | ||
3228 | 56 | root.finished = true; | ||
3229 | 57 | return; | ||
3230 | 58 | } | ||
3231 | 59 | |||
3232 | 60 | root.visible = !root.visible | ||
3233 | 61 | } | ||
3234 | 62 | } | ||
3235 | 63 | |||
3236 | 64 | Flow { | ||
3237 | 65 | anchors.fill: parent | ||
3238 | 66 | Repeater { | ||
3239 | 67 | model: 3 | ||
3240 | 68 | |||
3241 | 69 | ActivityIndicator { | ||
3242 | 70 | running: true | ||
3243 | 71 | } | ||
3244 | 72 | } | ||
3245 | 73 | } | ||
3246 | 74 | } | ||
3247 | 75 | } | ||
3248 | 0 | 76 | ||
3249 | === modified file 'tests/unit_x11/tst_components/tst_panel.qml' | |||
3250 | --- tests/unit_x11/tst_components/tst_panel.qml 2014-04-23 08:50:20 +0000 | |||
3251 | +++ tests/unit_x11/tst_components/tst_panel.qml 2014-07-24 02:10:07 +0000 | |||
3252 | @@ -17,6 +17,7 @@ | |||
3253 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
3254 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
3255 | 19 | import Ubuntu.Components 1.1 | 19 | import Ubuntu.Components 1.1 |
3256 | 20 | import Ubuntu.Test 1.0 | ||
3257 | 20 | 21 | ||
3258 | 21 | Item { | 22 | Item { |
3259 | 22 | width: 200 | 23 | width: 200 |
3260 | @@ -37,7 +38,7 @@ | |||
3261 | 37 | } | 38 | } |
3262 | 38 | } | 39 | } |
3263 | 39 | 40 | ||
3265 | 40 | TestCase { | 41 | UbuntuTestCase { |
3266 | 41 | id: testCase | 42 | id: testCase |
3267 | 42 | name: "PanelAPI" | 43 | name: "PanelAPI" |
3268 | 43 | when: windowShown | 44 | when: windowShown |
3269 | @@ -61,6 +62,21 @@ | |||
3270 | 61 | compare(panel.align, Qt.AlignBottom, "Can set align to bottom"); | 62 | compare(panel.align, Qt.AlignBottom, "Can set align to bottom"); |
3271 | 62 | } | 63 | } |
3272 | 63 | 64 | ||
3273 | 65 | function test_height() { | ||
3274 | 66 | var bar = findChild(panel, "bar_item"); | ||
3275 | 67 | // panel is not opened | ||
3276 | 68 | panel.height = 123; | ||
3277 | 69 | compare(bar.y, 123, "Panel is properly closed after changing height"); | ||
3278 | 70 | panel.open(); wait(500); | ||
3279 | 71 | compare(bar.y, 0, "Panel opens properly after changing height"); | ||
3280 | 72 | panel.height = 78; | ||
3281 | 73 | compare(bar.y, 0, "Panel stays propery opened after changing height"); | ||
3282 | 74 | panel.close(); wait(500); | ||
3283 | 75 | compare(bar.y, 78, "Panel closes properly after changing height"); | ||
3284 | 76 | panel.height = root.height / 2; | ||
3285 | 77 | compare(bar.y, root.height/2, "Panel stays closed properly after changing height"); | ||
3286 | 78 | } | ||
3287 | 79 | |||
3288 | 64 | function test_opened() { | 80 | function test_opened() { |
3289 | 65 | panel.open(); | 81 | panel.open(); |
3290 | 66 | compare(panel.opened, true, "Can set opened"); | 82 | compare(panel.opened, true, "Can set opened"); |
3291 | @@ -167,10 +183,14 @@ | |||
3292 | 167 | } | 183 | } |
3293 | 168 | 184 | ||
3294 | 169 | function test_clickToDeactivate() { | 185 | function test_clickToDeactivate() { |
3295 | 186 | // deprecated test. This functionality is only there for backwards compatibility | ||
3296 | 187 | panel.__closeOnContentsClicks = true; | ||
3297 | 170 | panel.open(); | 188 | panel.open(); |
3298 | 171 | compare(panel.opened && panel.align === Qt.AlignBottom, true, "Panel is opened and bottom-aligned"); | 189 | compare(panel.opened && panel.align === Qt.AlignBottom, true, "Panel is opened and bottom-aligned"); |
3299 | 172 | mouseClick(root, root.width / 2, 5, Qt.LeftButton); | 190 | mouseClick(root, root.width / 2, 5, Qt.LeftButton); |
3300 | 173 | compare(panel.opened, false, "Panel is deactivated by clicking in the view outside of the panel"); | 191 | compare(panel.opened, false, "Panel is deactivated by clicking in the view outside of the panel"); |
3301 | 192 | // reset property to default value | ||
3302 | 193 | panel.__closeOnContentsClicks = false; | ||
3303 | 174 | } | 194 | } |
3304 | 175 | 195 | ||
3305 | 176 | function test_hideTimeout_bug1249031() { | 196 | function test_hideTimeout_bug1249031() { |
3306 | 177 | 197 | ||
3307 | === modified file 'tests/unit_x11/tst_components/tst_textinput_touch.qml' | |||
3308 | --- tests/unit_x11/tst_components/tst_textinput_touch.qml 2014-06-24 08:42:47 +0000 | |||
3309 | +++ tests/unit_x11/tst_components/tst_textinput_touch.qml 2014-07-24 02:10:07 +0000 | |||
3310 | @@ -192,15 +192,15 @@ | |||
3311 | 192 | verify(selectedText !== "", "No text selected!"); | 192 | verify(selectedText !== "", "No text selected!"); |
3312 | 193 | 193 | ||
3313 | 194 | popupSpy.target = findChild(data.input, "input_handler"); | 194 | popupSpy.target = findChild(data.input, "input_handler"); |
3315 | 195 | TestExtras.touchLongPress(0, data.input, guPoint(1, 1)); | 195 | TestExtras.touchLongPress(0, data.input, guPoint(2, 2)); |
3316 | 196 | waitForRendering(data.input, 500); | 196 | waitForRendering(data.input, 500); |
3317 | 197 | popupSpy.wait(); | 197 | popupSpy.wait(); |
3318 | 198 | compare(data.input.selectedText, selectedText, "Text selection should be the same!"); | 198 | compare(data.input.selectedText, selectedText, "Text selection should be the same!"); |
3319 | 199 | 199 | ||
3320 | 200 | // cleanup | 200 | // cleanup |
3322 | 201 | TestExtras.touchRelease(0, data.input, guPoint(1, 1)); | 201 | TestExtras.touchRelease(0, data.input, guPoint(2, 2)); |
3323 | 202 | // dismiss popover | 202 | // dismiss popover |
3325 | 203 | TestExtras.touchClick(0, testMain, 0, 0); | 203 | TestExtras.touchClick(0, testMain, guPoint(0, 0)); |
3326 | 204 | } | 204 | } |
3327 | 205 | 205 | ||
3328 | 206 | function test_drag_cursor_handler_data() { | 206 | function test_drag_cursor_handler_data() { |
3329 | @@ -275,9 +275,7 @@ | |||
3330 | 275 | flickerSpy.target = outerFlicker; | 275 | flickerSpy.target = outerFlicker; |
3331 | 276 | autoSizeTextArea.focus = data.focused; | 276 | autoSizeTextArea.focus = data.focused; |
3332 | 277 | var editor = findChild(autoSizeTextArea, "text_input"); | 277 | var editor = findChild(autoSizeTextArea, "text_input"); |
3333 | 278 | wait(5000) | ||
3334 | 279 | TestExtras.touchDrag(0, editor, guPoint(0, 0), guPoint(0, 40)); | 278 | TestExtras.touchDrag(0, editor, guPoint(0, 0), guPoint(0, 40)); |
3335 | 280 | wait(5000) | ||
3336 | 281 | flickerSpy.wait(); | 279 | flickerSpy.wait(); |
3337 | 282 | } | 280 | } |
3338 | 283 | } | 281 | } |
3339 | 284 | 282 | ||
3340 | === modified file 'tests/unit_x11/tst_test/tst_ubuntutestcase.qml' | |||
3341 | --- tests/unit_x11/tst_test/tst_ubuntutestcase.qml 2014-06-24 07:01:06 +0000 | |||
3342 | +++ tests/unit_x11/tst_test/tst_ubuntutestcase.qml 2014-07-24 02:10:07 +0000 | |||
3343 | @@ -17,11 +17,12 @@ | |||
3344 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
3345 | 18 | import QtTest 1.0 | 18 | import QtTest 1.0 |
3346 | 19 | import Ubuntu.Test 1.0 | 19 | import Ubuntu.Test 1.0 |
3347 | 20 | import Ubuntu.Components 1.0 | ||
3348 | 20 | 21 | ||
3349 | 21 | Rectangle { | 22 | Rectangle { |
3350 | 22 | id: root | 23 | id: root |
3351 | 23 | width: 800 | 24 | width: 800 |
3353 | 24 | height: 600 | 25 | height: 1000 |
3354 | 25 | 26 | ||
3355 | 26 | Column { | 27 | Column { |
3356 | 27 | anchors.fill: parent | 28 | anchors.fill: parent |
3357 | @@ -73,6 +74,9 @@ | |||
3358 | 73 | height: 1000 | 74 | height: 1000 |
3359 | 74 | } | 75 | } |
3360 | 75 | } | 76 | } |
3361 | 77 | TextField { | ||
3362 | 78 | id: textField | ||
3363 | 79 | } | ||
3364 | 76 | } | 80 | } |
3365 | 77 | 81 | ||
3366 | 78 | UbuntuTestCase { | 82 | UbuntuTestCase { |
3367 | @@ -173,6 +177,11 @@ | |||
3368 | 173 | flick(flicker, flicker.width, flicker.height, -flicker.width, -flicker.height, 400, 100); | 177 | flick(flicker, flicker.width, flicker.height, -flicker.width, -flicker.height, 400, 100); |
3369 | 174 | movementSpy.wait(); | 178 | movementSpy.wait(); |
3370 | 175 | } | 179 | } |
3371 | 180 | function test_typeString() { | ||
3372 | 181 | textField.forceActiveFocus(); | ||
3373 | 182 | typeString("Hello Ubuntu"); | ||
3374 | 183 | tryCompare(textField, "text", "Hello Ubuntu"); | ||
3375 | 184 | } | ||
3376 | 176 | 185 | ||
3377 | 177 | SignalSpy { | 186 | SignalSpy { |
3378 | 178 | id: touchPressSpy | 187 | id: touchPressSpy |
FAILED: Continuous integration, rev:1162 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- ci/2112/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/2371 jenkins. qa.ubuntu. com/job/ generic- mediumtests- utopic/ 1941 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- utopic- amd64-ci/ 58 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- utopic- armhf-ci/ 58 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- utopic- armhf-ci/ 58/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- mako/2547 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/3591 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/3591/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 10281 jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-utopic/ 1626 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/2186 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/2186/ artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- ui-toolkit- ci/2112/ rebuild
http://