on xenial help sign in
Fix anchors warnings in Layout usage.
commit704f0b220e60722f08e5cd358d9caf474018a44f authorRodney Dawes <dobey@ubports.com> dateTue 28 Jul 2020, 10:21 (6 years ago) parent041f34d
2 files changed+11−12
qml/Stage/WindowDecoration.qml+5−6 tests/qmltests/Stage/ApplicationCheckBox.qml+6−6
qml/Stage/WindowDecoration.qml+5−6
@@ -99,13 +99,12 @@ MouseArea {
9999 spacing: units.gu(3)
100100
101101 WindowControlButtons {
102+ Layout.fillHeight: true
103+ Layout.fillWidth: false
104+ Layout.topMargin: units.gu(0.5)
105+ Layout.bottomMargin: units.gu(0.5)
106+
102107 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− }
109108 active: root.active
110109 onCloseClicked: root.closeClicked();
111110 onMinimizeClicked: root.minimizeClicked();
tests/qmltests/Stage/ApplicationCheckBox.qml+6−6
@@ -95,11 +95,12 @@ Column {
9595 }
9696 }
9797 Label {
98+ Layout.alignment: Qt.AlignVCenter
9899 id: appIdLabel
99100 text: root.appId
100− anchors.verticalCenter: parent.verticalCenter
101101 }
102102 Rectangle {
103+ Layout.alignment: Qt.AlignVCenter
103104 color: {
104105 if (d.application) {
105106 if (d.application.state === ApplicationInfoInterface.Starting) {
@@ -117,13 +118,12 @@ Column {
117118 }
118119 width: height
119120 height: appIdLabel.height * 0.7
120− anchors.verticalCenter: parent.verticalCenter
121121 }
122122
123123 MouseArea {
124+ Layout.alignment: Qt.AlignVCenter
124125 width: height
125126 height: appIdLabel.height * 0.7
126− anchors.verticalCenter: parent.verticalCenter
127127 onClicked: root.createSurface()
128128 enabled: d.application && d.application.state === ApplicationInfoInterface.Running
129129 visible: enabled
@@ -146,16 +146,16 @@ Column {
146146 text: promptCount + " prompts"
147147 }
148148 MouseArea {
149+ Layout.alignment: Qt.AlignVCenter
149150 width: height
150151 height: promptsLabel.height * 0.7
151− anchors.verticalCenter: parent.verticalCenter
152152 onClicked: d.application.createPromptSurface()
153153 Label { text: "➕"; anchors.centerIn: parent }
154154 }
155155 MouseArea {
156+ Layout.alignment: Qt.AlignVCenter
156157 width: height
157158 height: promptsLabel.height * 0.7
158− anchors.verticalCenter: parent.verticalCenter
159159 onClicked: d.application.promptSurfaceList.get(0).close()
160160 enabled: d.application && d.application.promptSurfaceList.count > 0
161161 Label { text: "➖"; anchors.centerIn: parent; enabled: parent.enabled }
@@ -173,9 +173,9 @@ Column {
173173 text: "- " + model.surface.name
174174 }
175175 MouseArea {
176+ Layout.alignment: Qt.AlignVCenter
176177 width: height
177178 height: appIdLabel.height * 0.7
178− anchors.verticalCenter: parent.verticalCenter
179179 enabled: model.surface.live
180180 visible: enabled
181181 onClicked: model.surface.setLive(false);