Merge lp:~tpeeters/ubuntu-ui-toolkit/noViewReference into lp:ubuntu-ui-toolkit
- noViewReference
- Merge into trunk
Proposed by
Tim Peeters
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~tpeeters/ubuntu-ui-toolkit/noViewReference | ||||
Merge into: | lp:ubuntu-ui-toolkit | ||||
Diff against target: |
1370 lines (+614/-117) 34 files modified
components.api (+3/-0) debian/control.gles (+1/-1) examples/ubuntu-ui-toolkit-gallery/Colors.qml (+8/-6) examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml (+41/-14) examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml (+8/-8) src/Ubuntu/Components/1.3/AdaptivePageLayout.qml (+4/-3) src/Ubuntu/Components/1.3/Tabs.qml (+0/-6) src/Ubuntu/Components/1.3/TextArea.qml (+16/-10) src/Ubuntu/Components/1.3/TextField.qml (+3/-4) src/Ubuntu/Components/1.3/ToolbarButton.qml (+1/-1) src/Ubuntu/Components/1.3/UbuntuListView.qml (+3/-1) src/Ubuntu/Components/Themes/1.3/Palette.qml (+5/-0) src/Ubuntu/Components/Themes/1.3/PaletteValues.qml (+11/-1) src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml (+3/-1) src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml (+2/-3) src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml (+1/-1) src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml (+21/-5) src/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml (+36/-17) src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHeadStyle.qml (+2/-2) src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml (+2/-2) src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml (+2/-2) src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml (+37/-13) src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml (+3/-1) src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml (+3/-5) src/Ubuntu/Components/plugin/ucheader.cpp (+1/-1) src/Ubuntu/Components/plugin/uclistitem.cpp (+0/-3) src/Ubuntu/Components/plugin/ucmainviewbase.cpp (+6/-1) src/Ubuntu/Components/plugin/ucstyleditembase.cpp (+29/-0) tests/packaging-sorting.sh (+2/-0) tests/unit_x11/tst_components/tst_pulltorefresh_listview.qml (+1/-1) tests/unit_x11/tst_components/tst_pulltorefresh_pagestack_topmargin.qml (+86/-0) tests/unit_x11/tst_components/tst_pulltorefresh_topmargin.qml (+59/-0) tests/unit_x11/tst_components/tst_tabs11.qml (+198/-0) tests/unit_x11/tst_components/tst_tabs13.qml (+16/-4) |
||||
To merge this branch: | bzr merge lp:~tpeeters/ubuntu-ui-toolkit/noViewReference | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Ubuntu SDK team | Pending | ||
Review via email:
|
Commit message
Fix reference error in PullToRefreshStyle.
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
review:
Needs Fixing
(continuous-integration)
- 1981. By Tim Peeters
-
rename view to flickable
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'components.api' | |||
2 | --- components.api 2016-04-25 10:45:41 +0000 | |||
3 | +++ components.api 2016-05-18 10:22:28 +0000 | |||
4 | @@ -872,6 +872,7 @@ | |||
5 | 872 | property PaletteValues selected | 872 | property PaletteValues selected |
6 | 873 | Ubuntu.Components.Themes.Palette 1.3: QtObject | 873 | Ubuntu.Components.Themes.Palette 1.3: QtObject |
7 | 874 | property PaletteValues disabled | 874 | property PaletteValues disabled |
8 | 875 | property PaletteValues focused | ||
9 | 875 | property PaletteValues highlighted | 876 | property PaletteValues highlighted |
10 | 876 | property PaletteValues normal | 877 | property PaletteValues normal |
11 | 877 | property PaletteValues selected | 878 | property PaletteValues selected |
12 | @@ -908,6 +909,8 @@ | |||
13 | 908 | property color overlay | 909 | property color overlay |
14 | 909 | property color overlaySecondaryText | 910 | property color overlaySecondaryText |
15 | 910 | property color overlayText | 911 | property color overlayText |
16 | 912 | property color position | ||
17 | 913 | property color positionText | ||
18 | 911 | property color positive | 914 | property color positive |
19 | 912 | property color positiveText | 915 | property color positiveText |
20 | 913 | property color raised | 916 | property color raised |
21 | 914 | 917 | ||
22 | === modified file 'debian/control.gles' | |||
23 | --- debian/control.gles 2016-04-21 13:10:34 +0000 | |||
24 | +++ debian/control.gles 2016-05-18 10:22:28 +0000 | |||
25 | @@ -32,8 +32,8 @@ | |||
26 | 32 | libxkbcommon-dev, | 32 | libxkbcommon-dev, |
27 | 33 | libxrender-dev, | 33 | libxrender-dev, |
28 | 34 | locales, | 34 | locales, |
29 | 35 | pep8, | ||
30 | 35 | python-autopilot (>= 1.4), | 36 | python-autopilot (>= 1.4), |
31 | 36 | pep8, | ||
32 | 37 | python3-sphinx, | 37 | python3-sphinx, |
33 | 38 | python3:any, | 38 | python3:any, |
34 | 39 | python:any, | 39 | python:any, |
35 | 40 | 40 | ||
36 | === modified file 'examples/ubuntu-ui-toolkit-gallery/Colors.qml' | |||
37 | --- examples/ubuntu-ui-toolkit-gallery/Colors.qml 2016-03-01 15:08:08 +0000 | |||
38 | +++ examples/ubuntu-ui-toolkit-gallery/Colors.qml 2016-05-18 10:22:28 +0000 | |||
39 | @@ -29,7 +29,7 @@ | |||
40 | 29 | className: "Palette" | 29 | className: "Palette" |
41 | 30 | documentation: "qml-palette.html" | 30 | documentation: "qml-palette.html" |
42 | 31 | 31 | ||
44 | 32 | property var palettes: ["normal", "disabled", "selected", "selectedDisabled", "highlighted"] | 32 | property var palettes: ["normal", "disabled", "selected", "selectedDisabled", "highlighted", "focused"] |
45 | 33 | property var paletteValues: [["background", ["backgroundText", "backgroundSecondaryText", "backgroundTertiaryText"]], | 33 | property var paletteValues: [["background", ["backgroundText", "backgroundSecondaryText", "backgroundTertiaryText"]], |
46 | 34 | ["base", ["baseText"]], | 34 | ["base", ["baseText"]], |
47 | 35 | ["foreground", ["foregroundText"]], | 35 | ["foreground", ["foregroundText"]], |
48 | @@ -40,7 +40,9 @@ | |||
49 | 40 | ["overlay", ["overlayText", "overlaySecondaryText"]], | 40 | ["overlay", ["overlayText", "overlaySecondaryText"]], |
50 | 41 | ["positive", ["positiveText"]], | 41 | ["positive", ["positiveText"]], |
51 | 42 | ["raised", ["raisedText", "raisedSecondaryText"]], | 42 | ["raised", ["raisedText", "raisedSecondaryText"]], |
53 | 43 | ["selection", ["selectionText"]]] | 43 | ["selection", ["selectionText"]], |
54 | 44 | ["position", ["positionText"]], | ||
55 | 45 | ] | ||
56 | 44 | 46 | ||
57 | 45 | Flow { | 47 | Flow { |
58 | 46 | id: paletteFlow | 48 | id: paletteFlow |
59 | @@ -75,7 +77,7 @@ | |||
60 | 75 | property string mainColor: modelData[0] | 77 | property string mainColor: modelData[0] |
61 | 76 | property var textColors: modelData[1] | 78 | property var textColors: modelData[1] |
62 | 77 | property bool previewed: paletteFlow.previewed == paletteColor | 79 | property bool previewed: paletteFlow.previewed == paletteColor |
64 | 78 | width: units.gu(4) | 80 | width: units.gu(8) |
65 | 79 | height: units.gu(5) | 81 | height: units.gu(5) |
66 | 80 | z: previewed ? 10 : 0 | 82 | z: previewed ? 10 : 0 |
67 | 81 | 83 | ||
68 | @@ -106,7 +108,7 @@ | |||
69 | 106 | 108 | ||
70 | 107 | Rectangle { | 109 | Rectangle { |
71 | 108 | anchors.fill: parent | 110 | anchors.fill: parent |
73 | 109 | color: palette[mainColor] | 111 | color: palette ? palette[mainColor] : "transparent" |
74 | 110 | border.width: color == theme.palette.normal.background ? units.dp(1) : 0 | 112 | border.width: color == theme.palette.normal.background ? units.dp(1) : 0 |
75 | 111 | border.color: theme.palette.normal.backgroundText | 113 | border.color: theme.palette.normal.backgroundText |
76 | 112 | } | 114 | } |
77 | @@ -124,8 +126,8 @@ | |||
78 | 124 | model: textColors | 126 | model: textColors |
79 | 125 | Label { | 127 | Label { |
80 | 126 | width: previewed ? implicitWidth : parent.width | 128 | width: previewed ? implicitWidth : parent.width |
83 | 127 | text: previewed ? modelData : modelData.slice(0, 4) | 129 | text: previewed ? modelData : modelData.slice(0, 10) |
84 | 128 | color: palette[modelData] | 130 | color: palette ? palette[modelData] : "transparent" |
85 | 129 | textSize: previewed ? Label.Medium : Label.XSmall | 131 | textSize: previewed ? Label.Medium : Label.XSmall |
86 | 130 | elide: Text.ElideRight | 132 | elide: Text.ElideRight |
87 | 131 | } | 133 | } |
88 | 132 | 134 | ||
89 | === modified file 'examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml' | |||
90 | --- examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml 2016-02-17 14:45:09 +0000 | |||
91 | +++ examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml 2016-05-18 10:22:28 +0000 | |||
92 | @@ -26,7 +26,47 @@ | |||
93 | 26 | className: "PageHeader" | 26 | className: "PageHeader" |
94 | 27 | 27 | ||
95 | 28 | Label { | 28 | Label { |
97 | 29 | text: "Use the icons in the header." | 29 | text: "Use the icons in the header for search and edit header." |
98 | 30 | } | ||
99 | 31 | |||
100 | 32 | Grid { | ||
101 | 33 | id: switchGrid | ||
102 | 34 | columns: 2 | ||
103 | 35 | spacing: units.gu(1) | ||
104 | 36 | anchors { | ||
105 | 37 | left: parent.left | ||
106 | 38 | leftMargin: units.gu(5) | ||
107 | 39 | } | ||
108 | 40 | |||
109 | 41 | Switch { | ||
110 | 42 | id: lockedSwitch | ||
111 | 43 | checked: standardHeader.extension | ||
112 | 44 | onTriggered: { | ||
113 | 45 | if (standardHeader.extension) { | ||
114 | 46 | standardHeader.extension = null; | ||
115 | 47 | } else { | ||
116 | 48 | standardHeader.extension = sections; | ||
117 | 49 | } | ||
118 | 50 | } | ||
119 | 51 | } | ||
120 | 52 | Label { | ||
121 | 53 | text: "Sections" | ||
122 | 54 | } | ||
123 | 55 | |||
124 | 56 | Switch { | ||
125 | 57 | id: subtitleSwitch | ||
126 | 58 | checked: standardHeader.subtitle | ||
127 | 59 | onTriggered: { | ||
128 | 60 | if (standardHeader.subtitle) { | ||
129 | 61 | standardHeader.subtitle = ""; | ||
130 | 62 | } else { | ||
131 | 63 | standardHeader.subtitle = "Hello, this is your subtitle"; | ||
132 | 64 | } | ||
133 | 65 | } | ||
134 | 66 | } | ||
135 | 67 | Label { | ||
136 | 68 | text: "Subtitle" | ||
137 | 69 | } | ||
138 | 30 | } | 70 | } |
139 | 31 | } | 71 | } |
140 | 32 | 72 | ||
141 | @@ -44,19 +84,6 @@ | |||
142 | 44 | iconName: "edit" | 84 | iconName: "edit" |
143 | 45 | text: "Edit" | 85 | text: "Edit" |
144 | 46 | onTriggered: page.header = editHeader | 86 | onTriggered: page.header = editHeader |
145 | 47 | }, | ||
146 | 48 | Action { | ||
147 | 49 | iconName: standardHeader.extension === sections | ||
148 | 50 | ? "media-playback-stop" | ||
149 | 51 | : "filters" | ||
150 | 52 | text: "Sections" | ||
151 | 53 | onTriggered: { | ||
152 | 54 | if (standardHeader.extension) { | ||
153 | 55 | standardHeader.extension = null; | ||
154 | 56 | } else { | ||
155 | 57 | standardHeader.extension = sections; | ||
156 | 58 | } | ||
157 | 59 | } | ||
158 | 60 | } | 87 | } |
159 | 61 | ] | 88 | ] |
160 | 62 | 89 | ||
161 | 63 | 90 | ||
162 | === modified file 'examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml' | |||
163 | --- examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml 2015-11-09 14:46:02 +0000 | |||
164 | +++ examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml 2016-05-18 10:22:28 +0000 | |||
165 | @@ -28,8 +28,8 @@ | |||
166 | 28 | TemplateRow { | 28 | TemplateRow { |
167 | 29 | title: i18n.tr("Upwards") | 29 | title: i18n.tr("Upwards") |
168 | 30 | Rectangle { | 30 | Rectangle { |
171 | 31 | width: units.gu(40) | 31 | width: parent.width / 1.5 |
172 | 32 | height: units.gu(20) | 32 | height: width / 2 |
173 | 33 | color: theme.palette.normal.foreground | 33 | color: theme.palette.normal.foreground |
174 | 34 | 34 | ||
175 | 35 | SwipeArea { | 35 | SwipeArea { |
176 | @@ -56,8 +56,8 @@ | |||
177 | 56 | TemplateRow { | 56 | TemplateRow { |
178 | 57 | title: i18n.tr("Downwards") | 57 | title: i18n.tr("Downwards") |
179 | 58 | Rectangle { | 58 | Rectangle { |
182 | 59 | width: units.gu(40) | 59 | width: parent.width / 1.5 |
183 | 60 | height: units.gu(20) | 60 | height: width / 2 |
184 | 61 | color: theme.palette.normal.foreground | 61 | color: theme.palette.normal.foreground |
185 | 62 | 62 | ||
186 | 63 | SwipeArea { | 63 | SwipeArea { |
187 | @@ -84,8 +84,8 @@ | |||
188 | 84 | TemplateRow { | 84 | TemplateRow { |
189 | 85 | title: i18n.tr("Rightwards") | 85 | title: i18n.tr("Rightwards") |
190 | 86 | Rectangle { | 86 | Rectangle { |
193 | 87 | width: units.gu(40) | 87 | width: parent.width / 1.5 |
194 | 88 | height: units.gu(20) | 88 | height: width / 2 |
195 | 89 | color: theme.palette.normal.foreground | 89 | color: theme.palette.normal.foreground |
196 | 90 | 90 | ||
197 | 91 | SwipeArea { | 91 | SwipeArea { |
198 | @@ -114,8 +114,8 @@ | |||
199 | 114 | TemplateRow { | 114 | TemplateRow { |
200 | 115 | title: i18n.tr("Leftwards") | 115 | title: i18n.tr("Leftwards") |
201 | 116 | Rectangle { | 116 | Rectangle { |
204 | 117 | width: units.gu(40) | 117 | width: parent.width / 1.5 |
205 | 118 | height: units.gu(20) | 118 | height: width / 2 |
206 | 119 | color: theme.palette.normal.foreground | 119 | color: theme.palette.normal.foreground |
207 | 120 | 120 | ||
208 | 121 | SwipeArea { | 121 | SwipeArea { |
209 | 122 | 122 | ||
210 | === modified file 'src/Ubuntu/Components/1.3/AdaptivePageLayout.qml' | |||
211 | --- src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2016-03-16 09:15:39 +0000 | |||
212 | +++ src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2016-05-18 10:22:28 +0000 | |||
213 | @@ -788,7 +788,7 @@ | |||
214 | 788 | bottom: parent.bottom | 788 | bottom: parent.bottom |
215 | 789 | left: parent.left | 789 | left: parent.left |
216 | 790 | right: parent.right | 790 | right: parent.right |
218 | 791 | rightMargin: dividerThickness | 791 | rightMargin: dividerThickness + verticalDivider.width |
219 | 792 | } | 792 | } |
220 | 793 | Item { | 793 | Item { |
221 | 794 | id: hiddenItem | 794 | id: hiddenItem |
222 | @@ -806,6 +806,7 @@ | |||
223 | 806 | left: parent.left | 806 | left: parent.left |
224 | 807 | top: parent.top | 807 | top: parent.top |
225 | 808 | right: parent.right | 808 | right: parent.right |
226 | 809 | rightMargin: dividerThickness + verticalDivider.width | ||
227 | 809 | } | 810 | } |
228 | 810 | height: body.headerHeight | 811 | height: body.headerHeight |
229 | 811 | 812 | ||
230 | @@ -856,7 +857,7 @@ | |||
231 | 856 | right: parent.right | 857 | right: parent.right |
232 | 857 | rightMargin: dividerThickness | 858 | rightMargin: dividerThickness |
233 | 858 | } | 859 | } |
235 | 859 | width: (column == (d.columns - 1)) || !pageWrapper ? 0 : units.dp(1) | 860 | width: (column == (d.columns - 1)) ? 0 : units.dp(1) |
236 | 860 | color: theme.palette.normal.base | 861 | color: theme.palette.normal.base |
237 | 861 | MouseArea { | 862 | MouseArea { |
238 | 862 | id: resizerSensing | 863 | id: resizerSensing |
239 | @@ -923,7 +924,7 @@ | |||
240 | 923 | wrapper.active = false; | 924 | wrapper.active = false; |
241 | 924 | subHeader.config = null; | 925 | subHeader.config = null; |
242 | 925 | pageWrapper = null; | 926 | pageWrapper = null; |
244 | 926 | wrapper.parent = hiddenPool; | 927 | wrapper.parent = hiddenItem; |
245 | 927 | wrapper.pageHolder = null; | 928 | wrapper.pageHolder = null; |
246 | 928 | return wrapper; | 929 | return wrapper; |
247 | 929 | } | 930 | } |
248 | 930 | 931 | ||
249 | === modified file 'src/Ubuntu/Components/1.3/Tabs.qml' | |||
250 | --- src/Ubuntu/Components/1.3/Tabs.qml 2015-12-08 18:34:40 +0000 | |||
251 | +++ src/Ubuntu/Components/1.3/Tabs.qml 2016-05-18 10:22:28 +0000 | |||
252 | @@ -49,12 +49,6 @@ | |||
253 | 49 | anchors.centerIn: parent | 49 | anchors.centerIn: parent |
254 | 50 | text: "A centered label" | 50 | text: "A centered label" |
255 | 51 | } | 51 | } |
256 | 52 | tools: ToolbarItems { | ||
257 | 53 | ToolbarButton { | ||
258 | 54 | text: "action" | ||
259 | 55 | onTriggered: print("action triggered") | ||
260 | 56 | } | ||
261 | 57 | } | ||
262 | 58 | } | 52 | } |
263 | 59 | } | 53 | } |
264 | 60 | Tab { | 54 | Tab { |
265 | 61 | 55 | ||
266 | === modified file 'src/Ubuntu/Components/1.3/TextArea.qml' | |||
267 | --- src/Ubuntu/Components/1.3/TextArea.qml 2016-04-26 05:33:41 +0000 | |||
268 | +++ src/Ubuntu/Components/1.3/TextArea.qml 2016-05-18 10:22:28 +0000 | |||
269 | @@ -769,6 +769,7 @@ | |||
270 | 769 | property string displayText: editor.getText(0, editor.length) | 769 | property string displayText: editor.getText(0, editor.length) |
271 | 770 | property real frameSpacing: control.__styleInstance.frameSpacing | 770 | property real frameSpacing: control.__styleInstance.frameSpacing |
272 | 771 | property real minimumSize: units.gu(4) | 771 | property real minimumSize: units.gu(4) |
273 | 772 | property real scrollbarSpacing: rightScrollbar.__interactive ? units.gu(2) : 0 | ||
274 | 772 | 773 | ||
275 | 773 | function linesHeight(lines) | 774 | function linesHeight(lines) |
276 | 774 | { | 775 | { |
277 | @@ -824,15 +825,6 @@ | |||
278 | 824 | } | 825 | } |
279 | 825 | 826 | ||
280 | 826 | //scrollbars and flickable | 827 | //scrollbars and flickable |
281 | 827 | Scrollbar { | ||
282 | 828 | id: rightScrollbar | ||
283 | 829 | flickableItem: flicker | ||
284 | 830 | } | ||
285 | 831 | Scrollbar { | ||
286 | 832 | id: bottomScrollbar | ||
287 | 833 | flickableItem: flicker | ||
288 | 834 | align: Qt.AlignBottom | ||
289 | 835 | } | ||
290 | 836 | Flickable { | 828 | Flickable { |
291 | 837 | id: flicker | 829 | id: flicker |
292 | 838 | objectName: "input_scroller" | 830 | objectName: "input_scroller" |
293 | @@ -853,7 +845,7 @@ | |||
294 | 853 | objectName: "text_input" | 845 | objectName: "text_input" |
295 | 854 | readOnly: false | 846 | readOnly: false |
296 | 855 | id: editor | 847 | id: editor |
298 | 856 | width: control.contentWidth | 848 | width: control.contentWidth - internal.scrollbarSpacing |
299 | 857 | height: Math.max(control.contentHeight, editor.contentHeight) | 849 | height: Math.max(control.contentHeight, editor.contentHeight) |
300 | 858 | wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere | 850 | wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere |
301 | 859 | mouseSelectionMode: TextEdit.SelectWords | 851 | mouseSelectionMode: TextEdit.SelectWords |
302 | @@ -883,6 +875,20 @@ | |||
303 | 883 | } | 875 | } |
304 | 884 | } | 876 | } |
305 | 885 | } | 877 | } |
306 | 878 | Scrollbar { | ||
307 | 879 | id: rightScrollbar | ||
308 | 880 | flickableItem: flicker | ||
309 | 881 | // Attach right inside the frame | ||
310 | 882 | // Flickable uses anchors.margins relative to the frame | ||
311 | 883 | // rather than *Margin which would scroll with the content | ||
312 | 884 | anchors.topMargin: -internal.frameSpacing | ||
313 | 885 | anchors.rightMargin: -internal.frameSpacing | ||
314 | 886 | anchors.bottomMargin: -internal.frameSpacing | ||
315 | 887 | Ubuntu.StyleHints { | ||
316 | 888 | // No background color | ||
317 | 889 | troughColorSteppersStyle: Qt.rgba(0, 0, 0, 0) | ||
318 | 890 | } | ||
319 | 891 | } | ||
320 | 886 | 892 | ||
321 | 887 | styleName: "TextAreaStyle" | 893 | styleName: "TextAreaStyle" |
322 | 888 | } | 894 | } |
323 | 889 | 895 | ||
324 | === modified file 'src/Ubuntu/Components/1.3/TextField.qml' | |||
325 | --- src/Ubuntu/Components/1.3/TextField.qml 2016-04-26 05:33:41 +0000 | |||
326 | +++ src/Ubuntu/Components/1.3/TextField.qml 2016-05-18 10:22:28 +0000 | |||
327 | @@ -995,11 +995,11 @@ | |||
328 | 995 | anchors { | 995 | anchors { |
329 | 996 | left: leftPane.right | 996 | left: leftPane.right |
330 | 997 | right: clearButton.left | 997 | right: clearButton.left |
331 | 998 | top: parent.top | ||
332 | 999 | bottom: parent.bottom | ||
333 | 1000 | margins: internal.spacing | 998 | margins: internal.spacing |
334 | 999 | verticalCenter: parent.verticalCenter | ||
335 | 1001 | } | 1000 | } |
336 | 1002 | topMargin: internal.spacing | 1001 | topMargin: internal.spacing |
337 | 1002 | bottomMargin: internal.spacing | ||
338 | 1003 | // do not allow rebounding | 1003 | // do not allow rebounding |
339 | 1004 | boundsBehavior: Flickable.StopAtBounds | 1004 | boundsBehavior: Flickable.StopAtBounds |
340 | 1005 | // need to forward events as events occurred on topMargin area are not grabbed by the MouseArea. | 1005 | // need to forward events as events occurred on topMargin area are not grabbed by the MouseArea. |
341 | @@ -1008,13 +1008,12 @@ | |||
342 | 1008 | clip: true | 1008 | clip: true |
343 | 1009 | contentWidth: editor.contentWidth | 1009 | contentWidth: editor.contentWidth |
344 | 1010 | contentHeight: editor.contentHeight | 1010 | contentHeight: editor.contentHeight |
345 | 1011 | height: editor.contentHeight | ||
346 | 1011 | 1012 | ||
347 | 1012 | TextInput { | 1013 | TextInput { |
348 | 1013 | id: editor | 1014 | id: editor |
349 | 1014 | objectName: "text_input" | 1015 | objectName: "text_input" |
350 | 1015 | // FocusScope will forward focus to this component | 1016 | // FocusScope will forward focus to this component |
351 | 1016 | anchors.verticalCenter: parent.verticalCenter | ||
352 | 1017 | verticalAlignment: TextInput.AlignVCenter | ||
353 | 1018 | width: flicker.width | 1017 | width: flicker.width |
354 | 1019 | height: flicker.height | 1018 | height: flicker.height |
355 | 1020 | cursorDelegate: TextCursor { | 1019 | cursorDelegate: TextCursor { |
356 | 1021 | 1020 | ||
357 | === modified file 'src/Ubuntu/Components/1.3/ToolbarButton.qml' | |||
358 | --- src/Ubuntu/Components/1.3/ToolbarButton.qml 2015-09-28 14:36:54 +0000 | |||
359 | +++ src/Ubuntu/Components/1.3/ToolbarButton.qml 2016-05-18 10:22:28 +0000 | |||
360 | @@ -29,7 +29,7 @@ | |||
361 | 29 | Example of different ways to define the toolbar button: | 29 | Example of different ways to define the toolbar button: |
362 | 30 | \qml | 30 | \qml |
363 | 31 | import QtQuick 2.4 | 31 | import QtQuick 2.4 |
365 | 32 | import Ubuntu.Components 1.3 | 32 | import Ubuntu.Components 1.2 |
366 | 33 | 33 | ||
367 | 34 | MainView { | 34 | MainView { |
368 | 35 | width: units.gu(50) | 35 | width: units.gu(50) |
369 | 36 | 36 | ||
370 | === modified file 'src/Ubuntu/Components/1.3/UbuntuListView.qml' | |||
371 | --- src/Ubuntu/Components/1.3/UbuntuListView.qml 2016-03-01 14:53:44 +0000 | |||
372 | +++ src/Ubuntu/Components/1.3/UbuntuListView.qml 2016-05-18 10:22:28 +0000 | |||
373 | @@ -196,7 +196,9 @@ | |||
374 | 196 | 196 | ||
375 | 197 | // highlight current item | 197 | // highlight current item |
376 | 198 | highlight: Rectangle { | 198 | highlight: Rectangle { |
378 | 199 | color: theme.palette.selected.background | 199 | color: root.activeFocus |
379 | 200 | ? theme.palette.focused.background | ||
380 | 201 | : theme.palette.selected.background | ||
381 | 200 | } | 202 | } |
382 | 201 | highlightMoveDuration: 0 | 203 | highlightMoveDuration: 0 |
383 | 202 | } | 204 | } |
384 | 203 | 205 | ||
385 | === modified file 'src/Ubuntu/Components/Themes/1.3/Palette.qml' | |||
386 | --- src/Ubuntu/Components/Themes/1.3/Palette.qml 2016-03-01 15:06:38 +0000 | |||
387 | +++ src/Ubuntu/Components/Themes/1.3/Palette.qml 2016-05-18 10:22:28 +0000 | |||
388 | @@ -60,6 +60,11 @@ | |||
389 | 60 | property PaletteValues disabled: PaletteValues{} | 60 | property PaletteValues disabled: PaletteValues{} |
390 | 61 | 61 | ||
391 | 62 | /*! | 62 | /*! |
392 | 63 | Color palette to use when the widget is focused. | ||
393 | 64 | */ | ||
394 | 65 | property PaletteValues focused: PaletteValues{} | ||
395 | 66 | |||
396 | 67 | /*! | ||
397 | 63 | Color palette to use when the widget is selected, for example when | 68 | Color palette to use when the widget is selected, for example when |
398 | 64 | a tab is the current one. | 69 | a tab is the current one. |
399 | 65 | */ | 70 | */ |
400 | 66 | 71 | ||
401 | === modified file 'src/Ubuntu/Components/Themes/1.3/PaletteValues.qml' | |||
402 | --- src/Ubuntu/Components/Themes/1.3/PaletteValues.qml 2016-04-26 05:33:41 +0000 | |||
403 | +++ src/Ubuntu/Components/Themes/1.3/PaletteValues.qml 2016-05-18 10:22:28 +0000 | |||
404 | @@ -140,7 +140,7 @@ | |||
405 | 140 | property color activityText | 140 | property color activityText |
406 | 141 | 141 | ||
407 | 142 | /*! | 142 | /*! |
409 | 143 | Color applied to selected text in editable components. | 143 | Color applied to selected text background in editable components. |
410 | 144 | */ | 144 | */ |
411 | 145 | property color selection | 145 | property color selection |
412 | 146 | /*! | 146 | /*! |
413 | @@ -159,4 +159,14 @@ | |||
414 | 159 | Color applied to elements placed on top of the \l focus color. | 159 | Color applied to elements placed on top of the \l focus color. |
415 | 160 | */ | 160 | */ |
416 | 161 | property color focusText | 161 | property color focusText |
417 | 162 | |||
418 | 163 | /*! | ||
419 | 164 | Color applied to navigation elements' background. | ||
420 | 165 | */ | ||
421 | 166 | property color position | ||
422 | 167 | |||
423 | 168 | /*! | ||
424 | 169 | Color applied to navigation elements to indicate current position. | ||
425 | 170 | */ | ||
426 | 171 | property color positionText | ||
427 | 162 | } | 172 | } |
428 | 163 | 173 | ||
429 | === modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml' | |||
430 | --- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 2016-04-26 05:33:41 +0000 | |||
431 | +++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 2016-05-18 10:22:28 +0000 | |||
432 | @@ -24,7 +24,7 @@ | |||
433 | 24 | backgroundSecondaryText: UbuntuColors.slate | 24 | backgroundSecondaryText: UbuntuColors.slate |
434 | 25 | backgroundTertiaryText: UbuntuColors.ash | 25 | backgroundTertiaryText: UbuntuColors.ash |
435 | 26 | base: UbuntuColors.silk | 26 | base: UbuntuColors.silk |
437 | 27 | baseText: UbuntuColors.ash | 27 | baseText: UbuntuColors.graphite |
438 | 28 | foreground: UbuntuColors.porcelain | 28 | foreground: UbuntuColors.porcelain |
439 | 29 | foregroundText: UbuntuColors.jet | 29 | foregroundText: UbuntuColors.jet |
440 | 30 | raised: "#FFFFFF" | 30 | raised: "#FFFFFF" |
441 | @@ -45,4 +45,6 @@ | |||
442 | 45 | negativeText: "#FFFFFF" | 45 | negativeText: "#FFFFFF" |
443 | 46 | activity: UbuntuColors.blue | 46 | activity: UbuntuColors.blue |
444 | 47 | activityText: "#FFFFFF" | 47 | activityText: "#FFFFFF" |
445 | 48 | position: "#00000000" | ||
446 | 49 | positionText: UbuntuColors.blue | ||
447 | 48 | } | 50 | } |
448 | 49 | 51 | ||
449 | === modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml' | |||
450 | --- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 2016-03-01 15:06:38 +0000 | |||
451 | +++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 2016-05-18 10:22:28 +0000 | |||
452 | @@ -19,9 +19,8 @@ | |||
453 | 19 | 19 | ||
454 | 20 | AmbianceNormal { | 20 | AmbianceNormal { |
455 | 21 | background: UbuntuColors.porcelain | 21 | background: UbuntuColors.porcelain |
456 | 22 | backgroundText: UbuntuColors.blue | ||
457 | 23 | backgroundTertiaryText: UbuntuColors.blue | ||
458 | 24 | base: UbuntuColors.ash | 22 | base: UbuntuColors.ash |
460 | 25 | baseText: UbuntuColors.blue | 23 | baseText: UbuntuColors.inkstone |
461 | 26 | foreground: UbuntuColors.ash | 24 | foreground: UbuntuColors.ash |
462 | 25 | overlay: UbuntuColors.porcelain | ||
463 | 27 | } | 26 | } |
464 | 28 | 27 | ||
465 | === modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml' | |||
466 | --- src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml 2016-01-28 11:54:29 +0000 | |||
467 | +++ src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml 2016-05-18 10:22:28 +0000 | |||
468 | @@ -26,7 +26,7 @@ | |||
469 | 26 | color: styledItem.enabled | 26 | color: styledItem.enabled |
470 | 27 | ? theme.palette.normal.focus | 27 | ? theme.palette.normal.focus |
471 | 28 | : theme.palette.disabled.focus | 28 | : theme.palette.disabled.focus |
473 | 29 | thickness: units.gu(0.21) | 29 | thickness: units.dp(1) |
474 | 30 | radius: units.gu(1.7) | 30 | radius: units.gu(1.7) |
475 | 31 | visible: styledItem.keyNavigationFocus | 31 | visible: styledItem.keyNavigationFocus |
476 | 32 | 32 | ||
477 | 33 | 33 | ||
478 | === modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml' | |||
479 | --- src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml 2016-04-26 05:33:41 +0000 | |||
480 | +++ src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml 2016-05-18 10:22:28 +0000 | |||
481 | @@ -26,15 +26,18 @@ | |||
482 | 26 | // specific disabled colors | 26 | // specific disabled colors |
483 | 27 | var diff = { | 27 | var diff = { |
484 | 28 | field: UbuntuColors.porcelain, | 28 | field: UbuntuColors.porcelain, |
487 | 29 | positiveText: normal.positiveText, | 29 | selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.1), |
488 | 30 | negativeText: normal.negativeText, | 30 | positiveText: "#FFFFFF", |
489 | 31 | negativeText: "#FFFFFF", | ||
490 | 32 | activityText: "#FFFFFF", | ||
491 | 33 | focusText: "#FFFFFF" | ||
492 | 31 | }; | 34 | }; |
493 | 32 | for (var p in normal) { | 35 | for (var p in normal) { |
494 | 33 | // skip objectName and all change signals | 36 | // skip objectName and all change signals |
495 | 34 | if (p === "objectName" || p.indexOf("Changed") > 0) continue; | 37 | if (p === "objectName" || p.indexOf("Changed") > 0) continue; |
496 | 35 | disabled[p] = diff[p] || ( | 38 | disabled[p] = diff[p] || ( |
497 | 36 | // if not specific, colors are 30% opaque normal | 39 | // if not specific, colors are 30% opaque normal |
499 | 37 | Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.3) | 40 | Qt.rgba(normal[p].r, normal[p].g, normal[p].b, normal[p].a * 0.5) |
500 | 38 | ); | 41 | ); |
501 | 39 | } | 42 | } |
502 | 40 | } | 43 | } |
503 | @@ -51,13 +54,18 @@ | |||
504 | 51 | background: UbuntuColors.porcelain, | 54 | background: UbuntuColors.porcelain, |
505 | 52 | base: UbuntuColors.porcelain, | 55 | base: UbuntuColors.porcelain, |
506 | 53 | foreground: UbuntuColors.porcelain, | 56 | foreground: UbuntuColors.porcelain, |
507 | 57 | selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.1), | ||
508 | 58 | positiveText: "#FFFFFF", | ||
509 | 59 | negativeText: "#FFFFFF", | ||
510 | 60 | activityText: "#FFFFFF", | ||
511 | 61 | focusText: "#FFFFFF" | ||
512 | 54 | }; | 62 | }; |
513 | 55 | for (var p in selected) { | 63 | for (var p in selected) { |
514 | 56 | // skip objectName and all change signals | 64 | // skip objectName and all change signals |
515 | 57 | if (p === "objectName" || p.indexOf("Changed") > 0) continue; | 65 | if (p === "objectName" || p.indexOf("Changed") > 0) continue; |
516 | 58 | selectedDisabled[p] = diff[p] || ( | 66 | selectedDisabled[p] = diff[p] || ( |
517 | 59 | // if not specific, colors are 30% opaque normal | 67 | // if not specific, colors are 30% opaque normal |
519 | 60 | Qt.rgba(selected[p].r, selected[p].g, selected[p].b, 0.3) | 68 | Qt.rgba(selected[p].r, selected[p].g, selected[p].b, normal[p].a * 0.5) |
520 | 61 | ); | 69 | ); |
521 | 62 | } | 70 | } |
522 | 63 | } | 71 | } |
523 | @@ -65,7 +73,15 @@ | |||
524 | 65 | 73 | ||
525 | 66 | highlighted: AmbianceNormal { | 74 | highlighted: AmbianceNormal { |
526 | 67 | background: UbuntuColors.silk | 75 | background: UbuntuColors.silk |
528 | 68 | base: UbuntuColors.jet | 76 | base: UbuntuColors.ash |
529 | 77 | baseText: UbuntuColors.inkstone | ||
530 | 69 | foreground: UbuntuColors.silk | 78 | foreground: UbuntuColors.silk |
531 | 79 | raised: UbuntuColors.silk | ||
532 | 80 | raisedText: UbuntuColors.inkstone | ||
533 | 81 | raisedSecondaryText: UbuntuColors.ash | ||
534 | 82 | } | ||
535 | 83 | |||
536 | 84 | focused: AmbianceNormal { | ||
537 | 85 | background: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.2) | ||
538 | 70 | } | 86 | } |
539 | 71 | } | 87 | } |
540 | 72 | 88 | ||
541 | === modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml' | |||
542 | --- src/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml 2015-12-16 11:53:01 +0000 | |||
543 | +++ src/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml 2016-05-18 10:22:28 +0000 | |||
544 | @@ -1,5 +1,5 @@ | |||
545 | 1 | /* | 1 | /* |
547 | 2 | * Copyright 2014 Canonical Ltd. | 2 | * Copyright 2016 Canonical Ltd. |
548 | 3 | * | 3 | * |
549 | 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 |
550 | 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 |
551 | @@ -56,16 +56,22 @@ | |||
552 | 56 | Local properties | 56 | Local properties |
553 | 57 | */ | 57 | */ |
554 | 58 | readonly property PullToRefresh control: styledItem | 58 | readonly property PullToRefresh control: styledItem |
557 | 59 | // property to store Flickable's toipMargin at the time the pull or auto-refresh is started | 59 | // property to control adding of control.height to the Flickable's topMargin. |
558 | 60 | property real flickableTopMargin: 0.0 | 60 | property bool extendTopMargin: false |
559 | 61 | onExtendTopMarginChanged: { | ||
560 | 62 | if (extendTopMargin) { | ||
561 | 63 | control.target.topMargin += control.height; | ||
562 | 64 | } else { | ||
563 | 65 | control.target.topMargin -= control.height; | ||
564 | 66 | } | ||
565 | 67 | } | ||
566 | 68 | |||
567 | 61 | // store when the drag has happened at the beginning of the Flickable's content | 69 | // store when the drag has happened at the beginning of the Flickable's content |
568 | 62 | property bool wasAtYBeginning: false | 70 | property bool wasAtYBeginning: false |
569 | 63 | // initial contentY value when pull started | 71 | // initial contentY value when pull started |
570 | 64 | property real initialContentY: 0.0 | 72 | property real initialContentY: 0.0 |
571 | 65 | // drives the refreshing state | 73 | // drives the refreshing state |
572 | 66 | property bool refreshing: false | 74 | property bool refreshing: false |
573 | 67 | // point of release used in rebind animation between the ready-to-refresh and refreshing states | ||
574 | 68 | property real pointOfRelease | ||
575 | 69 | // specifies the component completion | 75 | // specifies the component completion |
576 | 70 | property bool ready: false | 76 | property bool ready: false |
577 | 71 | // root item | 77 | // root item |
578 | @@ -130,6 +136,17 @@ | |||
579 | 130 | anchors.centerIn: parent | 136 | anchors.centerIn: parent |
580 | 131 | } | 137 | } |
581 | 132 | 138 | ||
582 | 139 | onVisibleChanged: { | ||
583 | 140 | // Updates to contentY may be interrupted if the flickable becomes | ||
584 | 141 | // invisible (for example when a new Page is pushed on a stack | ||
585 | 142 | // while PullToRefresh is in refreshing state. See bug #1578619. | ||
586 | 143 | if (visible) { | ||
587 | 144 | // Make sure the flickable is back inside its bounds when | ||
588 | 145 | // the Page becomes visible again: | ||
589 | 146 | control.target.returnToBounds(); | ||
590 | 147 | } | ||
591 | 148 | } | ||
592 | 149 | |||
593 | 133 | // state and content controlling | 150 | // state and content controlling |
594 | 134 | Connections { | 151 | Connections { |
595 | 135 | target: control | 152 | target: control |
596 | @@ -138,8 +155,7 @@ | |||
597 | 138 | return; | 155 | return; |
598 | 139 | } | 156 | } |
599 | 140 | if (!style.releaseToRefresh && target.refreshing) { | 157 | if (!style.releaseToRefresh && target.refreshing) { |
602 | 141 | // not a manual refresh, update flickable's starting topMargin | 158 | // not a manual refresh |
601 | 142 | style.flickableTopMargin = control.target.topMargin; | ||
603 | 143 | style.wasAtYBeginning = control.target.atYBeginning; | 159 | style.wasAtYBeginning = control.target.atYBeginning; |
604 | 144 | } | 160 | } |
605 | 145 | /* | 161 | /* |
606 | @@ -162,13 +178,13 @@ | |||
607 | 162 | style.refreshing = false; | 178 | style.refreshing = false; |
608 | 163 | style.releaseToRefresh = false; | 179 | style.releaseToRefresh = false; |
609 | 164 | } | 180 | } |
611 | 165 | onMovementEnded: style.wasAtYBeginning = control.target.atYBeginning | 181 | onMovementEnded: { |
612 | 182 | style.wasAtYBeginning = control.target.atYBeginning; | ||
613 | 183 | } | ||
614 | 166 | 184 | ||
615 | 167 | // catch when to initiate refresh | 185 | // catch when to initiate refresh |
616 | 168 | onDraggingChanged: { | 186 | onDraggingChanged: { |
617 | 169 | if (!control.parent.dragging && style.releaseToRefresh) { | 187 | if (!control.parent.dragging && style.releaseToRefresh) { |
618 | 170 | pointOfRelease = -(control.target.contentY - control.target.originY) | ||
619 | 171 | style.flickableTopMargin = control.target.topMargin; | ||
620 | 172 | style.refreshing = true; | 188 | style.refreshing = true; |
621 | 173 | style.releaseToRefresh = false; | 189 | style.releaseToRefresh = false; |
622 | 174 | } | 190 | } |
623 | @@ -213,8 +229,8 @@ | |||
624 | 213 | running: true | 229 | running: true |
625 | 214 | } | 230 | } |
626 | 215 | PropertyChanges { | 231 | PropertyChanges { |
629 | 216 | target: control.target | 232 | target: style |
630 | 217 | topMargin: style.flickableTopMargin + control.height | 233 | extendTopMargin: true |
631 | 218 | } | 234 | } |
632 | 219 | } | 235 | } |
633 | 220 | ] | 236 | ] |
634 | @@ -226,9 +242,8 @@ | |||
635 | 226 | SequentialAnimation { | 242 | SequentialAnimation { |
636 | 227 | UbuntuNumberAnimation { | 243 | UbuntuNumberAnimation { |
637 | 228 | target: control.target | 244 | target: control.target |
641 | 229 | property: "topMargin" | 245 | property: "contentY" |
642 | 230 | from: style.pointOfRelease | 246 | to: style.initialContentY - control.height |
640 | 231 | to: style.flickableTopMargin + control.height | ||
643 | 232 | } | 247 | } |
644 | 233 | ScriptAction { | 248 | ScriptAction { |
645 | 234 | script: control.refresh() | 249 | script: control.refresh() |
646 | @@ -242,8 +257,7 @@ | |||
647 | 242 | UbuntuNumberAnimation { | 257 | UbuntuNumberAnimation { |
648 | 243 | target: control.target | 258 | target: control.target |
649 | 244 | property: "contentY" | 259 | property: "contentY" |
652 | 245 | from: -style.flickableTopMargin | 260 | to: style.initialContentY - control.height |
651 | 246 | to: -style.flickableTopMargin - control.height | ||
653 | 247 | } | 261 | } |
654 | 248 | }, | 262 | }, |
655 | 249 | Transition { | 263 | Transition { |
656 | @@ -253,6 +267,11 @@ | |||
657 | 253 | target: control.target | 267 | target: control.target |
658 | 254 | property: "topMargin" | 268 | property: "topMargin" |
659 | 255 | } | 269 | } |
660 | 270 | UbuntuNumberAnimation { | ||
661 | 271 | target: control.target | ||
662 | 272 | property: "contentY" | ||
663 | 273 | to: style.initialContentY | ||
664 | 274 | } | ||
665 | 256 | } | 275 | } |
666 | 257 | ] | 276 | ] |
667 | 258 | } | 277 | } |
668 | 259 | 278 | ||
669 | === modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHeadStyle.qml' | |||
670 | --- src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHeadStyle.qml 2016-02-19 11:18:51 +0000 | |||
671 | +++ src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHeadStyle.qml 2016-05-18 10:22:28 +0000 | |||
672 | @@ -35,8 +35,8 @@ | |||
673 | 35 | The foreground color of the selected section. | 35 | The foreground color of the selected section. |
674 | 36 | */ | 36 | */ |
675 | 37 | property color selectedSectionColor: enabled | 37 | property color selectedSectionColor: enabled |
678 | 38 | ? theme.palette.selected.backgroundTertiaryText | 38 | ? theme.palette.selected.positionText |
679 | 39 | : theme.palette.selectedDisabled.backgroundTertiaryText | 39 | : theme.palette.selectedDisabled.positionText |
680 | 40 | 40 | ||
681 | 41 | /*! | 41 | /*! |
682 | 42 | The background color for the pressed section button. | 42 | The background color for the pressed section button. |
683 | 43 | 43 | ||
684 | === modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml' | |||
685 | --- src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml 2016-04-25 18:58:29 +0000 | |||
686 | +++ src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml 2016-05-18 10:22:28 +0000 | |||
687 | @@ -41,8 +41,8 @@ | |||
688 | 41 | The foreground color of the selected section. | 41 | The foreground color of the selected section. |
689 | 42 | */ | 42 | */ |
690 | 43 | property color selectedSectionColor: enabled | 43 | property color selectedSectionColor: enabled |
693 | 44 | ? theme.palette.selected.backgroundTertiaryText | 44 | ? theme.palette.selected.positionText |
694 | 45 | : theme.palette.selectedDisabled.backgroundTertiaryText | 45 | : theme.palette.selectedDisabled.positionText |
695 | 46 | 46 | ||
696 | 47 | /*! | 47 | /*! |
697 | 48 | The background color for the pressed section button. | 48 | The background color for the pressed section button. |
698 | 49 | 49 | ||
699 | === modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml' | |||
700 | --- src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml 2016-01-26 19:27:50 +0000 | |||
701 | +++ src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml 2016-05-18 10:22:28 +0000 | |||
702 | @@ -55,8 +55,8 @@ | |||
703 | 55 | Rectangle { | 55 | Rectangle { |
704 | 56 | objectName: "text_cursor_style_" + styledItem.positionProperty | 56 | objectName: "text_cursor_style_" + styledItem.positionProperty |
705 | 57 | width: cursorWidth | 57 | width: cursorWidth |
708 | 58 | // FIXME: check with design whether should it be activity or something else | 58 | |
709 | 59 | color: theme.palette.normal.activity | 59 | color: theme.palette.normal.positionText |
710 | 60 | visible: blinkTimer.timerShowCursor || !blinkTimer.running | 60 | visible: blinkTimer.timerShowCursor || !blinkTimer.running |
711 | 61 | Timer { | 61 | Timer { |
712 | 62 | id: blinkTimer | 62 | id: blinkTimer |
713 | 63 | 63 | ||
714 | === modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml' | |||
715 | --- src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml 2016-03-10 08:46:03 +0000 | |||
716 | +++ src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml 2016-05-18 10:22:28 +0000 | |||
717 | @@ -22,14 +22,23 @@ | |||
718 | 22 | Palette { | 22 | Palette { |
719 | 23 | normal: SuruDarkNormal {} | 23 | normal: SuruDarkNormal {} |
720 | 24 | disabled: SuruDarkNormal { | 24 | disabled: SuruDarkNormal { |
721 | 25 | field: UbuntuColors.inkstone | ||
722 | 26 | // inactive is 30% transparent normal | ||
723 | 27 | Component.onCompleted: { | 25 | Component.onCompleted: { |
724 | 26 | // specific disabled colors | ||
725 | 27 | var diff = { | ||
726 | 28 | foreground: UbuntuColors.inkstone, | ||
727 | 29 | field: UbuntuColors.inkstone, | ||
728 | 30 | positiveText: UbuntuColors.porcelain, | ||
729 | 31 | negativeText: UbuntuColors.porcelain, | ||
730 | 32 | activityText: UbuntuColors.porcelain, | ||
731 | 33 | focusText: UbuntuColors.porcelain | ||
732 | 34 | }; | ||
733 | 28 | for (var p in normal) { | 35 | for (var p in normal) { |
734 | 29 | // skip objectName and all change signals | 36 | // skip objectName and all change signals |
738 | 30 | if (p == "objectName"|| p.indexOf("Changed") > 0 | 37 | if (p == "objectName"|| p.indexOf("Changed") > 0) continue; |
739 | 31 | || p == "field" || p == "foreground" ) continue; | 38 | disabled[p] = diff[p] || ( |
740 | 32 | disabled[p] = Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.3); | 39 | // if not specific, colors are 30% opaque normal |
741 | 40 | Qt.rgba(normal[p].r, normal[p].g, normal[p].b, normal[p].a * 0.5) | ||
742 | 41 | ); | ||
743 | 33 | } | 42 | } |
744 | 34 | } | 43 | } |
745 | 35 | } | 44 | } |
746 | @@ -39,24 +48,39 @@ | |||
747 | 39 | 48 | ||
748 | 40 | // selected differs from normal in background, base, foreground | 49 | // selected differs from normal in background, base, foreground |
749 | 41 | selectedDisabled: SuruDarkSelected { | 50 | selectedDisabled: SuruDarkSelected { |
750 | 42 | background: UbuntuColors.inkstone | ||
751 | 43 | base: UbuntuColors.inkstone | ||
752 | 44 | foreground: UbuntuColors.inkstone | ||
753 | 45 | // inactive is 30% transparent normal | ||
754 | 46 | Component.onCompleted: { | 51 | Component.onCompleted: { |
755 | 52 | var diff = { | ||
756 | 53 | background: UbuntuColors.inkstone, | ||
757 | 54 | base: UbuntuColors.inkstone, | ||
758 | 55 | foreground: UbuntuColors.inkstone, | ||
759 | 56 | positiveText: UbuntuColors.porcelain, | ||
760 | 57 | negativeText: UbuntuColors.porcelain, | ||
761 | 58 | activityText: UbuntuColors.porcelain, | ||
762 | 59 | focusText: UbuntuColors.porcelain | ||
763 | 60 | }; | ||
764 | 47 | for (var p in selected) { | 61 | for (var p in selected) { |
765 | 48 | // skip objectName and all change signals | 62 | // skip objectName and all change signals |
769 | 49 | if (p == "objectName"|| p.indexOf("Changed") > 0 | 63 | if (p == "objectName"|| p.indexOf("Changed") > 0) continue; |
770 | 50 | || p == "field" || p == "foreground" ) continue; | 64 | selectedDisabled[p] = diff[p] || ( |
771 | 51 | selectedDisabled[p] = Qt.rgba(selected[p].r, selected[p].g, selected[p].b, 0.3); | 65 | // if not specific, colors are 30% opaque normal |
772 | 66 | Qt.rgba(selected[p].r, selected[p].g, selected[p].b, normal[p].a * 0.5) | ||
773 | 67 | ); | ||
774 | 52 | } | 68 | } |
775 | 53 | } | 69 | } |
776 | 54 | } | 70 | } |
777 | 55 | 71 | ||
778 | 56 | highlighted: SuruDarkNormal { | 72 | highlighted: SuruDarkNormal { |
779 | 57 | background: UbuntuColors.slate | 73 | background: UbuntuColors.slate |
781 | 58 | base: UbuntuColors.graphite | 74 | base: UbuntuColors.slate |
782 | 75 | baseText: UbuntuColors.silk | ||
783 | 59 | foreground: UbuntuColors.slate | 76 | foreground: UbuntuColors.slate |
784 | 77 | raised: UbuntuColors.silk | ||
785 | 78 | raisedText: UbuntuColors.inkstone | ||
786 | 79 | raisedSecondaryText: UbuntuColors.ash | ||
787 | 80 | } | ||
788 | 81 | |||
789 | 82 | focused: SuruDarkNormal { | ||
790 | 83 | background: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.4) | ||
791 | 60 | } | 84 | } |
792 | 61 | } | 85 | } |
793 | 62 | //![0] | 86 | //![0] |
794 | 63 | 87 | ||
795 | === modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml' | |||
796 | --- src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml 2016-04-26 05:33:41 +0000 | |||
797 | +++ src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml 2016-05-18 10:22:28 +0000 | |||
798 | @@ -24,7 +24,7 @@ | |||
799 | 24 | backgroundSecondaryText: UbuntuColors.silk | 24 | backgroundSecondaryText: UbuntuColors.silk |
800 | 25 | backgroundTertiaryText: UbuntuColors.ash | 25 | backgroundTertiaryText: UbuntuColors.ash |
801 | 26 | base: UbuntuColors.graphite | 26 | base: UbuntuColors.graphite |
803 | 27 | baseText: UbuntuColors.ash | 27 | baseText: UbuntuColors.silk |
804 | 28 | foreground: UbuntuColors.inkstone | 28 | foreground: UbuntuColors.inkstone |
805 | 29 | foregroundText: "#FFFFFF" | 29 | foregroundText: "#FFFFFF" |
806 | 30 | raised: "#FFFFFF" | 30 | raised: "#FFFFFF" |
807 | @@ -45,4 +45,6 @@ | |||
808 | 45 | negativeText: "#FFFFFF" | 45 | negativeText: "#FFFFFF" |
809 | 46 | activity: UbuntuColors.blue | 46 | activity: UbuntuColors.blue |
810 | 47 | activityText: "#FFFFFF" | 47 | activityText: "#FFFFFF" |
811 | 48 | position: "#00000000" | ||
812 | 49 | positionText: UbuntuColors.blue | ||
813 | 48 | } | 50 | } |
814 | 49 | 51 | ||
815 | === modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml' | |||
816 | --- src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml 2016-03-01 15:06:38 +0000 | |||
817 | +++ src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml 2016-05-18 10:22:28 +0000 | |||
818 | @@ -20,10 +20,8 @@ | |||
819 | 20 | 20 | ||
820 | 21 | SuruDarkNormal { | 21 | SuruDarkNormal { |
821 | 22 | background: UbuntuColors.inkstone | 22 | background: UbuntuColors.inkstone |
826 | 23 | backgroundText: UbuntuColors.blue | 23 | base: UbuntuColors.inkstone |
827 | 24 | backgroundTertiaryText: UbuntuColors.blue | 24 | baseText: UbuntuColors.ash |
824 | 25 | base: UbuntuColors.ash | ||
825 | 26 | baseText:UbuntuColors.blue | ||
828 | 27 | foreground: UbuntuColors.slate | 25 | foreground: UbuntuColors.slate |
829 | 26 | overlay: UbuntuColors.slate | ||
830 | 28 | } | 27 | } |
831 | 29 | |||
832 | 30 | 28 | ||
833 | === modified file 'src/Ubuntu/Components/plugin/ucheader.cpp' | |||
834 | --- src/Ubuntu/Components/plugin/ucheader.cpp 2016-04-20 15:26:25 +0000 | |||
835 | +++ src/Ubuntu/Components/plugin/ucheader.cpp 2016-05-18 10:22:28 +0000 | |||
836 | @@ -40,7 +40,7 @@ | |||
837 | 40 | import QtQuick 2.4 | 40 | import QtQuick 2.4 |
838 | 41 | import Ubuntu.Components 1.3 | 41 | import Ubuntu.Components 1.3 |
839 | 42 | 42 | ||
841 | 43 | Item { | 43 | Page { |
842 | 44 | width: units.gu(50) | 44 | width: units.gu(50) |
843 | 45 | height: units.gu(70) | 45 | height: units.gu(70) |
844 | 46 | 46 | ||
845 | 47 | 47 | ||
846 | === modified file 'src/Ubuntu/Components/plugin/uclistitem.cpp' | |||
847 | --- src/Ubuntu/Components/plugin/uclistitem.cpp 2016-04-26 10:21:32 +0000 | |||
848 | +++ src/Ubuntu/Components/plugin/uclistitem.cpp 2016-05-18 10:22:28 +0000 | |||
849 | @@ -1140,9 +1140,6 @@ | |||
850 | 1140 | updateNode = true; | 1140 | updateNode = true; |
851 | 1141 | } | 1141 | } |
852 | 1142 | QRectF rect(boundingRect()); | 1142 | QRectF rect(boundingRect()); |
853 | 1143 | // FIXME: The 1dp margin is here so that part of the focus frame | ||
854 | 1144 | // is not hidden by the APL divider. See bug #1575060. | ||
855 | 1145 | rect -= QMarginsF(0, 0, UCUnits::instance()->dp(1), 0); | ||
856 | 1146 | d->divider->setOpacity(paintFocus ? 0.0 : 1.0); | 1143 | d->divider->setOpacity(paintFocus ? 0.0 : 1.0); |
857 | 1147 | rectNode->setRect(rect); | 1144 | rectNode->setRect(rect); |
858 | 1148 | 1145 | ||
859 | 1149 | 1146 | ||
860 | === modified file 'src/Ubuntu/Components/plugin/ucmainviewbase.cpp' | |||
861 | --- src/Ubuntu/Components/plugin/ucmainviewbase.cpp 2016-04-04 04:47:11 +0000 | |||
862 | +++ src/Ubuntu/Components/plugin/ucmainviewbase.cpp 2016-05-18 10:22:28 +0000 | |||
863 | @@ -53,7 +53,9 @@ | |||
864 | 53 | 53 | ||
865 | 54 | m_actionContext->setObjectName(QStringLiteral("RootContext")); | 54 | m_actionContext->setObjectName(QStringLiteral("RootContext")); |
866 | 55 | m_actionContext->setActive(true); | 55 | m_actionContext->setActive(true); |
868 | 56 | q->setActive(true); | 56 | // setActive(true) is called in componentComplete to wait |
869 | 57 | // until the MainView (and all its children) are complete | ||
870 | 58 | // to prevent bug #1570886. | ||
871 | 57 | 59 | ||
872 | 58 | QObject::connect(m_actionManager,&UCActionManager::quit, [](){ | 60 | QObject::connect(m_actionManager,&UCActionManager::quit, [](){ |
873 | 59 | // FIXME Wire this up to the application lifecycle management API instead of quit(). | 61 | // FIXME Wire this up to the application lifecycle management API instead of quit(). |
874 | @@ -307,6 +309,9 @@ | |||
875 | 307 | { | 309 | { |
876 | 308 | Q_D(UCMainViewBase); | 310 | Q_D(UCMainViewBase); |
877 | 309 | UCPageTreeNode::componentComplete(); | 311 | UCPageTreeNode::componentComplete(); |
878 | 312 | // Do not call setActive() in d->init() but postpone until the | ||
879 | 313 | // component is complete to avoid bug #1570886. | ||
880 | 314 | this->setActive(true); | ||
881 | 310 | d->doAutoTheme(); | 315 | d->doAutoTheme(); |
882 | 311 | 316 | ||
883 | 312 | if (d->m_actionContext) | 317 | if (d->m_actionContext) |
884 | 313 | 318 | ||
885 | === modified file 'src/Ubuntu/Components/plugin/ucstyleditembase.cpp' | |||
886 | --- src/Ubuntu/Components/plugin/ucstyleditembase.cpp 2016-04-25 10:45:41 +0000 | |||
887 | +++ src/Ubuntu/Components/plugin/ucstyleditembase.cpp 2016-05-18 10:22:28 +0000 | |||
888 | @@ -37,6 +37,32 @@ | |||
889 | 37 | { | 37 | { |
890 | 38 | } | 38 | } |
891 | 39 | 39 | ||
892 | 40 | /*! | ||
893 | 41 | * \qmlproperty string StyledItem::keyNavigationFocus | ||
894 | 42 | * If \l activeFocusOnTab is true and Tab or Shift+Tab is used to focus | ||
895 | 43 | * the item this property will be true - unlike \l activeFocus which is also | ||
896 | 44 | * true if the item gained focus by click, tap or programmatically. | ||
897 | 45 | * Note that only one component at a time has \b keyNavigationFocus. The | ||
898 | 46 | * parent will have \l activeFocus and usually won't draw a focus ring. | ||
899 | 47 | * | ||
900 | 48 | * In case of complex components arrow keys may be the preferred way to move | ||
901 | 49 | * between children that can take focus. Examples of that are ListView and | ||
902 | 50 | * ListItem. This currently requires overriding \b keyNavigationFocus in C++. | ||
903 | 51 | * | ||
904 | 52 | * The implementation of focus rings as provided by the default Ambiance theme | ||
905 | 53 | * sets \l activeFocusOnTab in the style of each component and only indicates | ||
906 | 54 | * focus as long as \b keyNavigationFocus is true, similar to the below example. | ||
907 | 55 | * \qml | ||
908 | 56 | * StyledItem { | ||
909 | 57 | * id: myItem | ||
910 | 58 | * activeFocusOnTab: true | ||
911 | 59 | * Rectangle { | ||
912 | 60 | * anchors.fill: parent | ||
913 | 61 | * color: keyNavigationFocus ? UbuntuColors.orange : UbuntuColors.blue | ||
914 | 62 | * } | ||
915 | 63 | * } | ||
916 | 64 | * \endqml | ||
917 | 65 | */ | ||
918 | 40 | bool UCStyledItemBase::keyNavigationFocus() const | 66 | bool UCStyledItemBase::keyNavigationFocus() const |
919 | 41 | { | 67 | { |
920 | 42 | Q_D(const UCStyledItemBase); | 68 | Q_D(const UCStyledItemBase); |
921 | @@ -44,6 +70,9 @@ | |||
922 | 44 | } | 70 | } |
923 | 45 | void UCStyledItemBase::setKeyNavigationFocus(bool v) | 71 | void UCStyledItemBase::setKeyNavigationFocus(bool v) |
924 | 46 | { | 72 | { |
925 | 73 | // FIXME: Behavior of nested StyledItem is currently undefined | ||
926 | 74 | // Docs should be updated once the behavior is sorted out | ||
927 | 75 | // See https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1575257 | ||
928 | 47 | Q_D(UCStyledItemBase); | 76 | Q_D(UCStyledItemBase); |
929 | 48 | if (d->keyNavigationFocus == v) | 77 | if (d->keyNavigationFocus == v) |
930 | 49 | return; | 78 | return; |
931 | 50 | 79 | ||
932 | === modified file 'tests/packaging-sorting.sh' | |||
933 | --- tests/packaging-sorting.sh 2016-03-07 14:21:53 +0000 | |||
934 | +++ tests/packaging-sorting.sh 2016-05-18 10:22:28 +0000 | |||
935 | @@ -27,6 +27,8 @@ | |||
936 | 27 | cp -a ../debian $tmpdir | 27 | cp -a ../debian $tmpdir |
937 | 28 | 28 | ||
938 | 29 | wrap-and-sort -a -t -d $tmpdir/debian/ | 29 | wrap-and-sort -a -t -d $tmpdir/debian/ |
939 | 30 | # Verify control.gles which otherwise isn't picked up | ||
940 | 31 | wrap-and-sort -a -t -d $tmpdir/debian/ -f $tmpdir/debian/control.gles | ||
941 | 30 | 32 | ||
942 | 31 | diff -urN ../debian $tmpdir/debian | 33 | diff -urN ../debian $tmpdir/debian |
943 | 32 | 34 | ||
944 | 33 | 35 | ||
945 | === added file 'tests/unit_x11/tst_components/logo.png' | |||
946 | 34 | Binary files tests/unit_x11/tst_components/logo.png 1970-01-01 00:00:00 +0000 and tests/unit_x11/tst_components/logo.png 2016-05-18 10:22:28 +0000 differ | 36 | Binary files tests/unit_x11/tst_components/logo.png 1970-01-01 00:00:00 +0000 and tests/unit_x11/tst_components/logo.png 2016-05-18 10:22:28 +0000 differ |
947 | === modified file 'tests/unit_x11/tst_components/tst_pulltorefresh_listview.qml' | |||
948 | --- tests/unit_x11/tst_components/tst_pulltorefresh_listview.qml 2015-03-03 13:20:06 +0000 | |||
949 | +++ tests/unit_x11/tst_components/tst_pulltorefresh_listview.qml 2016-05-18 10:22:28 +0000 | |||
950 | @@ -1,5 +1,5 @@ | |||
951 | 1 | /* | 1 | /* |
953 | 2 | * Copyright 2014 Canonical Ltd. | 2 | * Copyright 2016 Canonical Ltd. |
954 | 3 | * | 3 | * |
955 | 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 |
956 | 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 |
957 | 6 | 6 | ||
958 | === added file 'tests/unit_x11/tst_components/tst_pulltorefresh_pagestack_topmargin.qml' | |||
959 | --- tests/unit_x11/tst_components/tst_pulltorefresh_pagestack_topmargin.qml 1970-01-01 00:00:00 +0000 | |||
960 | +++ tests/unit_x11/tst_components/tst_pulltorefresh_pagestack_topmargin.qml 2016-05-18 10:22:28 +0000 | |||
961 | @@ -0,0 +1,86 @@ | |||
962 | 1 | /* | ||
963 | 2 | * Copyright 2016 Canonical Ltd. | ||
964 | 3 | * | ||
965 | 4 | * This program is free software; you can redistribute it and/or modify | ||
966 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
967 | 6 | * the Free Software Foundation; version 3. | ||
968 | 7 | * | ||
969 | 8 | * This program is distributed in the hope that it will be useful, | ||
970 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
971 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
972 | 11 | * GNU Lesser General Public License for more details. | ||
973 | 12 | * | ||
974 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
975 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
976 | 15 | */ | ||
977 | 16 | |||
978 | 17 | import QtQuick 2.4 | ||
979 | 18 | import Ubuntu.Components 1.3 | ||
980 | 19 | import Ubuntu.Components.ListItems 1.3 | ||
981 | 20 | import QtTest 1.0 | ||
982 | 21 | import Ubuntu.Test 1.3 | ||
983 | 22 | |||
984 | 23 | Item { | ||
985 | 24 | width: units.gu(40) | ||
986 | 25 | height: units.gu(71) | ||
987 | 26 | |||
988 | 27 | MainView { | ||
989 | 28 | anchors.fill: parent | ||
990 | 29 | PageStack { | ||
991 | 30 | id: pageStack | ||
992 | 31 | Page { | ||
993 | 32 | id: page0 | ||
994 | 33 | title: "One" | ||
995 | 34 | visible: false | ||
996 | 35 | |||
997 | 36 | ListView { | ||
998 | 37 | id: view | ||
999 | 38 | anchors.fill: parent | ||
1000 | 39 | model: 15 | ||
1001 | 40 | delegate: Standard { | ||
1002 | 41 | width: ListView.view.width | ||
1003 | 42 | height: units.gu(5) | ||
1004 | 43 | text: index | ||
1005 | 44 | } | ||
1006 | 45 | PullToRefresh { | ||
1007 | 46 | id: pullMe | ||
1008 | 47 | onRefresh: { | ||
1009 | 48 | refreshing = true; | ||
1010 | 49 | refreshing = false; | ||
1011 | 50 | pageStack.push(page1) | ||
1012 | 51 | } | ||
1013 | 52 | } | ||
1014 | 53 | } | ||
1015 | 54 | } | ||
1016 | 55 | Page { | ||
1017 | 56 | id: page1 | ||
1018 | 57 | title: "Two" | ||
1019 | 58 | visible: false | ||
1020 | 59 | Button { | ||
1021 | 60 | anchors.centerIn: parent | ||
1022 | 61 | onClicked: pageStack.pop() | ||
1023 | 62 | text: "back" | ||
1024 | 63 | } | ||
1025 | 64 | } | ||
1026 | 65 | Component.onCompleted: pageStack.push(page0) | ||
1027 | 66 | } | ||
1028 | 67 | } | ||
1029 | 68 | |||
1030 | 69 | UbuntuTestCase { | ||
1031 | 70 | name: "PullToRefreshPageStackPushWhileRefreshing" | ||
1032 | 71 | when: windowShown | ||
1033 | 72 | |||
1034 | 73 | function test_push_while_refreshing_bug1578619() { | ||
1035 | 74 | var initialTopMargin = view.topMargin; | ||
1036 | 75 | var initialContentY = view.contentY; | ||
1037 | 76 | flick(view, view.width/2, units.gu(10), 0, units.gu(40)); | ||
1038 | 77 | wait(1000); | ||
1039 | 78 | pageStack.pop(); | ||
1040 | 79 | tryCompare(view, "moving", false); | ||
1041 | 80 | tryCompare(view, "topMargin", initialTopMargin, 500, | ||
1042 | 81 | "Initial topMargin of flickable is not restored after refreshing."); | ||
1043 | 82 | tryCompare(view, "contentY", initialContentY, 500, | ||
1044 | 83 | "Initial contentY of flickable is not restored after refreshing.") | ||
1045 | 84 | } | ||
1046 | 85 | } | ||
1047 | 86 | } | ||
1048 | 0 | 87 | ||
1049 | === added file 'tests/unit_x11/tst_components/tst_pulltorefresh_topmargin.qml' | |||
1050 | --- tests/unit_x11/tst_components/tst_pulltorefresh_topmargin.qml 1970-01-01 00:00:00 +0000 | |||
1051 | +++ tests/unit_x11/tst_components/tst_pulltorefresh_topmargin.qml 2016-05-18 10:22:28 +0000 | |||
1052 | @@ -0,0 +1,59 @@ | |||
1053 | 1 | /* | ||
1054 | 2 | * Copyright 2016 Canonical Ltd. | ||
1055 | 3 | * | ||
1056 | 4 | * This program is free software; you can redistribute it and/or modify | ||
1057 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
1058 | 6 | * the Free Software Foundation; version 3. | ||
1059 | 7 | * | ||
1060 | 8 | * This program is distributed in the hope that it will be useful, | ||
1061 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1062 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1063 | 11 | * GNU Lesser General Public License for more details. | ||
1064 | 12 | * | ||
1065 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1066 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1067 | 15 | */ | ||
1068 | 16 | |||
1069 | 17 | import QtQuick 2.4 | ||
1070 | 18 | import Ubuntu.Components 1.3 | ||
1071 | 19 | import QtTest 1.0 | ||
1072 | 20 | import Ubuntu.Test 1.3 | ||
1073 | 21 | |||
1074 | 22 | Item { | ||
1075 | 23 | width: units.gu(40) | ||
1076 | 24 | height: units.gu(71) | ||
1077 | 25 | id: root | ||
1078 | 26 | Flickable { | ||
1079 | 27 | id: view | ||
1080 | 28 | anchors.fill: parent | ||
1081 | 29 | contentHeight: 1.6*view.height | ||
1082 | 30 | Label { | ||
1083 | 31 | anchors.centerIn: parent | ||
1084 | 32 | text: "void" | ||
1085 | 33 | } | ||
1086 | 34 | PullToRefresh { | ||
1087 | 35 | id: pullToRefresh | ||
1088 | 36 | parent: view | ||
1089 | 37 | onRefresh: { | ||
1090 | 38 | refreshing = true; | ||
1091 | 39 | refreshing = false; | ||
1092 | 40 | } | ||
1093 | 41 | } | ||
1094 | 42 | } | ||
1095 | 43 | |||
1096 | 44 | UbuntuTestCase { | ||
1097 | 45 | name: "PullToRefreshTopMargin" | ||
1098 | 46 | when: windowShown | ||
1099 | 47 | |||
1100 | 48 | function test_reposition_after_refresh_bug1578619() { | ||
1101 | 49 | var initialTopMargin = view.topMargin; | ||
1102 | 50 | var initialContentY = view.contentY; | ||
1103 | 51 | flick(view, view.width/2, units.gu(10), 0, units.gu(40)); | ||
1104 | 52 | tryCompare(view, "moving", false); | ||
1105 | 53 | tryCompare(view, "topMargin", initialTopMargin, 500, | ||
1106 | 54 | "Initial topMargin of flickable is not restored after refreshing."); | ||
1107 | 55 | tryCompare(view, "contentY", initialContentY, 500, | ||
1108 | 56 | "Initial contentY of flickable is not restored after refreshing.") | ||
1109 | 57 | } | ||
1110 | 58 | } | ||
1111 | 59 | } | ||
1112 | 0 | 60 | ||
1113 | === added file 'tests/unit_x11/tst_components/tst_tabs11.qml' | |||
1114 | --- tests/unit_x11/tst_components/tst_tabs11.qml 1970-01-01 00:00:00 +0000 | |||
1115 | +++ tests/unit_x11/tst_components/tst_tabs11.qml 2016-05-18 10:22:28 +0000 | |||
1116 | @@ -0,0 +1,198 @@ | |||
1117 | 1 | /* | ||
1118 | 2 | * Copyright 2012-2016 Canonical Ltd. | ||
1119 | 3 | * | ||
1120 | 4 | * This program is free software; you can redistribute it and/or modify | ||
1121 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
1122 | 6 | * the Free Software Foundation; version 3. | ||
1123 | 7 | * | ||
1124 | 8 | * This program is distributed in the hope that it will be useful, | ||
1125 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1126 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1127 | 11 | * GNU Lesser General Public License for more details. | ||
1128 | 12 | * | ||
1129 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1130 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1131 | 15 | */ | ||
1132 | 16 | |||
1133 | 17 | import QtQuick 2.2 | ||
1134 | 18 | import Ubuntu.Test 1.0 | ||
1135 | 19 | import Ubuntu.Components 1.1 | ||
1136 | 20 | |||
1137 | 21 | MainView { | ||
1138 | 22 | id: mainView | ||
1139 | 23 | width: units.gu(50) | ||
1140 | 24 | height: units.gu(80) | ||
1141 | 25 | useDeprecatedToolbar: false | ||
1142 | 26 | |||
1143 | 27 | Tabs { | ||
1144 | 28 | id: tabs | ||
1145 | 29 | Tab { | ||
1146 | 30 | id: tab1 | ||
1147 | 31 | title: "tab 1" | ||
1148 | 32 | page: Page { | ||
1149 | 33 | id: page1 | ||
1150 | 34 | Button { | ||
1151 | 35 | id: button | ||
1152 | 36 | anchors.centerIn: parent | ||
1153 | 37 | text: "click" | ||
1154 | 38 | } | ||
1155 | 39 | } | ||
1156 | 40 | } | ||
1157 | 41 | Tab { | ||
1158 | 42 | id: tab2 | ||
1159 | 43 | title: "tab 2" | ||
1160 | 44 | page: Page { | ||
1161 | 45 | id: page2 | ||
1162 | 46 | } | ||
1163 | 47 | } | ||
1164 | 48 | Tab { | ||
1165 | 49 | id: tab3 | ||
1166 | 50 | title: "tab 3" | ||
1167 | 51 | page: Page { | ||
1168 | 52 | id: page3 | ||
1169 | 53 | } | ||
1170 | 54 | } | ||
1171 | 55 | Tab { | ||
1172 | 56 | id: tabFlick1 | ||
1173 | 57 | title: "flick" | ||
1174 | 58 | page: Page { | ||
1175 | 59 | Flickable { | ||
1176 | 60 | id: flickable1 | ||
1177 | 61 | anchors.fill: parent | ||
1178 | 62 | } | ||
1179 | 63 | } | ||
1180 | 64 | } | ||
1181 | 65 | Tab { | ||
1182 | 66 | id: tabFlick2 | ||
1183 | 67 | title: "flick 2" | ||
1184 | 68 | page: Page { | ||
1185 | 69 | Flickable { | ||
1186 | 70 | id: flickable2 | ||
1187 | 71 | anchors.fill: parent | ||
1188 | 72 | } | ||
1189 | 73 | } | ||
1190 | 74 | } | ||
1191 | 75 | Tab { | ||
1192 | 76 | id: tabFlickLoader | ||
1193 | 77 | title: "load" | ||
1194 | 78 | page: Loader { | ||
1195 | 79 | id: loader | ||
1196 | 80 | sourceComponent: tabs.selectedTabIndex != 5 ? null : pageComponent | ||
1197 | 81 | } | ||
1198 | 82 | } | ||
1199 | 83 | Tab { | ||
1200 | 84 | id: tabNoFlickLoader | ||
1201 | 85 | title: "loadNoFlick" | ||
1202 | 86 | page: Loader { | ||
1203 | 87 | id: loaderNoFlick | ||
1204 | 88 | anchors { | ||
1205 | 89 | left: parent.left | ||
1206 | 90 | right: parent.right | ||
1207 | 91 | bottom: parent.bottom | ||
1208 | 92 | } | ||
1209 | 93 | // height compes from the loaded Page | ||
1210 | 94 | sourceComponent: tabs.selectedTabIndex === 6 ? pageComponentNoFlick : null | ||
1211 | 95 | } | ||
1212 | 96 | } | ||
1213 | 97 | Tab { | ||
1214 | 98 | // Test for bug #1570886, see initTestCase(). | ||
1215 | 99 | id: tabWithTitleFromPage | ||
1216 | 100 | page: Page { | ||
1217 | 101 | title: "Title from Page" | ||
1218 | 102 | } | ||
1219 | 103 | } | ||
1220 | 104 | } | ||
1221 | 105 | Component { | ||
1222 | 106 | id: pageComponent | ||
1223 | 107 | Page { | ||
1224 | 108 | title: "Loaded page" | ||
1225 | 109 | property Flickable flick: loadedFlickable | ||
1226 | 110 | Flickable { | ||
1227 | 111 | id: loadedFlickable | ||
1228 | 112 | anchors.fill: parent | ||
1229 | 113 | contentHeight: 1000 | ||
1230 | 114 | } | ||
1231 | 115 | } | ||
1232 | 116 | } | ||
1233 | 117 | Component { | ||
1234 | 118 | id: pageComponentNoFlick | ||
1235 | 119 | Page { | ||
1236 | 120 | title: "Loaded page without flickable" | ||
1237 | 121 | } | ||
1238 | 122 | } | ||
1239 | 123 | |||
1240 | 124 | UbuntuTestCase { | ||
1241 | 125 | name: "TabsAPINewHeader" | ||
1242 | 126 | when: windowShown | ||
1243 | 127 | |||
1244 | 128 | function initTestCase() { | ||
1245 | 129 | // Test for bug #1570886. | ||
1246 | 130 | compare(mainView.__propagated.header.title, tab1.title, | ||
1247 | 131 | "Incorrect initial header title."); | ||
1248 | 132 | } | ||
1249 | 133 | |||
1250 | 134 | function test_tabsDefaults() { | ||
1251 | 135 | compare(tabs.selectedTabIndex, 0, "The default selectedTabIndex is 0 when Tabs has contents"); | ||
1252 | 136 | compare(tabs.selectedTab, tab1, "The default selectedTab is the first tab"); | ||
1253 | 137 | compare(tabs.currentPage, page1, "The default currentPage is the page of the first tab"); | ||
1254 | 138 | } | ||
1255 | 139 | |||
1256 | 140 | function test_tabsSetSelectedTab() { | ||
1257 | 141 | var tabArray = [tab1, tab2, tab3]; | ||
1258 | 142 | var pageArray = [page1, page2, page3]; | ||
1259 | 143 | for (var i=0; i < 3; i++) { | ||
1260 | 144 | tabs.selectedTabIndex = i; | ||
1261 | 145 | compare(tabs.selectedTabIndex, i, "Can set selectedTabIndex"); | ||
1262 | 146 | compare(tabs.selectedTab, tabArray[i], "Can update selectedTab by setting selectedTabIndex"); | ||
1263 | 147 | compare(tabs.currentPage, pageArray[i], "Can update currentPage by setting selectedTabIndex"); | ||
1264 | 148 | for (var j=0; j < 3; j++) { | ||
1265 | 149 | compare(pageArray[j].active, j===i, "Only the page of the selected tab is active"); | ||
1266 | 150 | } | ||
1267 | 151 | } | ||
1268 | 152 | } | ||
1269 | 153 | |||
1270 | 154 | function test_flickable() { | ||
1271 | 155 | // ensure that the flickable of the header is set to the flickable of the selected tab. | ||
1272 | 156 | tabs.selectedTabIndex = 3; | ||
1273 | 157 | compare(mainView.__propagated.header.flickable, flickable1, "Header flickable correctly initialized"); | ||
1274 | 158 | tabs.selectedTabIndex = 4; | ||
1275 | 159 | compare(mainView.__propagated.header.flickable, flickable2, "Header flickable correctly updated"); | ||
1276 | 160 | tabs.selectedTabIndex = 0; | ||
1277 | 161 | } | ||
1278 | 162 | |||
1279 | 163 | function test_pageLoader() { | ||
1280 | 164 | tabs.selectedTabIndex = 0; | ||
1281 | 165 | compare(loader.item, null, "Page not loaded when tab is not selected"); | ||
1282 | 166 | tabs.selectedTabIndex = 5; | ||
1283 | 167 | compare(tabs.currentPage, loader, "Selected loader for current page"); | ||
1284 | 168 | compare(loader.item.title, "Loaded page", "Loaded item is a page"); | ||
1285 | 169 | tabs.selectedTabIndex = 0; | ||
1286 | 170 | compare(loader.item, null, "Loaded page was properly unloaded"); | ||
1287 | 171 | } | ||
1288 | 172 | |||
1289 | 173 | function test_bug1088740() { | ||
1290 | 174 | tabs.selectedTabIndex = 5; | ||
1291 | 175 | compare(mainView.__propagated.header.flickable, loader.item.flick, "Header flickable correctly updated with Loader"); | ||
1292 | 176 | compare(loader.item.flick.contentHeight, 1000, "Header flickable is correct flickable"); | ||
1293 | 177 | tabs.selectedTabIndex = 0; | ||
1294 | 178 | } | ||
1295 | 179 | |||
1296 | 180 | function test_pageHeightLoaderNoFlick_bug1259917() { | ||
1297 | 181 | tabs.selectedTabIndex = 6; | ||
1298 | 182 | compare(tabs.selectedTab, tabNoFlickLoader, "Tab 6 was selected."); | ||
1299 | 183 | compare(mainView.__propagated.header.flickable, null, "Loaded page without flickable."); | ||
1300 | 184 | compare(loaderNoFlick.item.height, mainView.height - mainView.__propagated.header.height, | ||
1301 | 185 | "Correct height for loaded Page without flickable."); | ||
1302 | 186 | } | ||
1303 | 187 | |||
1304 | 188 | function test_index() { | ||
1305 | 189 | compare(tab1.index, 0, "tab1 is at 0"); | ||
1306 | 190 | compare(tab2.index, 1, "tab2 is at 1"); | ||
1307 | 191 | compare(tab3.index, 2, "tab3 is at 2"); | ||
1308 | 192 | compare(tabFlick1.index, 3, "tabFlick1 is at 3"); | ||
1309 | 193 | compare(tabFlick2.index, 4, "tabFlick2 is at 4"); | ||
1310 | 194 | compare(tabFlickLoader.index, 5, "tabFlickLoader is at 5"); | ||
1311 | 195 | compare(tabNoFlickLoader.index, 6, "tabNoFlickLoader is at 6"); | ||
1312 | 196 | } | ||
1313 | 197 | } | ||
1314 | 198 | } | ||
1315 | 0 | 199 | ||
1316 | === renamed file 'tests/unit_x11/tst_components/tst_tabs.qml' => 'tests/unit_x11/tst_components/tst_tabs13.qml' | |||
1317 | --- tests/unit_x11/tst_components/tst_tabs.qml 2015-09-03 11:44:38 +0000 | |||
1318 | +++ tests/unit_x11/tst_components/tst_tabs13.qml 2016-05-18 10:22:28 +0000 | |||
1319 | @@ -1,5 +1,5 @@ | |||
1320 | 1 | /* | 1 | /* |
1322 | 2 | * Copyright 2012-2014 Canonical Ltd. | 2 | * Copyright 2016 Canonical Ltd. |
1323 | 3 | * | 3 | * |
1324 | 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 |
1325 | 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 |
1326 | @@ -14,15 +14,14 @@ | |||
1327 | 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/>. |
1328 | 15 | */ | 15 | */ |
1329 | 16 | 16 | ||
1331 | 17 | import QtQuick 2.2 | 17 | import QtQuick 2.4 |
1332 | 18 | import Ubuntu.Test 1.0 | 18 | import Ubuntu.Test 1.0 |
1334 | 19 | import Ubuntu.Components 1.1 | 19 | import Ubuntu.Components 1.3 |
1335 | 20 | 20 | ||
1336 | 21 | MainView { | 21 | MainView { |
1337 | 22 | id: mainView | 22 | id: mainView |
1338 | 23 | width: units.gu(50) | 23 | width: units.gu(50) |
1339 | 24 | height: units.gu(80) | 24 | height: units.gu(80) |
1340 | 25 | useDeprecatedToolbar: false | ||
1341 | 26 | 25 | ||
1342 | 27 | Tabs { | 26 | Tabs { |
1343 | 28 | id: tabs | 27 | id: tabs |
1344 | @@ -94,6 +93,13 @@ | |||
1345 | 94 | sourceComponent: tabs.selectedTabIndex === 6 ? pageComponentNoFlick : null | 93 | sourceComponent: tabs.selectedTabIndex === 6 ? pageComponentNoFlick : null |
1346 | 95 | } | 94 | } |
1347 | 96 | } | 95 | } |
1348 | 96 | Tab { | ||
1349 | 97 | // Test for bug #1570886, see initTestCase(). | ||
1350 | 98 | id: tabWithTitleFromPage | ||
1351 | 99 | page: Page { | ||
1352 | 100 | title: "Title from Page" | ||
1353 | 101 | } | ||
1354 | 102 | } | ||
1355 | 97 | } | 103 | } |
1356 | 98 | Component { | 104 | Component { |
1357 | 99 | id: pageComponent | 105 | id: pageComponent |
1358 | @@ -118,6 +124,12 @@ | |||
1359 | 118 | name: "TabsAPINewHeader" | 124 | name: "TabsAPINewHeader" |
1360 | 119 | when: windowShown | 125 | when: windowShown |
1361 | 120 | 126 | ||
1362 | 127 | function initTestCase() { | ||
1363 | 128 | // Test for bug #1570886. | ||
1364 | 129 | compare(mainView.__propagated.header.title, tab1.title, | ||
1365 | 130 | "Incorrect initial header title."); | ||
1366 | 131 | } | ||
1367 | 132 | |||
1368 | 121 | function test_tabsDefaults() { | 133 | function test_tabsDefaults() { |
1369 | 122 | compare(tabs.selectedTabIndex, 0, "The default selectedTabIndex is 0 when Tabs has contents"); | 134 | compare(tabs.selectedTabIndex, 0, "The default selectedTabIndex is 0 when Tabs has contents"); |
1370 | 123 | compare(tabs.selectedTab, tab1, "The default selectedTab is the first tab"); | 135 | compare(tabs.selectedTab, tab1, "The default selectedTab is the first tab"); |
FAILED: Continuous integration, rev:1980 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- ci/2327/ jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- vivid-amd64- ci/150 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- vivid-armhf- ci/151/ console
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- ui-toolkit- ci/2327/ rebuild
http://