on xenial help sign in
Fix anchors warnings in Layout usage.
704f0b2Rodney Dawes
qml/Stage/WindowDecoration.qml+5−6
@@ -99,13 +99,12 @@ MouseArea {
99 spacing: units.gu(3)
99 spacing: units.gu(3)
100
100
101 WindowControlButtons {
101 WindowControlButtons {
102+ Layout.fillHeight: true
103+ Layout.fillWidth: false
104+ Layout.topMargin: units.gu(0.5)
105+ Layout.bottomMargin: units.gu(0.5)
106+
102 id: buttons
107 id: buttons
103− anchors {
104− top: parent.top
105− bottom: parent.bottom
106− topMargin: units.gu(0.5)
107− bottomMargin: units.gu(0.5)
108− }
109 active: root.active
108 active: root.active
110 onCloseClicked: root.closeClicked();
109 onCloseClicked: root.closeClicked();
111 onMinimizeClicked: root.minimizeClicked();
110 onMinimizeClicked: root.minimizeClicked();
tests/qmltests/Stage/ApplicationCheckBox.qml+6−6
@@ -95,11 +95,12 @@ Column {
95 }
95 }
96 }
96 }
97 Label {
97 Label {
98+ Layout.alignment: Qt.AlignVCenter
98 id: appIdLabel
99 id: appIdLabel
99 text: root.appId
100 text: root.appId
100− anchors.verticalCenter: parent.verticalCenter
101 }
101 }
102 Rectangle {
102 Rectangle {
103+ Layout.alignment: Qt.AlignVCenter
103 color: {
104 color: {
104 if (d.application) {
105 if (d.application) {
105 if (d.application.state === ApplicationInfoInterface.Starting) {
106 if (d.application.state === ApplicationInfoInterface.Starting) {
@@ -117,13 +118,12 @@ Column {
117 }
118 }
118 width: height
119 width: height
119 height: appIdLabel.height * 0.7
120 height: appIdLabel.height * 0.7
120− anchors.verticalCenter: parent.verticalCenter
121 }
121 }
122
122
123 MouseArea {
123 MouseArea {
124+ Layout.alignment: Qt.AlignVCenter
124 width: height
125 width: height
125 height: appIdLabel.height * 0.7
126 height: appIdLabel.height * 0.7
126− anchors.verticalCenter: parent.verticalCenter
127 onClicked: root.createSurface()
127 onClicked: root.createSurface()
128 enabled: d.application && d.application.state === ApplicationInfoInterface.Running
128 enabled: d.application && d.application.state === ApplicationInfoInterface.Running
129 visible: enabled
129 visible: enabled
@@ -146,16 +146,16 @@ Column {
146 text: promptCount + " prompts"
146 text: promptCount + " prompts"
147 }
147 }
148 MouseArea {
148 MouseArea {
149+ Layout.alignment: Qt.AlignVCenter
149 width: height
150 width: height
150 height: promptsLabel.height * 0.7
151 height: promptsLabel.height * 0.7
151− anchors.verticalCenter: parent.verticalCenter
152 onClicked: d.application.createPromptSurface()
152 onClicked: d.application.createPromptSurface()
153 Label { text: "➕"; anchors.centerIn: parent }
153 Label { text: "➕"; anchors.centerIn: parent }
154 }
154 }
155 MouseArea {
155 MouseArea {
156+ Layout.alignment: Qt.AlignVCenter
156 width: height
157 width: height
157 height: promptsLabel.height * 0.7
158 height: promptsLabel.height * 0.7
158− anchors.verticalCenter: parent.verticalCenter
159 onClicked: d.application.promptSurfaceList.get(0).close()
159 onClicked: d.application.promptSurfaceList.get(0).close()
160 enabled: d.application && d.application.promptSurfaceList.count > 0
160 enabled: d.application && d.application.promptSurfaceList.count > 0
161 Label { text: "➖"; anchors.centerIn: parent; enabled: parent.enabled }
161 Label { text: "➖"; anchors.centerIn: parent; enabled: parent.enabled }
@@ -173,9 +173,9 @@ Column {
173 text: "- " + model.surface.name
173 text: "- " + model.surface.name
174 }
174 }
175 MouseArea {
175 MouseArea {
176+ Layout.alignment: Qt.AlignVCenter
176 width: height
177 width: height
177 height: appIdLabel.height * 0.7
178 height: appIdLabel.height * 0.7
178− anchors.verticalCenter: parent.verticalCenter
179 enabled: model.surface.live
179 enabled: model.surface.live
180 visible: enabled
180 visible: enabled
181 onClicked: model.surface.setLive(false);
181 onClicked: model.surface.setLive(false);