on xenial help sign in
Fix QML alignment and type errors
commit0b10f71151d8c6c39e477e9f2be1ab8482a969d4 authorRodney Dawes <dobey@ubports.com> dateMon 26 Oct 2020, 13:22 (6 years ago) parent2f186a9
16 files changed+42−38
qml/Launcher/LauncherPanel.qml−2 qml/Panel/Indicators/IndicatorMenuItemFactory.qml+2−2 qml/Panel/PanelMenuPage.qml+1−1 qml/Stage/MoveHandler.qml+7−7 qml/Tutorial/TutorialContent.qml+8−8 qml/Tutorial/TutorialLeft.qml+1−1 qml/Tutorial/TutorialLeftLong.qml+1−1 qml/Tutorial/TutorialTop.qml+2−2 qml/Wizard/Pages/30-wifi.qml+4−5 tests/qmltests/Notifications/tst_Notifications.qml+2−1 tests/qmltests/Notifications/tst_SwipeToAct.qml+2−1 tests/qmltests/Panel/PanelUI.qml+1−1 tests/qmltests/Stage/tst_ApplicationWindow.qml+3−2 tests/qmltests/Stage/tst_SurfaceContainer.qml+2−1 tests/qmltests/Stage/tst_WindowResizeArea.qml+2−1 tests/qmltests/tst_OrientedShell.qml+4−2
qml/Launcher/LauncherPanel.qml−2
@@ -566,8 +566,6 @@ Rectangle {
566566 selectedItem.dragging = true
567567 preDragging = false;
568568 }
569− }
570− if (!selectedItem.dragging) {
571569 return
572570 }
573571
qml/Panel/Indicators/IndicatorMenuItemFactory.qml+2−2
@@ -964,8 +964,8 @@ Item {
964964 QDBusActionGroup {
965965 id: actionGroup
966966 busType: 1
967− busName: rootModel.busName
968− objectPath: rootModel.actions["indicator"]
967+ busName: menuFactory.rootModel.busName
968+ objectPath: menuFactory.rootModel.actions["indicator"]
969969
970970 property var activateAction: action("activate-transfer")
971971 property var cancelAction: action("cancel-transfer")
qml/Panel/PanelMenuPage.qml+1−1
@@ -59,7 +59,7 @@ PageStack {
5959 function reset(clearModel) {
6060 if (clearModel) {
6161 clear();
62− var model = submenuIndex == undefined ? menuModel : menuModel.submenu(submenuIndex)
62+ var model = root.submenuIndex == undefined ? menuModel : menuModel.submenu(root.submenuIndex)
6363 if (model) {
6464 push(pageComponent, { "menuModel": model });
6565 }
qml/Stage/MoveHandler.qml+7−7
@@ -47,13 +47,13 @@ QtObject {
4747 property bool moving
4848
4949 readonly property int triggerArea: units.gu(8)
50− property bool nearLeftEdge: target.maximizedLeft
51− property bool nearTopEdge: target.maximized
52− property bool nearRightEdge: target.maximizedRight
53− property bool nearTopLeftCorner: target.maximizedTopLeft
54− property bool nearTopRightCorner: target.maximizedTopRight
55− property bool nearBottomLeftCorner: target.maximizedBottomLeft
56− property bool nearBottomRightCorner: target.maximizedBottomRight
50+ property bool nearLeftEdge: target && target.maximizedLeft
51+ property bool nearTopEdge: target && target.maximized
52+ property bool nearRightEdge: target && target.maximizedRight
53+ property bool nearTopLeftCorner: target && target.maximizedTopLeft
54+ property bool nearTopRightCorner: target && target.maximizedTopRight
55+ property bool nearBottomLeftCorner: target && target.maximizedBottomLeft
56+ property bool nearBottomRightCorner: target && target.maximizedBottomRight
5757
5858 property Timer mouseDownTimer: Timer {
5959 interval: 175
qml/Tutorial/TutorialContent.qml+8−8
@@ -77,7 +77,7 @@ Item {
7777
7878 readonly property bool skipped: !d.mobileScenario || d.haveShown("top")
7979 readonly property bool shown: item && item.shown
80− active: !skipped || (item && item.visible)
80+ active: !skipped
8181 onSkippedChanged: if (skipped && shown) item.hide()
8282
8383 sourceComponent: TutorialTop {
@@ -85,7 +85,7 @@ Item {
8585 objectName: "tutorialTop"
8686 anchors.fill: parent
8787 panel: root.panel
88− hides: [launcher, panel.indicators]
88+ hides: [root.launcher, panel.indicators]
8989 paused: root.paused
9090
9191 skipped: tutorialTopLoader.skipped
@@ -111,7 +111,7 @@ Item {
111111
112112 readonly property bool skipped: !d.mobileScenario || d.haveShown("left")
113113 readonly property bool shown: item && item.shown
114− active: !skipped || (item && item.visible)
114+ active: !skipped
115115 onSkippedChanged: if (skipped && shown) item.hide()
116116
117117 sourceComponent: TutorialLeft {
@@ -119,7 +119,7 @@ Item {
119119 objectName: "tutorialLeft"
120120 anchors.fill: parent
121121 launcher: root.launcher
122− hides: [launcher, panel.indicators]
122+ hides: [launcher, root.panel.indicators]
123123 paused: root.paused
124124
125125 isReady: !tutorialLeftLoader.skipped
@@ -151,7 +151,7 @@ Item {
151151
152152 readonly property bool skipped: !d.mobileScenario || d.haveShown("left-drawer")
153153 readonly property bool shown: item && item.shown
154− active: !skipped || (item && item.visible)
154+ active: !skipped
155155 onSkippedChanged: if (skipped && shown) item.hide()
156156
157157 sourceComponent: TutorialLeftLong {
@@ -159,7 +159,7 @@ Item {
159159 objectName: "tutorialLeftLong"
160160 anchors.fill: parent
161161 launcher: root.launcher
162− hides: [launcher, panel.indicators]
162+ hides: [launcher, root.panel.indicators]
163163 paused: root.paused
164164
165165 skipped: tutorialLeftLongLoader.skipped
@@ -189,7 +189,7 @@ Item {
189189
190190 readonly property bool skipped: d.haveShown("right")
191191 readonly property bool shown: item && item.shown
192− active: !skipped || (item && item.visible)
192+ active: !skipped
193193 onSkippedChanged: if (skipped && shown) item.hide()
194194
195195 sourceComponent: TutorialRight {
@@ -198,7 +198,7 @@ Item {
198198 anchors.fill: parent
199199 stage: root.stage
200200 usageScenario: root.usageScenario
201− hides: [launcher, panel.indicators]
201+ hides: [root.launcher, panel.indicators]
202202 paused: root.paused
203203
204204 skipped: tutorialRightLoader.skipped
qml/Tutorial/TutorialLeft.qml+1−1
@@ -26,7 +26,7 @@ TutorialPage {
2626 opacityOverride: 1 - launcher.visibleWidth / launcher.panelWidth
2727
2828 mouseArea {
29− anchors.leftMargin: launcher.dragAreaWidth
29+ anchors.leftMargin: root.launcher.dragAreaWidth
3030 }
3131
3232 background {
qml/Tutorial/TutorialLeftLong.qml+1−1
@@ -28,7 +28,7 @@ TutorialPage {
2828 opacityOverride: shown ? 1 - launcher.dragDistance / (launcher.panelWidth * 3) : 1
2929
3030 mouseArea {
31− anchors.leftMargin: launcher.dragAreaWidth
31+ anchors.leftMargin: root.launcher.dragAreaWidth
3232 }
3333
3434 background {
qml/Tutorial/TutorialTop.qml+2−2
@@ -28,11 +28,11 @@ TutorialPage {
2828 QtObject {
2929 id: d
3030 readonly property bool landscape: root.width > units.gu(50)
31− readonly property real columnWidth: landscape ? panel.indicators.width : root.width
31+ readonly property real columnWidth: landscape ? root.panel.indicators.width : root.width
3232 }
3333
3434 mouseArea {
35− anchors.topMargin: panel.indicators.minimizedPanelHeight
35+ anchors.topMargin: root.panel.indicators.minimizedPanelHeight
3636 }
3737
3838 background {
qml/Wizard/Pages/30-wifi.qml+4−5
@@ -163,8 +163,8 @@ LocalComponents.Page {
163163
164164 Label {
165165 id: label
166− anchors.left: parent.left
167− anchors.right: parent.right
166+ Layout.fillWidth: true
167+ Layout.fillHeight: false
168168 anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
169169 font.weight: Font.Light
170170 color: textColor
@@ -176,11 +176,10 @@ LocalComponents.Page {
176176 ListView {
177177 id: listview
178178 objectName: "accessPointsListView"
179− anchors.left: parent.left
180− anchors.right: parent.right
179+ Layout.fillWidth: true
180+ Layout.fillHeight: true
181181 clip: true
182182 model: menuModel
183− Layout.fillHeight: true
184183
185184 delegate: Loader {
186185 readonly property bool isAccessPoint: model.type === "unity.widgets.systemsettings.tablet.accesspoint"
tests/qmltests/Notifications/tst_Notifications.qml+2−1
@@ -264,8 +264,9 @@ Item {
264264 id: fakeMouseCB
265265 }
266266 Label {
267+ Layout.fillWidth: true
268+ Layout.fillHeight: true
267269 text: "With fake mouse"
268− anchors.verticalCenter: parent.verticalCenter
269270 }
270271 }
271272
tests/qmltests/Notifications/tst_SwipeToAct.qml+2−1
@@ -149,7 +149,8 @@ Item {
149149 }
150150 Label {
151151 text: "With fake mouse"
152− anchors.verticalCenter: parent.verticalCenter
152+ Layout.fillWidth: true
153+ Layout.fillHeight: true
153154 }
154155 }
155156
tests/qmltests/Panel/PanelUI.qml+1−1
@@ -117,7 +117,7 @@ PanelTest {
117117
118118 ListItem.ItemSelector {
119119 id: modeSelector
120− anchors { left: parent.left; right: parent.right }
120+ Layout.fillWidth: true
121121 activeFocusOnPress: false
122122 text: "Mode"
123123 model: ["staged", "windowed" ]
tests/qmltests/Stage/tst_ApplicationWindow.qml+3−2
@@ -99,8 +99,9 @@ Rectangle {
9999 }
100100 }
101101 Label {
102+ Layout.fillWidth: true
103+ Layout.fillHeight: true
102104 text: "Surface"
103− anchors.verticalCenter: parent.verticalCenter
104105 }
105106 }
106107
@@ -123,8 +124,8 @@ Rectangle {
123124
124125 ListItem.ItemSelector {
125126 id: appStateSelector
127+ Layout.fillWidth: true
126128 activeFocusOnPress: false
127− anchors { left: parent.left; right: parent.right }
128129 text: "Application state"
129130 model: ["Starting",
130131 "Running",
tests/qmltests/Stage/tst_SurfaceContainer.qml+2−1
@@ -125,7 +125,8 @@ Rectangle {
125125
126126 Label {
127127 text: "surface"
128− anchors.verticalCenter: parent.verticalCenter
128+ Layout.fillWidth: true
129+ Layout.fillHeight: true
129130 }
130131 }
131132
tests/qmltests/Stage/tst_WindowResizeArea.qml+2−1
@@ -154,7 +154,8 @@ Item {
154154 Label {
155155 color: "black"
156156 text: "Window loader active"
157− anchors.verticalCenter: parent.verticalCenter
157+ Layout.fillWidth: true
158+ Layout.fillHeight: true
158159 }
159160 }
160161 Label {
tests/qmltests/tst_OrientedShell.qml+4−2
@@ -289,8 +289,9 @@ Rectangle {
289289 activeFocusOnPress: false
290290 }
291291 Label {
292+ Layout.fillWidth: true
293+ Layout.fillHeight: true
292294 text: "Orientation Locked"
293− anchors.verticalCenter: parent.verticalCenter
294295 }
295296 }
296297 Button {
@@ -350,8 +351,9 @@ Rectangle {
350351 }
351352 }
352353 Label {
354+ Layout.fillWidth: true
355+ Layout.fillHeight: true
353356 text: "Input Method"
354− anchors.verticalCenter: parent.verticalCenter
355357 }
356358 }
357359 Button {