Merge lp:~faenil/ubuntu-ui-toolkit/moreListItemLayoutDocs_again into lp:ubuntu-ui-toolkit/staging

Proposed by Andrea Bernabei
Status: Merged
Approved by: Andrea Bernabei
Approved revision: 1829
Merged at revision: 2042
Proposed branch: lp:~faenil/ubuntu-ui-toolkit/moreListItemLayoutDocs_again
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 54 lines (+24/-2)
2 files modified
src/Ubuntu/UbuntuToolkit/uclistitemlayout.cpp (+22/-0)
src/Ubuntu/UbuntuToolkit/ucslotslayout.cpp (+2/-2)
To merge this branch: bzr merge lp:~faenil/ubuntu-ui-toolkit/moreListItemLayoutDocs_again
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Cris Dywan Approve
Review via email: mp+300928@code.launchpad.net

Commit message

ListItemLayout doc: add explicit note about the need to bind ListItem's height to layout's height

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

Lovely addition!

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Ubuntu/UbuntuToolkit/uclistitemlayout.cpp'
--- src/Ubuntu/UbuntuToolkit/uclistitemlayout.cpp 2016-07-18 17:18:13 +0000
+++ src/Ubuntu/UbuntuToolkit/uclistitemlayout.cpp 2016-07-22 18:17:27 +0000
@@ -64,6 +64,28 @@
64 we made it possible to tweak the position of each slot by modifying64 we made it possible to tweak the position of each slot by modifying
65 its attached properties (see \l {Advanced layout tweaks}).65 its attached properties (see \l {Advanced layout tweaks}).
6666
67 \b Note that if you're wrapping the ListItemLayout in a container such
68 as \l {ListItem}, \b {you will have to specify the height of the container so that
69 it follows ListItemLayout's height}, otherwise the layout content may appear clipped or
70 not vertically centered.
71
72 See \b {\l {Resizing the layout} {here}} for more details. Here's an example:
73 \qml
74 import QtQuick 2.4
75 import Ubuntu.Component 1.3
76 ListItem {
77 //CORRECT, ListItem will be tall enough to accomodate all the content
78 height: layout.height + (divider.visible ? divider.height : 0)
79
80 ListItemLayout {
81 id: layout
82 title.text: "Hello developers!"
83 subtitle.text: "I am a ListItemLayout"
84 summary.text: "I resize automatically to accomodate all the elements I hold. My parents should track my height property!"
85 }
86 }
87 \endqml
88
67 If you need a progression symbol in your list item,89 If you need a progression symbol in your list item,
68 just add \l ProgressionSlot as a child of your ListItemLayout.90 just add \l ProgressionSlot as a child of your ListItemLayout.
69 No manual positioning is needed, the layout will handle it for you.91 No manual positioning is needed, the layout will handle it for you.
7092
=== modified file 'src/Ubuntu/UbuntuToolkit/ucslotslayout.cpp'
--- src/Ubuntu/UbuntuToolkit/ucslotslayout.cpp 2016-07-07 08:42:42 +0000
+++ src/Ubuntu/UbuntuToolkit/ucslotslayout.cpp 2016-07-22 18:17:27 +0000
@@ -703,7 +703,7 @@
703 \qml703 \qml
704 ListItem {704 ListItem {
705 //CORRECT705 //CORRECT
706 height: layout.height + divider.height706 height: layout.height + (divider.visible ? divider.height : 0)
707707
708 SlotsLayout {708 SlotsLayout {
709 id: layout709 id: layout
@@ -765,7 +765,7 @@
765765
766 \qml766 \qml
767 ListItem {767 ListItem {
768 height: layout.height + divider.height768 height: layout.height + (divider.visible ? divider.height : 0)
769 onClicked: console.log("clicked!")769 onClicked: console.log("clicked!")
770770
771 SlotsLayout {771 SlotsLayout {

Subscribers

People subscribed via source and target branches