on xenial help sign in
grouped anchors.
commit9e6ce1f634a55fbba707067f6503a784f0b30d35 authorNick Dedekind <nicholas.dedekind@gmail.com> dateMon 1 Jul 2013, 11:14 (13 years ago) parent369daae
9 files changed+128−82
modules/Unity/Indicators/Messaging/qml/ActionTextField.qml+12−8 modules/Unity/Indicators/Messaging/qml/HeroMessageHeader.qml+44−30 modules/Unity/Indicators/Messaging/qml/QuickReply.qml+17−11 modules/Unity/Indicators/Messaging/qml/SimpleTextMessage.qml+18−12 modules/Unity/Indicators/Messaging/qml/SnapDecision.qml+6−4 modules/Unity/Indicators/qml/HLine.qml+4−2 modules/Unity/Indicators/qml/IndicatorPage.qml+8−4 modules/Unity/Indicators/qml/ProgressMenuItem.qml+6−4 modules/Unity/Indicators/qml/SectionMenuItem.qml+13−7
modules/Unity/Indicators/Messaging/qml/ActionTextField.qml+12−8
@@ -31,11 +31,13 @@ Item {
3131 TextField {
3232 id: __replyField
3333
34− anchors.top: parent.top
35− anchors.bottom: parent.bottom
36− anchors.left: parent.left
37− anchors.right: __sendButton.left
38− anchors.rightMargin: units.gu(1)
34+ anchors {
35+ top: parent.top
36+ bottom: parent.bottom
37+ left: parent.left
38+ right: __sendButton.left
39+ rightMargin: units.gu(1)
40+ }
3941 placeholderText: "Reply"
4042 hasClearButton: false
4143
@@ -52,9 +54,11 @@ Item {
5254 id: __sendButton
5355
5456 actionParameter: __replyField.text
55− anchors.top: parent.top
56− anchors.bottom: parent.bottom
57− anchors.right: parent.right
57+ anchors {
58+ top: parent.top
59+ bottom: parent.bottom
60+ right: parent.right
61+ }
5862 width: units.gu(9)
5963 enabled: __replyField.text !== ""
6064 color: enabled ? "#c94212" : "#bababa"
modules/Unity/Indicators/Messaging/qml/HeroMessageHeader.qml+44−30
@@ -38,10 +38,12 @@ Item {
3838
3939 UbuntuShape {
4040 id: __avatarImageContainer
41− anchors.top: parent.top
42− anchors.topMargin: units.gu(2)
43− anchors.left: parent.left
44− anchors.leftMargin: units.gu(2)
41+ anchors {
42+ top: parent.top
43+ topMargin: units.gu(2)
44+ left: parent.left
45+ leftMargin: units.gu(2)
46+ }
4547 height: units.gu(6)
4648 width: units.gu(6)
4749 image: Image {
@@ -52,10 +54,12 @@ Item {
5254
5355 Image {
5456 id: __iconImage
55− anchors.top: parent.top
56− anchors.topMargin: units.gu(2)
57− anchors.left: __avatarImageContainer.right
58− anchors.leftMargin: units.gu(1)
57+ anchors {
58+ top: parent.top
59+ topMargin: units.gu(2)
60+ left: __avatarImageContainer.right
61+ leftMargin: units.gu(1)
62+ }
5963 height: units.gu(1.5)
6064 width: units.gu(2)
6165 horizontalAlignment: Image.AlignHCenter
@@ -65,11 +69,13 @@ Item {
6569
6670 Label {
6771 id: __titleText
68− anchors.baseline: __iconImage.bottom
69− anchors.left: __iconImage.right
70− anchors.leftMargin: units.gu(1)
71− anchors.right: __appIcon.left
72− anchors.rightMargin: units.gu(2)
72+ anchors {
73+ baseline: __iconImage.bottom
74+ left: __iconImage.right
75+ leftMargin: units.gu(1)
76+ right: __appIcon.left
77+ rightMargin: units.gu(2)
78+ }
7379 elide: Text.ElideRight
7480 color: "#e8e1d0"
7581 font.weight: Font.DemiBold
@@ -78,10 +84,12 @@ Item {
7884
7985 Label {
8086 id: __subtitleText
81− anchors.baseline: __titleText.baseline
82− anchors.baselineOffset: units.gu(2.5)
83− anchors.left: __titleText.left
84− anchors.right: __titleText.right
87+ anchors {
88+ baseline: __titleText.baseline
89+ baselineOffset: units.gu(2.5)
90+ left: __titleText.left
91+ right: __titleText.right
92+ }
8593 elide: Text.ElideRight
8694 color: "#8f8f88"
8795 fontSize: "small"
@@ -89,11 +97,13 @@ Item {
8997
9098 Label {
9199 id: __bodyText
92− anchors.baseline: __subtitleText.baseline
93− anchors.baselineOffset: units.gu(2.5)
94− anchors.left: __titleText.left
95− anchors.right: parent.right
96− anchors.rightMargin: units.gu(2)
100+ anchors {
101+ baseline: __subtitleText.baseline
102+ baselineOffset: units.gu(2.5)
103+ left: __titleText.left
104+ right: parent.right
105+ rightMargin: units.gu(2)
106+ }
97107 maximumLineCount: 2
98108 wrapMode: Text.WordWrap
99109 elide: Text.ElideRight
@@ -105,20 +115,24 @@ Item {
105115 id: __appIcon
106116 width: units.gu(7)
107117 height: units.gu(7)
108− anchors.top: parent.top
109− anchors.right: parent.right
118+ anchors {
119+ top: parent.top
120+ right: parent.right
121+ }
110122 opacity: 0.0
111123 enabled: __heroMessageHeader.state === "expanded"
112124
113125 Image {
114126 id: __appIconImage
115127 height: width
116− anchors.left: parent.left
117− anchors.leftMargin: units.gu(2)
118− anchors.right: parent.right
119− anchors.rightMargin: units.gu(2)
120− anchors.topMargin: units.gu(1)
121− anchors.verticalCenter: parent.verticalCenter
128+ anchors {
129+ left: parent.left
130+ leftMargin: units.gu(2)
131+ right: parent.right
132+ rightMargin: units.gu(2)
133+ topMargin: units.gu(1)
134+ verticalCenter: parent.verticalCenter
135+ }
122136 fillMode: Image.PreserveAspectFit
123137 }
124138
modules/Unity/Indicators/Messaging/qml/QuickReply.qml+17−11
@@ -38,11 +38,13 @@ Item {
3838 height: units.gu(4)
3939
4040 Row {
41− anchors.fill: parent
42− anchors.leftMargin: units.gu(2)
43− anchors.rightMargin: units.gu(2)
44− anchors.topMargin: units.gu(1)
45− anchors.bottomMargin: units.gu(1)
41+ anchors {
42+ fill: parent
43+ leftMargin: units.gu(2)
44+ rightMargin: units.gu(2)
45+ topMargin: units.gu(1)
46+ bottomMargin: units.gu(1)
47+ }
4648 spacing: units.gu(1)
4749
4850 Image {
@@ -69,9 +71,11 @@ Item {
6971
7072 Column {
7173 id: __messagelist
72− anchors.left: parent.left
73− anchors.right: parent.right
74− anchors.top: __header.bottom
74+ anchors {
75+ left: parent.left
76+ right: parent.right
77+ top: __header.bottom
78+ }
7579 height: childrenRect.height
7680
7781 Repeater {
@@ -87,9 +91,11 @@ Item {
8791 Label {
8892 id: __label
8993
90− anchors.fill: parent
91− anchors.leftMargin: units.gu(2)
92− anchors.rightMargin: units.gu(2)
94+ anchors {
95+ fill: parent
96+ leftMargin: units.gu(2)
97+ rightMargin: units.gu(2)
98+ }
9399 verticalAlignment: Text.AlignVCenter
94100 fontSize: "medium"
95101 color: "#e8e1d0"
modules/Unity/Indicators/Messaging/qml/SimpleTextMessage.qml+18−12
@@ -35,20 +35,24 @@ HeroMessage {
3535 Item {
3636 id: __fullMessage
3737
38− anchors.left: parent.left
39− anchors.leftMargin: units.gu(2)
40− anchors.right: parent.right
41− anchors.rightMargin: units.gu(2)
42− anchors.top: heroMessageHeader.bottom
38+ anchors {
39+ left: parent.left
40+ leftMargin: units.gu(2)
41+ right: parent.right
42+ rightMargin: units.gu(2)
43+ top: heroMessageHeader.bottom
44+ }
4345 height: childrenRect.height
4446 opacity: 0.0
4547 enabled: false
4648
4749 Label {
4850 id: __bodyText
49− anchors.top: parent.top
50− anchors.left: parent.left
51− anchors.right: parent.right
51+ anchors {
52+ top: parent.top
53+ left: parent.left
54+ right: parent.right
55+ }
5256 wrapMode: Text.WordWrap
5357 elide: Text.ElideRight
5458 color: "#e8e1d0"
@@ -59,10 +63,12 @@ HeroMessage {
5963 Loader {
6064 id: __footer
6165
62− anchors.top: __bodyText.bottom
63− anchors.topMargin: units.gu(2)
64− anchors.left: parent.left
65− anchors.right: parent.right
66+ anchors {
67+ top: __bodyText.bottom
68+ topMargin: units.gu(2)
69+ left: parent.left
70+ right: parent.right
71+ }
6672 height: __footer.item != undefined ? units.gu(4) : 0
6773 }
6874
modules/Unity/Indicators/Messaging/qml/SnapDecision.qml+6−4
@@ -100,10 +100,12 @@ HeroMessage {
100100
101101 messages: actionsDescription ? actionsDescription[1]["parameter-hint"] : ""
102102 buttonText: actionsDescription ? actionsDescription[1].label : "send"
103− anchors.top: __buttons.bottom
104− anchors.topMargin: units.gu(2)
105− anchors.left: parent.left
106− anchors.right: parent.right
103+ anchors {
104+ top: __buttons.bottom
105+ topMargin: units.gu(2)
106+ left: parent.left
107+ right: parent.right
108+ }
107109 height: 0
108110 opacity: 0.0
109111 enabled: false
modules/Unity/Indicators/qml/HLine.qml+4−2
@@ -22,6 +22,8 @@ import Ubuntu.Components 0.1
2222
2323Rectangle {
2424 height: units.dp(1)
25− anchors.left: parent.left
26− anchors.right: parent.right
25+ anchors {
26+ left: parent.left
27+ right: parent.right
28+ }
2729}
modules/Unity/Indicators/qml/IndicatorPage.qml+8−4
@@ -63,8 +63,10 @@ IndicatorBase {
6363 property bool ready: false
6464 property alias empty: factory.empty
6565
66− anchors.left: parent.left
67− anchors.right: parent.right
66+ anchors {
67+ left: parent.left
68+ right: parent.right
69+ }
6870 height: div.height + factory.implicitHeight
6971 visible: height > 0
7072
@@ -127,8 +129,10 @@ IndicatorBase {
127129
128130 actionGroup: main.actionGroup
129131 isCurrentItem: item.ListView.isCurrentItem
130− anchors.left: parent.left
131− anchors.right: parent.right
132+ anchors {
133+ left: parent.left
134+ right: parent.right
135+ }
132136 menu: model
133137
134138 Connections {
modules/Unity/Indicators/qml/ProgressMenuItem.qml+6−4
@@ -28,10 +28,12 @@ MenuItem {
2828 // it is available. For now, this rebuilds the Mockup as close as possible.
2929 UbuntuShape {
3030 id: progressBar
31− anchors.right: parent.right
32− anchors.rightMargin: units.gu(2)
33− anchors.left: parent.left
34− anchors.leftMargin: units.gu(2)
31+ anchors {
32+ right: parent.right
33+ rightMargin: units.gu(2)
34+ left: parent.left
35+ leftMargin: units.gu(2)
36+ }
3537 height: units.gu(4)
3638 anchors.verticalCenter: parent.verticalCenter
3739 color: "#00000000"
modules/Unity/Indicators/qml/SectionMenuItem.qml+13−7
@@ -29,8 +29,10 @@ BasicMenuItem {
2929 property int count: menu && menu.linkSection ? menu.linkSection.count : 0
3030
3131 color: "#221e1b"
32− anchors.left: parent ? parent.left : undefined
33− anchors.right: parent ? parent.right : undefined
32+ anchors {
33+ left: parent ? parent.left : undefined
34+ right: parent ? parent.right : undefined
35+ }
3436 implicitHeight: label !== "" ? __header.height : 0
3537 state: count === 0 ? "EMPTY" : ""
3638
@@ -39,16 +41,20 @@ BasicMenuItem {
3941
4042 text: label
4143 height: units.gu(4)
42− anchors.left: parent.left
43− anchors.right: parent.right
44− anchors.top: parent.top
44+ anchors {
45+ left: parent.left
46+ right: parent.right
47+ top: parent.top
48+ }
4549 visible: text != ""
4650
4751 ActivityIndicator {
4852 id: indicator
4953 running: busy
50− anchors.margins: units.gu(0.5)
51− anchors.right: parent.right
54+ anchors {
55+ margins: units.gu(0.5)
56+ right: parent.right
57+ }
5258 height: parent.height - (anchors.margins * 2)
5359 width: height
5460 anchors.verticalCenter: parent.verticalCenter