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
=== modified file 'modules/Ubuntu/Components/ListItems/ItemSelector.qml'
--- modules/Ubuntu/Components/ListItems/ItemSelector.qml 2013-12-05 17:00:33 +0000
+++ modules/Ubuntu/Components/ListItems/ItemSelector.qml 2014-02-18 14:25:39 +0000
@@ -156,10 +156,10 @@
156 bound to the colum height) then we wouldn't be able to scroll to the end of the bottom156 bound to the colum height) then we wouldn't be able to scroll to the end of the bottom
157 boundary. The text is also invisible if none is set so this is taken into account too.*/157 boundary. The text is also invisible if none is set so this is taken into account too.*/
158 var textHeight = text === "" ? 0 : label.height + column.spacing;158 var textHeight = text === "" ? 0 : label.height + column.spacing;
159 if (parent && parent.height < list.contentHeight) {159 if (parent && parent.height > 0 && parent.height < list.contentHeight) {
160 return parent.height - textHeight;160 return parent.height - textHeight;
161 } else {161 } else {
162 list.contentHeight;162 return list.contentHeight;
163 }163 }
164 }164 }
165165
166166
=== modified file 'tests/unit_x11/tst_components/tst_listitems_itemselector.qml'
--- tests/unit_x11/tst_components/tst_listitems_itemselector.qml 2013-11-22 14:49:12 +0000
+++ tests/unit_x11/tst_components/tst_listitems_itemselector.qml 2014-02-18 14:25:39 +0000
@@ -47,6 +47,18 @@
47 }47 }
48 }48 }
4949
50 Column {
51 anchors.left: parent.left
52 anchors.right: parent.right
53
54 ListItem.ItemSelector {
55 id: expandedSelector
56 text: i18n.tr("Return results from:")
57 model: [i18n.tr("Phone only"), i18n.tr("Phone and Internet")]
58 expanded: true
59 }
60 }
61
50 Component {62 Component {
51 id: selectorDelegate63 id: selectorDelegate
5264
@@ -108,5 +120,9 @@
108 var image = findChild(testDelegate, "icon");120 var image = findChild(testDelegate, "icon");
109 compare(image.height, testDelegate.height);121 compare(image.height, testDelegate.height);
110 }122 }
123
124 function test_expandedSelector() {
125 verify(expandedSelector.containerHeight > 0, "Expanded ItemSelector height negative");
126 }
111 }127 }
112}128}

Subscribers

People subscribed via source and target branches

to status/vote changes: