Merge lp:~zsombi/ubuntu-ui-toolkit/itemselector-fix1275861 into lp:ubuntu-ui-toolkit

Proposed by Zsombor Egri
Status: Merged
Approved by: Florian Boucault
Approved revision: 939
Merged at revision: 944
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/itemselector-fix1275861
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 49 lines (+18/-2)
2 files modified
modules/Ubuntu/Components/ListItems/ItemSelector.qml (+2/-2)
tests/unit_x11/tst_components/tst_listitems_itemselector.qml (+16/-0)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/itemselector-fix1275861
Reviewer Review Type Date Requested Status
Florian Boucault (community) Approve
Sebastien Bacher (community) user testing Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+206945@code.launchpad.net

Commit message

ItemSelector regression fix.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

That patch indeed fixes the system settings regressions, thanks!

review: Approve (user testing)
Revision history for this message
Florian Boucault (fboucault) wrote :

Wonderful fix!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/ListItems/ItemSelector.qml'
2--- modules/Ubuntu/Components/ListItems/ItemSelector.qml 2013-12-05 17:00:33 +0000
3+++ modules/Ubuntu/Components/ListItems/ItemSelector.qml 2014-02-18 14:25:39 +0000
4@@ -156,10 +156,10 @@
5 bound to the colum height) then we wouldn't be able to scroll to the end of the bottom
6 boundary. The text is also invisible if none is set so this is taken into account too.*/
7 var textHeight = text === "" ? 0 : label.height + column.spacing;
8- if (parent && parent.height < list.contentHeight) {
9+ if (parent && parent.height > 0 && parent.height < list.contentHeight) {
10 return parent.height - textHeight;
11 } else {
12- list.contentHeight;
13+ return list.contentHeight;
14 }
15 }
16
17
18=== modified file 'tests/unit_x11/tst_components/tst_listitems_itemselector.qml'
19--- tests/unit_x11/tst_components/tst_listitems_itemselector.qml 2013-11-22 14:49:12 +0000
20+++ tests/unit_x11/tst_components/tst_listitems_itemselector.qml 2014-02-18 14:25:39 +0000
21@@ -47,6 +47,18 @@
22 }
23 }
24
25+ Column {
26+ anchors.left: parent.left
27+ anchors.right: parent.right
28+
29+ ListItem.ItemSelector {
30+ id: expandedSelector
31+ text: i18n.tr("Return results from:")
32+ model: [i18n.tr("Phone only"), i18n.tr("Phone and Internet")]
33+ expanded: true
34+ }
35+ }
36+
37 Component {
38 id: selectorDelegate
39
40@@ -108,5 +120,9 @@
41 var image = findChild(testDelegate, "icon");
42 compare(image.height, testDelegate.height);
43 }
44+
45+ function test_expandedSelector() {
46+ verify(expandedSelector.containerHeight > 0, "Expanded ItemSelector height negative");
47+ }
48 }
49 }

Subscribers

People subscribed via source and target branches

to status/vote changes: