on xenial help sign in
grouped anchors.
9e6ce1fNick Dedekind
modules/Unity/Indicators/Messaging/qml/ActionTextField.qml+12−8
@@ -31,11 +31,13 @@ Item {
31 TextField {
31 TextField {
32 id: __replyField
32 id: __replyField
33
33
34+ anchors {
34− anchors.top: parent.top
35+ top: parent.top
35− anchors.bottom: parent.bottom
36+ bottom: parent.bottom
36− anchors.left: parent.left
37+ left: parent.left
37− anchors.right: __sendButton.left
38+ right: __sendButton.left
38− anchors.rightMargin: units.gu(1)
39+ rightMargin: units.gu(1)
40+ }
39 placeholderText: "Reply"
41 placeholderText: "Reply"
40 hasClearButton: false
42 hasClearButton: false
41
43
@@ -52,9 +54,11 @@ Item {
52 id: __sendButton
54 id: __sendButton
53
55
54 actionParameter: __replyField.text
56 actionParameter: __replyField.text
57+ anchors {
55− anchors.top: parent.top
58+ top: parent.top
56− anchors.bottom: parent.bottom
59+ bottom: parent.bottom
57− anchors.right: parent.right
60+ right: parent.right
61+ }
58 width: units.gu(9)
62 width: units.gu(9)
59 enabled: __replyField.text !== ""
63 enabled: __replyField.text !== ""
60 color: enabled ? "#c94212" : "#bababa"
64 color: enabled ? "#c94212" : "#bababa"
modules/Unity/Indicators/Messaging/qml/HeroMessageHeader.qml+44−30
@@ -38,10 +38,12 @@ Item {
38
38
39 UbuntuShape {
39 UbuntuShape {
40 id: __avatarImageContainer
40 id: __avatarImageContainer
41+ anchors {
41− anchors.top: parent.top
42+ top: parent.top
42− anchors.topMargin: units.gu(2)
43+ topMargin: units.gu(2)
43− anchors.left: parent.left
44+ left: parent.left
44− anchors.leftMargin: units.gu(2)
45+ leftMargin: units.gu(2)
46+ }
45 height: units.gu(6)
47 height: units.gu(6)
46 width: units.gu(6)
48 width: units.gu(6)
47 image: Image {
49 image: Image {
@@ -52,10 +54,12 @@ Item {
52
54
53 Image {
55 Image {
54 id: __iconImage
56 id: __iconImage
57+ anchors {
55− anchors.top: parent.top
58+ top: parent.top
56− anchors.topMargin: units.gu(2)
59+ topMargin: units.gu(2)
57− anchors.left: __avatarImageContainer.right
60+ left: __avatarImageContainer.right
58− anchors.leftMargin: units.gu(1)
61+ leftMargin: units.gu(1)
62+ }
59 height: units.gu(1.5)
63 height: units.gu(1.5)
60 width: units.gu(2)
64 width: units.gu(2)
61 horizontalAlignment: Image.AlignHCenter
65 horizontalAlignment: Image.AlignHCenter
@@ -65,11 +69,13 @@ Item {
65
69
66 Label {
70 Label {
67 id: __titleText
71 id: __titleText
72+ anchors {
68− anchors.baseline: __iconImage.bottom
73+ baseline: __iconImage.bottom
69− anchors.left: __iconImage.right
74+ left: __iconImage.right
70− anchors.leftMargin: units.gu(1)
75+ leftMargin: units.gu(1)
71− anchors.right: __appIcon.left
76+ right: __appIcon.left
72− anchors.rightMargin: units.gu(2)
77+ rightMargin: units.gu(2)
78+ }
73 elide: Text.ElideRight
79 elide: Text.ElideRight
74 color: "#e8e1d0"
80 color: "#e8e1d0"
75 font.weight: Font.DemiBold
81 font.weight: Font.DemiBold
@@ -78,10 +84,12 @@ Item {
78
84
79 Label {
85 Label {
80 id: __subtitleText
86 id: __subtitleText
87+ anchors {
81− anchors.baseline: __titleText.baseline
88+ baseline: __titleText.baseline
82− anchors.baselineOffset: units.gu(2.5)
89+ baselineOffset: units.gu(2.5)
83− anchors.left: __titleText.left
90+ left: __titleText.left
84− anchors.right: __titleText.right
91+ right: __titleText.right
92+ }
85 elide: Text.ElideRight
93 elide: Text.ElideRight
86 color: "#8f8f88"
94 color: "#8f8f88"
87 fontSize: "small"
95 fontSize: "small"
@@ -89,11 +97,13 @@ Item {
89
97
90 Label {
98 Label {
91 id: __bodyText
99 id: __bodyText
100+ anchors {
92− anchors.baseline: __subtitleText.baseline
101+ baseline: __subtitleText.baseline
93− anchors.baselineOffset: units.gu(2.5)
102+ baselineOffset: units.gu(2.5)
94− anchors.left: __titleText.left
103+ left: __titleText.left
95− anchors.right: parent.right
104+ right: parent.right
96− anchors.rightMargin: units.gu(2)
105+ rightMargin: units.gu(2)
106+ }
97 maximumLineCount: 2
107 maximumLineCount: 2
98 wrapMode: Text.WordWrap
108 wrapMode: Text.WordWrap
99 elide: Text.ElideRight
109 elide: Text.ElideRight
@@ -105,20 +115,24 @@ Item {
105 id: __appIcon
115 id: __appIcon
106 width: units.gu(7)
116 width: units.gu(7)
107 height: units.gu(7)
117 height: units.gu(7)
118+ anchors {
108− anchors.top: parent.top
119+ top: parent.top
109− anchors.right: parent.right
120+ right: parent.right
121+ }
110 opacity: 0.0
122 opacity: 0.0
111 enabled: __heroMessageHeader.state === "expanded"
123 enabled: __heroMessageHeader.state === "expanded"
112
124
113 Image {
125 Image {
114 id: __appIconImage
126 id: __appIconImage
115 height: width
127 height: width
128+ anchors {
116− anchors.left: parent.left
129+ left: parent.left
117− anchors.leftMargin: units.gu(2)
130+ leftMargin: units.gu(2)
118− anchors.right: parent.right
131+ right: parent.right
119− anchors.rightMargin: units.gu(2)
132+ rightMargin: units.gu(2)
120− anchors.topMargin: units.gu(1)
133+ topMargin: units.gu(1)
121− anchors.verticalCenter: parent.verticalCenter
134+ verticalCenter: parent.verticalCenter
135+ }
122 fillMode: Image.PreserveAspectFit
136 fillMode: Image.PreserveAspectFit
123 }
137 }
124
138
modules/Unity/Indicators/Messaging/qml/QuickReply.qml+17−11
@@ -38,11 +38,13 @@ Item {
38 height: units.gu(4)
38 height: units.gu(4)
39
39
40 Row {
40 Row {
41+ anchors {
41− anchors.fill: parent
42+ fill: parent
42− anchors.leftMargin: units.gu(2)
43+ leftMargin: units.gu(2)
43− anchors.rightMargin: units.gu(2)
44+ rightMargin: units.gu(2)
44− anchors.topMargin: units.gu(1)
45+ topMargin: units.gu(1)
45− anchors.bottomMargin: units.gu(1)
46+ bottomMargin: units.gu(1)
47+ }
46 spacing: units.gu(1)
48 spacing: units.gu(1)
47
49
48 Image {
50 Image {
@@ -69,9 +71,11 @@ Item {
69
71
70 Column {
72 Column {
71 id: __messagelist
73 id: __messagelist
74+ anchors {
72− anchors.left: parent.left
75+ left: parent.left
73− anchors.right: parent.right
76+ right: parent.right
74− anchors.top: __header.bottom
77+ top: __header.bottom
78+ }
75 height: childrenRect.height
79 height: childrenRect.height
76
80
77 Repeater {
81 Repeater {
@@ -87,9 +91,11 @@ Item {
87 Label {
91 Label {
88 id: __label
92 id: __label
89
93
94+ anchors {
90− anchors.fill: parent
95+ fill: parent
91− anchors.leftMargin: units.gu(2)
96+ leftMargin: units.gu(2)
92− anchors.rightMargin: units.gu(2)
97+ rightMargin: units.gu(2)
98+ }
93 verticalAlignment: Text.AlignVCenter
99 verticalAlignment: Text.AlignVCenter
94 fontSize: "medium"
100 fontSize: "medium"
95 color: "#e8e1d0"
101 color: "#e8e1d0"
modules/Unity/Indicators/Messaging/qml/SimpleTextMessage.qml+18−12
@@ -35,20 +35,24 @@ HeroMessage {
35 Item {
35 Item {
36 id: __fullMessage
36 id: __fullMessage
37
37
38+ anchors {
38− anchors.left: parent.left
39+ left: parent.left
39− anchors.leftMargin: units.gu(2)
40+ leftMargin: units.gu(2)
40− anchors.right: parent.right
41+ right: parent.right
41− anchors.rightMargin: units.gu(2)
42+ rightMargin: units.gu(2)
42− anchors.top: heroMessageHeader.bottom
43+ top: heroMessageHeader.bottom
44+ }
43 height: childrenRect.height
45 height: childrenRect.height
44 opacity: 0.0
46 opacity: 0.0
45 enabled: false
47 enabled: false
46
48
47 Label {
49 Label {
48 id: __bodyText
50 id: __bodyText
51+ anchors {
49− anchors.top: parent.top
52+ top: parent.top
50− anchors.left: parent.left
53+ left: parent.left
51− anchors.right: parent.right
54+ right: parent.right
55+ }
52 wrapMode: Text.WordWrap
56 wrapMode: Text.WordWrap
53 elide: Text.ElideRight
57 elide: Text.ElideRight
54 color: "#e8e1d0"
58 color: "#e8e1d0"
@@ -59,10 +63,12 @@ HeroMessage {
59 Loader {
63 Loader {
60 id: __footer
64 id: __footer
61
65
66+ anchors {
62− anchors.top: __bodyText.bottom
67+ top: __bodyText.bottom
63− anchors.topMargin: units.gu(2)
68+ topMargin: units.gu(2)
64− anchors.left: parent.left
69+ left: parent.left
65− anchors.right: parent.right
70+ right: parent.right
71+ }
66 height: __footer.item != undefined ? units.gu(4) : 0
72 height: __footer.item != undefined ? units.gu(4) : 0
67 }
73 }
68
74
modules/Unity/Indicators/Messaging/qml/SnapDecision.qml+6−4
@@ -100,10 +100,12 @@ HeroMessage {
100
100
101 messages: actionsDescription ? actionsDescription[1]["parameter-hint"] : ""
101 messages: actionsDescription ? actionsDescription[1]["parameter-hint"] : ""
102 buttonText: actionsDescription ? actionsDescription[1].label : "send"
102 buttonText: actionsDescription ? actionsDescription[1].label : "send"
103+ anchors {
103− anchors.top: __buttons.bottom
104+ top: __buttons.bottom
104− anchors.topMargin: units.gu(2)
105+ topMargin: units.gu(2)
105− anchors.left: parent.left
106+ left: parent.left
106− anchors.right: parent.right
107+ right: parent.right
108+ }
107 height: 0
109 height: 0
108 opacity: 0.0
110 opacity: 0.0
109 enabled: false
111 enabled: false
modules/Unity/Indicators/qml/HLine.qml+4−2
@@ -22,6 +22,8 @@ import Ubuntu.Components 0.1
22
22
23Rectangle {
23Rectangle {
24 height: units.dp(1)
24 height: units.dp(1)
25+ anchors {
25− anchors.left: parent.left
26+ left: parent.left
26− anchors.right: parent.right
27+ right: parent.right
28+ }
27}
29}
modules/Unity/Indicators/qml/IndicatorPage.qml+8−4
@@ -63,8 +63,10 @@ IndicatorBase {
63 property bool ready: false
63 property bool ready: false
64 property alias empty: factory.empty
64 property alias empty: factory.empty
65
65
66+ anchors {
66− anchors.left: parent.left
67+ left: parent.left
67− anchors.right: parent.right
68+ right: parent.right
69+ }
68 height: div.height + factory.implicitHeight
70 height: div.height + factory.implicitHeight
69 visible: height > 0
71 visible: height > 0
70
72
@@ -127,8 +129,10 @@ IndicatorBase {
127
129
128 actionGroup: main.actionGroup
130 actionGroup: main.actionGroup
129 isCurrentItem: item.ListView.isCurrentItem
131 isCurrentItem: item.ListView.isCurrentItem
132+ anchors {
130− anchors.left: parent.left
133+ left: parent.left
131− anchors.right: parent.right
134+ right: parent.right
135+ }
132 menu: model
136 menu: model
133
137
134 Connections {
138 Connections {
modules/Unity/Indicators/qml/ProgressMenuItem.qml+6−4
@@ -28,10 +28,12 @@ MenuItem {
28 // it is available. For now, this rebuilds the Mockup as close as possible.
28 // it is available. For now, this rebuilds the Mockup as close as possible.
29 UbuntuShape {
29 UbuntuShape {
30 id: progressBar
30 id: progressBar
31+ anchors {
31− anchors.right: parent.right
32+ right: parent.right
32− anchors.rightMargin: units.gu(2)
33+ rightMargin: units.gu(2)
33− anchors.left: parent.left
34+ left: parent.left
34− anchors.leftMargin: units.gu(2)
35+ leftMargin: units.gu(2)
36+ }
35 height: units.gu(4)
37 height: units.gu(4)
36 anchors.verticalCenter: parent.verticalCenter
38 anchors.verticalCenter: parent.verticalCenter
37 color: "#00000000"
39 color: "#00000000"
modules/Unity/Indicators/qml/SectionMenuItem.qml+13−7
@@ -29,8 +29,10 @@ BasicMenuItem {
29 property int count: menu && menu.linkSection ? menu.linkSection.count : 0
29 property int count: menu && menu.linkSection ? menu.linkSection.count : 0
30
30
31 color: "#221e1b"
31 color: "#221e1b"
32+ anchors {
32− anchors.left: parent ? parent.left : undefined
33+ left: parent ? parent.left : undefined
33− anchors.right: parent ? parent.right : undefined
34+ right: parent ? parent.right : undefined
35+ }
34 implicitHeight: label !== "" ? __header.height : 0
36 implicitHeight: label !== "" ? __header.height : 0
35 state: count === 0 ? "EMPTY" : ""
37 state: count === 0 ? "EMPTY" : ""
36
38
@@ -39,16 +41,20 @@ BasicMenuItem {
39
41
40 text: label
42 text: label
41 height: units.gu(4)
43 height: units.gu(4)
44+ anchors {
42− anchors.left: parent.left
45+ left: parent.left
43− anchors.right: parent.right
46+ right: parent.right
44− anchors.top: parent.top
47+ top: parent.top
48+ }
45 visible: text != ""
49 visible: text != ""
46
50
47 ActivityIndicator {
51 ActivityIndicator {
48 id: indicator
52 id: indicator
49 running: busy
53 running: busy
54+ anchors {
50− anchors.margins: units.gu(0.5)
55+ margins: units.gu(0.5)
51− anchors.right: parent.right
56+ right: parent.right
57+ }
52 height: parent.height - (anchors.margins * 2)
58 height: parent.height - (anchors.margins * 2)
53 width: height
59 width: height
54 anchors.verticalCenter: parent.verticalCenter
60 anchors.verticalCenter: parent.verticalCenter