Merge lp:~tpeeters/ubuntu-ui-toolkit/internalizePropagated into lp:ubuntu-ui-toolkit
- internalizePropagated
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Florian Boucault |
Approved revision: | 515 |
Merged at revision: | 511 |
Proposed branch: | lp:~tpeeters/ubuntu-ui-toolkit/internalizePropagated |
Merge into: | lp:ubuntu-ui-toolkit |
Diff against target: |
396 lines (+91/-66) 12 files modified
CHANGES (+6/-5) components.api (+1/-1) examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml (+0/-2) modules/Ubuntu/Components/MainView.qml (+1/-3) modules/Ubuntu/Components/Page.qml (+13/-5) modules/Ubuntu/Components/PageTreeNode.qml (+10/-5) modules/Ubuntu/Components/Tab.qml (+12/-0) modules/Ubuntu/Components/Tabs.qml (+4/-1) tests/unit/tst_components/tst_page.qml (+11/-11) tests/unit/tst_components/tst_pagestack.qml (+9/-9) tests/unit/tst_components/tst_tabs.qml (+6/-6) tests/unit/tst_components/tst_toolbar.qml (+18/-18) |
To merge this branch: | bzr merge lp:~tpeeters/ubuntu-ui-toolkit/internalizePropagated |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Tim Peeters | Approve | ||
Review via email: mp+164963@code.launchpad.net |
Commit message
Properly internalize PageTreeNode's propagated property and tweak header behavior so that propagated.header does not need to be used by any of the apps:
- CHANGED IN PageTreeNode: propagated TO __propagated
- CHANGED IN Tabs: Automatically show the header when the title of the active tab changes
- CHANGED IN Page/MainView: Only enable auto-hide behavior of header when the Page's flickable can be flicked vertically, so that manual setting of anchors is no longer needed for flickables that only flick horizontally (calendar-app).
Description of the change
Properly internalize PageTreeNode's propagated property.
Tim Peeters (tpeeters) wrote : | # |
finished analysis of gallery-app and ubuntu-calendar-app and updated this branch so that the header-related code in those projects can simply be removed without changing the behavior.
Tim Peeters (tpeeters) : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:509
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:511
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:512
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:514
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Tim Peeters (tpeeters) wrote : | # |
Currently the automatic header/page positioning does not take into account a Flickable that only flicks horizontally. This MR fixes that, but it breaks the workaround that the calendar-app uses for this issue.
After https:/
Tim Peeters (tpeeters) wrote : | # |
calendar-app updated.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:515
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'CHANGES' |
2 | --- CHANGES 2013-05-17 11:03:09 +0000 |
3 | +++ CHANGES 2013-05-22 16:26:26 +0000 |
4 | @@ -18,10 +18,10 @@ |
5 | * DEPRECATED IN Toolbar: property bool lock |
6 | * DEPRECATED IN ToolbarActions: property bool active |
7 | * DEPRECATED IN ToolbarActions: property bool lock |
8 | -* CHANGED IN Page: property Header header to property Header propagated.header |
9 | -* CHANGED IN Page: property Toolbar toolbar to property Toolbar propagated.toolbar |
10 | -* CHANGED IN MainView: property Header header to property Header propagated.header |
11 | -* CHANGED IN MainView: property Toolbar toolbar to property Toolbar propagated.toolbar |
12 | +* CHANGED IN Page: property Header header to property Header __propagated.header |
13 | +* CHANGED IN Page: property Toolbar toolbar to property Toolbar __propagated.toolbar |
14 | +* CHANGED IN MainView: property Header header to property Header __propagated.header |
15 | +* CHANGED IN MainView: property Toolbar toolbar to property Toolbar __propagated.toolbar |
16 | * DEPRECATED IN Page: property Header header |
17 | * DEPRECATED IN Page: property Toolbar toolbar |
18 | * DEPRECATED IN MainView: property Header header |
19 | @@ -31,7 +31,8 @@ |
20 | Compatibility Breaks |
21 | ******************** |
22 | |
23 | -* None |
24 | +- CHANGED IN Tabs: Automatically show the header when the title of the active tab changes |
25 | +- CHANGED IN Page/MainView: Only enable auto-hide behavior of header when the Page's flickable can be flicked vertically, so that manual setting of anchors is no longer needed for flickables that only flick horizontally |
26 | |
27 | SDK 0.1.46 |
28 | ########## |
29 | |
30 | === modified file 'components.api' |
31 | --- components.api 2013-05-22 07:50:32 +0000 |
32 | +++ components.api 2013-05-22 16:26:26 +0000 |
33 | @@ -105,7 +105,7 @@ |
34 | property bool __isPageTreeNode |
35 | property Header header |
36 | property Toolbar toolbar |
37 | - property QtObject propagated |
38 | + property QtObject __propagated |
39 | property bool active |
40 | property Item pageStack |
41 | property Item parentNode |
42 | |
43 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml' |
44 | --- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2013-05-14 10:25:38 +0000 |
45 | +++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2013-05-22 16:26:26 +0000 |
46 | @@ -54,8 +54,6 @@ |
47 | target: contentPage |
48 | x: pageStack.width |
49 | width: pageStack.parent.width - x |
50 | - y: gallery.propagated.header.height |
51 | - height: pageStack.parent.height - y |
52 | anchors { |
53 | left: undefined |
54 | right: undefined |
55 | |
56 | === modified file 'modules/Ubuntu/Components/MainView.qml' |
57 | --- modules/Ubuntu/Components/MainView.qml 2013-05-17 11:01:46 +0000 |
58 | +++ modules/Ubuntu/Components/MainView.qml 2013-05-22 16:26:26 +0000 |
59 | @@ -189,12 +189,11 @@ |
60 | } |
61 | } |
62 | |
63 | - propagated: QtObject { |
64 | + __propagated: QtObject { |
65 | /*! |
66 | \internal |
67 | The header that will be propagated to the children in the page tree node. |
68 | It will be used by the active \l Page to set the title. |
69 | - \qmlproperty Header propagated.header |
70 | */ |
71 | property Header header: headerItem |
72 | |
73 | @@ -202,7 +201,6 @@ |
74 | \internal |
75 | The toolbar that will be propagated to the children in the page tree node. |
76 | It will be used by the active \l Page to set the toolbar actions. |
77 | - \qmlproperty Toolbar propagated.toolbar |
78 | */ |
79 | property Toolbar toolbar: toolbarItem |
80 | } |
81 | |
82 | === modified file 'modules/Ubuntu/Components/Page.qml' |
83 | --- modules/Ubuntu/Components/Page.qml 2013-05-14 10:25:38 +0000 |
84 | +++ modules/Ubuntu/Components/Page.qml 2013-05-22 16:26:26 +0000 |
85 | @@ -96,8 +96,8 @@ |
86 | |
87 | Item { |
88 | id: internal |
89 | - property Header header: page.propagated && page.propagated.header ? page.propagated.header : null |
90 | - property Toolbar toolbar: page.propagated && page.propagated.toolbar ? page.propagated.toolbar : null |
91 | + property Header header: page.__propagated && page.__propagated.header ? page.__propagated.header : null |
92 | + property Toolbar toolbar: page.__propagated && page.__propagated.toolbar ? page.__propagated.toolbar : null |
93 | |
94 | onHeaderChanged: internal.updateHeaderAndToolbar() |
95 | onToolbarChanged: internal.updateHeaderAndToolbar() |
96 | @@ -126,8 +126,16 @@ |
97 | |
98 | property real headerHeight: internal.header && internal.header.visible ? internal.header.height : 0 |
99 | |
100 | - function isFlickable(object) { |
101 | - return object && object.hasOwnProperty("flicking") && object.hasOwnProperty("flickableDirection"); |
102 | + function isVerticalFlickable(object) { |
103 | + if (object && object.hasOwnProperty("flickableDirection") && object.hasOwnProperty("contentHeight")) { |
104 | + var direction = object.flickableDirection; |
105 | + if ( (direction === Flickable.AutoFlickDirection && (object.contentHeight !== object.height)) |
106 | + || direction === Flickable.VerticalFlick |
107 | + || direction === Flickable.HorizontalAndVerticalFlick) { |
108 | + return true; |
109 | + } |
110 | + } |
111 | + return false; |
112 | } |
113 | |
114 | /*! |
115 | @@ -136,7 +144,7 @@ |
116 | function getFlickableChild(item) { |
117 | if (item && item.hasOwnProperty("children")) { |
118 | for (var i=0; i < item.children.length; i++) { |
119 | - if (internal.isFlickable(item.children[i])) return item.children[i]; |
120 | + if (internal.isVerticalFlickable(item.children[i])) return item.children[i]; |
121 | } |
122 | } |
123 | return null; |
124 | |
125 | === modified file 'modules/Ubuntu/Components/PageTreeNode.qml' |
126 | --- modules/Ubuntu/Components/PageTreeNode.qml 2013-05-14 10:25:38 +0000 |
127 | +++ modules/Ubuntu/Components/PageTreeNode.qml 2013-05-22 16:26:26 +0000 |
128 | @@ -43,24 +43,29 @@ |
129 | /*! |
130 | \deprecated |
131 | The header of the node. Propagates down from the root node. |
132 | - This property is deprecated. Use propagated.header instead. |
133 | + This property is deprecated. |
134 | */ |
135 | - property Header header: node.propagated ? node.propagated.header : null |
136 | + property Header header: node.__propagated ? node.__propagated.header : null |
137 | |
138 | /*! |
139 | \deprecated |
140 | The toolbar of the node. Propagates down from the root node. |
141 | - This property is deprecated. Use propagated.toolbar instead. |
142 | + This property is deprecated. |
143 | */ |
144 | - property Toolbar toolbar: node.propagated ? node.propagated.toolbar : null |
145 | + property Toolbar toolbar: node.__propagated ? node.__propagated.toolbar : null |
146 | |
147 | /*! |
148 | + \internal |
149 | QtObject containing all the properties that are propagated from the |
150 | root (MainView) of a page tree to its leafs (Pages). |
151 | This object contains properties such as the header and toolbar that are |
152 | instantiated by the MainView. |
153 | + |
154 | + This property is internal because the derived classes (MainView and Page) |
155 | + need to access it, but other components using those classes should not have |
156 | + access to it. |
157 | */ |
158 | - property QtObject propagated: node.parentNode ? node.parentNode.propagated : null |
159 | + property QtObject __propagated: node.parentNode ? node.parentNode.__propagated : null |
160 | |
161 | /*! |
162 | At any time, there is exactly one path from the root node to a Page leaf node |
163 | |
164 | === modified file 'modules/Ubuntu/Components/Tab.qml' |
165 | --- modules/Ubuntu/Components/Tab.qml 2013-04-23 20:56:57 +0000 |
166 | +++ modules/Ubuntu/Components/Tab.qml 2013-05-22 16:26:26 +0000 |
167 | @@ -61,4 +61,16 @@ |
168 | parentNode.hasOwnProperty("selectedTab") && parentNode.selectedTab === tab |
169 | |
170 | visible: active |
171 | + |
172 | + /*! |
173 | + \internal |
174 | + */ |
175 | + onTitleChanged: { |
176 | + if (active) { |
177 | + // ensure the parent node is an instance of Tabs |
178 | + if (parentNode.hasOwnProperty("selectedTab")) { |
179 | + parentNode.modelChanged(); |
180 | + } |
181 | + } |
182 | + } |
183 | } |
184 | |
185 | === modified file 'modules/Ubuntu/Components/Tabs.qml' |
186 | --- modules/Ubuntu/Components/Tabs.qml 2013-05-14 10:55:26 +0000 |
187 | +++ modules/Ubuntu/Components/Tabs.qml 2013-05-22 16:26:26 +0000 |
188 | @@ -201,9 +201,12 @@ |
189 | onParentNodeChanged: internal.updateHeader() |
190 | Component.onCompleted: internal.updateHeader() |
191 | |
192 | + /*! \internal */ |
193 | + onModelChanged: if (tabs.active && internal.header) internal.header.show() |
194 | + |
195 | QtObject { |
196 | id: internal |
197 | - property Header header: tabs.propagated ? tabs.propagated.header : null |
198 | + property Header header: tabs.__propagated ? tabs.__propagated.header : null |
199 | onHeaderChanged: internal.updateHeader() |
200 | |
201 | function updateHeader() { |
202 | |
203 | === modified file 'tests/unit/tst_components/tst_page.qml' |
204 | --- tests/unit/tst_components/tst_page.qml 2013-05-14 10:46:04 +0000 |
205 | +++ tests/unit/tst_components/tst_page.qml 2013-05-22 16:26:26 +0000 |
206 | @@ -36,15 +36,15 @@ |
207 | |
208 | function initTestCase() { |
209 | compare(page.title, "", "is not set by default") |
210 | - compare(page.propagated, mainView.propagated, "page propagated equals mainView propagated") |
211 | - compare(page.propagated.header, mainView.propagated.header, "page header equals mainView header") |
212 | - compare(page.propagated.header.title, page.title, "header title is same as page title") |
213 | - compare(page.propagated.header.visible, false, "header is not visible initially because there is no title") |
214 | + compare(page.__propagated, mainView.__propagated, "page propagated equals mainView propagated") |
215 | + compare(page.__propagated.header, mainView.__propagated.header, "page header equals mainView header") |
216 | + compare(page.__propagated.header.title, page.title, "header title is same as page title") |
217 | + compare(page.__propagated.header.visible, false, "header is not visible initially because there is no title") |
218 | } |
219 | |
220 | function test_0_noHeader_bug1162028_bug1161910() { |
221 | - compare(mainView.propagated.header.title, "", "no header title by default") |
222 | - compare(mainView.propagated.header.visible, false, "header is hidden when title is not set") |
223 | + compare(mainView.__propagated.header.title, "", "no header title by default") |
224 | + compare(mainView.__propagated.header.visible, false, "header is hidden when title is not set") |
225 | compare(page.height, mainView.height, "page uses full height when there is no header") |
226 | } |
227 | |
228 | @@ -59,15 +59,15 @@ |
229 | function test_header() { |
230 | var newTitle = "Hello header!" |
231 | page.title = newTitle |
232 | - compare(mainView.propagated.header.title, newTitle, "header title updated by changing page title") |
233 | - compare(mainView.propagated.header.visible, true, "header is visible when title is set") |
234 | + compare(mainView.__propagated.header.title, newTitle, "header title updated by changing page title") |
235 | + compare(mainView.__propagated.header.visible, true, "header is visible when title is set") |
236 | page.title = "" |
237 | - compare(mainView.propagated.header.title, "", "header title unset by unsetting page title") |
238 | - compare(mainView.propagated.header.visible, false, "header is hidden when title is unset") |
239 | + compare(mainView.__propagated.header.title, "", "header title unset by unsetting page title") |
240 | + compare(mainView.__propagated.header.visible, false, "header is hidden when title is unset") |
241 | } |
242 | |
243 | function test_tools() { |
244 | - compare(mainView.propagated.toolbar.tools, page.tools, "Page updates toolbar tools"); |
245 | + compare(mainView.__propagated.toolbar.tools, page.tools, "Page updates toolbar tools"); |
246 | } |
247 | |
248 | function test_active() { |
249 | |
250 | === modified file 'tests/unit/tst_components/tst_pagestack.qml' |
251 | --- tests/unit/tst_components/tst_pagestack.qml 2013-05-14 10:46:04 +0000 |
252 | +++ tests/unit/tst_components/tst_pagestack.qml 2013-05-22 16:26:26 +0000 |
253 | @@ -23,9 +23,9 @@ |
254 | |
255 | function initTestCase() { |
256 | compare(pageStack.currentPage, null, "is not set by default"); |
257 | - compare(pageStack.propagated, mainView.propagated, "propagated property of pageStack equals mainView.propagated") |
258 | - compare(mainView.propagated.toolbar.tools, null, "no tools by default"); |
259 | - compare(mainView.propagated.header.title, "", "empty title by default"); |
260 | + compare(pageStack.__propagated, mainView.__propagated, "propagated property of pageStack equals mainView.__propagated") |
261 | + compare(mainView.__propagated.toolbar.tools, null, "no tools by default"); |
262 | + compare(mainView.__propagated.header.title, "", "empty title by default"); |
263 | } |
264 | |
265 | function test_depth() { |
266 | @@ -62,22 +62,22 @@ |
267 | |
268 | function test_title_bug1143345() { |
269 | pageStack.push(page1); |
270 | - compare(mainView.propagated.header.title, "Title 1", "Header is correctly set by page"); |
271 | + compare(mainView.__propagated.header.title, "Title 1", "Header is correctly set by page"); |
272 | page1.title = "New title"; |
273 | - compare(mainView.propagated.header.title, "New title", "Header title correctly updated by page"); |
274 | + compare(mainView.__propagated.header.title, "New title", "Header title correctly updated by page"); |
275 | pageStack.push(page2); |
276 | - compare(mainView.propagated.header.title, "Title 2", "Header is correctly set by page"); |
277 | + compare(mainView.__propagated.header.title, "Title 2", "Header is correctly set by page"); |
278 | pageStack.clear(); |
279 | page1.title = "Title 1"; |
280 | } |
281 | |
282 | function test_tools_bug1126197() { |
283 | pageStack.push(page1); |
284 | - compare(mainView.propagated.toolbar.tools, page1.tools, "Page successfully updated toolbar tools"); |
285 | + compare(mainView.__propagated.toolbar.tools, page1.tools, "Page successfully updated toolbar tools"); |
286 | pageStack.push(page2); |
287 | - compare(mainView.propagated.toolbar.tools, page2.tools, "Page successfully updated toolbar tools again"); |
288 | + compare(mainView.__propagated.toolbar.tools, page2.tools, "Page successfully updated toolbar tools again"); |
289 | pageStack.pop(); |
290 | - compare(mainView.propagated.toolbar.tools, page1.tools, "Tools updated after popping a page"); |
291 | + compare(mainView.__propagated.toolbar.tools, page1.tools, "Tools updated after popping a page"); |
292 | pageStack.clear(); |
293 | } |
294 | |
295 | |
296 | === modified file 'tests/unit/tst_components/tst_tabs.qml' |
297 | --- tests/unit/tst_components/tst_tabs.qml 2013-05-14 10:46:04 +0000 |
298 | +++ tests/unit/tst_components/tst_tabs.qml 2013-05-22 16:26:26 +0000 |
299 | @@ -31,8 +31,8 @@ |
300 | compare(tabs.selectedTabIndex, 0, "The default selectedTabIndex is 0 when Tabs has contents"); |
301 | compare(tabs.selectedTab, tab1, "The default selectedTab is the first tab"); |
302 | compare(tabs.currentPage, page1, "The default currentPage is the page of the first tab"); |
303 | - compare(mainView.propagated.toolbar.tools, page1.tools, "The default tools are the tools of the first tab"); |
304 | - compare(mainView.propagated.header.contents, tabs.__headerContents, "Tabs updates the Header contents"); |
305 | + compare(mainView.__propagated.toolbar.tools, page1.tools, "The default tools are the tools of the first tab"); |
306 | + compare(mainView.__propagated.header.contents, tabs.__headerContents, "Tabs updates the Header contents"); |
307 | } |
308 | |
309 | function test_tabsSetSelectedTab() { |
310 | @@ -43,7 +43,7 @@ |
311 | compare(tabs.selectedTabIndex, i, "Can set selectedTabIndex"); |
312 | compare(tabs.selectedTab, tabArray[i], "Can update selectedTab by setting selectedTabIndex"); |
313 | compare(tabs.currentPage, pageArray[i], "Can update currentPage by setting selectedTabIndex"); |
314 | - compare(mainView.propagated.toolbar.tools, pageArray[i].tools, "Activating a Tab updates the tools of the Toolbar"); |
315 | + compare(mainView.__propagated.toolbar.tools, pageArray[i].tools, "Activating a Tab updates the tools of the Toolbar"); |
316 | for (var j=0; j < 3; j++) { |
317 | compare(pageArray[j].active, j===i, "Only the page of the selected tab is active"); |
318 | } |
319 | @@ -53,9 +53,9 @@ |
320 | function test_flickable() { |
321 | // ensure that the flickable of the header is set to the flickable of the selected tab. |
322 | tabsFlick.selectedTabIndex = 0; |
323 | - compare(mainViewFlick.propagated.header.flickable, flickable1, "Header flickable correctly initialized"); |
324 | + compare(mainViewFlick.__propagated.header.flickable, flickable1, "Header flickable correctly initialized"); |
325 | tabsFlick.selectedTabIndex = 1; |
326 | - compare(mainViewFlick.propagated.header.flickable, flickable2, "Header flickable correctly updated"); |
327 | + compare(mainViewFlick.__propagated.header.flickable, flickable2, "Header flickable correctly updated"); |
328 | tabsFlick.selectedTabIndex = 0; |
329 | } |
330 | |
331 | @@ -71,7 +71,7 @@ |
332 | |
333 | function test_bug1088740() { |
334 | tabsFlick.selectedTabIndex = 2; |
335 | - compare(mainViewFlick.propagated.header.flickable, loader.item.flick, "Header flickable correctly updated with Loader"); |
336 | + compare(mainViewFlick.__propagated.header.flickable, loader.item.flick, "Header flickable correctly updated with Loader"); |
337 | compare(loader.item.flick.contentHeight, 1000, "Header flickable is correct flickable"); |
338 | tabsFlick.selectedTabIndex = 0; |
339 | } |
340 | |
341 | === modified file 'tests/unit/tst_components/tst_toolbar.qml' |
342 | --- tests/unit/tst_components/tst_toolbar.qml 2013-05-14 10:46:04 +0000 |
343 | +++ tests/unit/tst_components/tst_toolbar.qml 2013-05-22 16:26:26 +0000 |
344 | @@ -42,34 +42,34 @@ |
345 | |
346 | function initTestCase() { |
347 | compare(page.tools, toolbarActions, "Page tools are set initially"); |
348 | - compare(page.propagated, mainView.propagated, "propagated property is propagated from mainView to page") |
349 | - compare(mainView.propagated.toolbar.tools, page.tools, "Toolbar tools are set to page tools initially"); |
350 | - compare(mainView.propagated.toolbar.tools.opened, false, "Toolbar is closed initially"); |
351 | - compare(mainView.propagated.toolbar.tools.locked, false, "Toolbar is initially not locked"); |
352 | + compare(page.__propagated, mainView.__propagated, "propagated property is propagated from mainView to page") |
353 | + compare(mainView.__propagated.toolbar.tools, page.tools, "Toolbar tools are set to page tools initially"); |
354 | + compare(mainView.__propagated.toolbar.tools.opened, false, "Toolbar is closed initially"); |
355 | + compare(mainView.__propagated.toolbar.tools.locked, false, "Toolbar is initially not locked"); |
356 | } |
357 | |
358 | function test_opened() { |
359 | - compare(mainView.propagated.toolbar.tools.opened, false, "Toolbar initially closed"); |
360 | - mainView.propagated.toolbar.opened = true; |
361 | - compare(mainView.propagated.toolbar.opened, true, "Toolbar can be made opened"); |
362 | - mainView.propagated.toolbar.opened = false; |
363 | - compare(mainView.propagated.toolbar.opened, false, "Toolbar can be made closed"); |
364 | + compare(mainView.__propagated.toolbar.tools.opened, false, "Toolbar initially closed"); |
365 | + mainView.__propagated.toolbar.opened = true; |
366 | + compare(mainView.__propagated.toolbar.opened, true, "Toolbar can be made opened"); |
367 | + mainView.__propagated.toolbar.opened = false; |
368 | + compare(mainView.__propagated.toolbar.opened, false, "Toolbar can be made closed"); |
369 | page.tools.opened = true; |
370 | - compare(mainView.propagated.toolbar.opened, true, "Toolbar can be made opened by setting page.tools.opened"); |
371 | + compare(mainView.__propagated.toolbar.opened, true, "Toolbar can be made opened by setting page.tools.opened"); |
372 | page.tools.opened = false; |
373 | - compare(mainView.propagated.toolbar.opened, false, "Toolbar can be made closed by setting page.tools.opened to false"); |
374 | + compare(mainView.__propagated.toolbar.opened, false, "Toolbar can be made closed by setting page.tools.opened to false"); |
375 | } |
376 | |
377 | function test_locked() { |
378 | - compare(mainView.propagated.toolbar.tools.locked, false, "Toolbar initially not locked"); |
379 | - mainView.propagated.toolbar.locked = true; |
380 | - compare(mainView.propagated.toolbar.locked, true, "Toolbar can be locked"); |
381 | - mainView.propagated.toolbar.locked = false; |
382 | - compare(mainView.propagated.toolbar.locked, false, "Toolbar can be unlocked"); |
383 | + compare(mainView.__propagated.toolbar.tools.locked, false, "Toolbar initially not locked"); |
384 | + mainView.__propagated.toolbar.locked = true; |
385 | + compare(mainView.__propagated.toolbar.locked, true, "Toolbar can be locked"); |
386 | + mainView.__propagated.toolbar.locked = false; |
387 | + compare(mainView.__propagated.toolbar.locked, false, "Toolbar can be unlocked"); |
388 | page.tools.locked = true; |
389 | - compare(mainView.propagated.toolbar.locked, true, "Toolbar can be locked by setting page.tools.locked"); |
390 | + compare(mainView.__propagated.toolbar.locked, true, "Toolbar can be locked by setting page.tools.locked"); |
391 | page.tools.locked = false; |
392 | - compare(mainView.propagated.toolbar.locked, false, "Toolbar can be unlocked by setting page.tools.locked to false"); |
393 | + compare(mainView.__propagated.toolbar.locked, false, "Toolbar can be unlocked by setting page.tools.locked to false"); |
394 | } |
395 | } |
396 | } |
Two apps seem to use the header property still (none the toolbar property)
- gallery-app to hide the header when opening an album. This is not needed because that Page has no title so the header is automatically hidden
- gallery-app to show the header when entering selection mode. No solution for this yet. Perhaps we need to auto-show the header when its contents is updated. This is already the case when title or contents change, but in this case the contents of the contents property is updated.
- calendar-app needs further investigation why it is used.