on xenial help sign in
Fix QML alignment and type errors
0b10f71Rodney Dawes
qml/Launcher/LauncherPanel.qml−2
@@ -566,8 +566,6 @@ Rectangle {
566 selectedItem.dragging = true
566 selectedItem.dragging = true
567 preDragging = false;
567 preDragging = false;
568 }
568 }
569− }
570− if (!selectedItem.dragging) {
571 return
569 return
572 }
570 }
573
571
qml/Panel/Indicators/IndicatorMenuItemFactory.qml+2−2
@@ -964,8 +964,8 @@ Item {
964 QDBusActionGroup {
964 QDBusActionGroup {
965 id: actionGroup
965 id: actionGroup
966 busType: 1
966 busType: 1
967− busName: rootModel.busName
967+ busName: menuFactory.rootModel.busName
968− objectPath: rootModel.actions["indicator"]
968+ objectPath: menuFactory.rootModel.actions["indicator"]
969
969
970 property var activateAction: action("activate-transfer")
970 property var activateAction: action("activate-transfer")
971 property var cancelAction: action("cancel-transfer")
971 property var cancelAction: action("cancel-transfer")
qml/Panel/PanelMenuPage.qml+1−1
@@ -59,7 +59,7 @@ PageStack {
59 function reset(clearModel) {
59 function reset(clearModel) {
60 if (clearModel) {
60 if (clearModel) {
61 clear();
61 clear();
62− var model = submenuIndex == undefined ? menuModel : menuModel.submenu(submenuIndex)
62+ var model = root.submenuIndex == undefined ? menuModel : menuModel.submenu(root.submenuIndex)
63 if (model) {
63 if (model) {
64 push(pageComponent, { "menuModel": model });
64 push(pageComponent, { "menuModel": model });
65 }
65 }
qml/Stage/MoveHandler.qml+7−7
@@ -47,13 +47,13 @@ QtObject {
47 property bool moving
47 property bool moving
48
48
49 readonly property int triggerArea: units.gu(8)
49 readonly property int triggerArea: units.gu(8)
50− property bool nearLeftEdge: target.maximizedLeft
50+ property bool nearLeftEdge: target && target.maximizedLeft
51− property bool nearTopEdge: target.maximized
51+ property bool nearTopEdge: target && target.maximized
52− property bool nearRightEdge: target.maximizedRight
52+ property bool nearRightEdge: target && target.maximizedRight
53− property bool nearTopLeftCorner: target.maximizedTopLeft
53+ property bool nearTopLeftCorner: target && target.maximizedTopLeft
54− property bool nearTopRightCorner: target.maximizedTopRight
54+ property bool nearTopRightCorner: target && target.maximizedTopRight
55− property bool nearBottomLeftCorner: target.maximizedBottomLeft
55+ property bool nearBottomLeftCorner: target && target.maximizedBottomLeft
56− property bool nearBottomRightCorner: target.maximizedBottomRight
56+ property bool nearBottomRightCorner: target && target.maximizedBottomRight
57
57
58 property Timer mouseDownTimer: Timer {
58 property Timer mouseDownTimer: Timer {
59 interval: 175
59 interval: 175
qml/Tutorial/TutorialContent.qml+8−8
@@ -77,7 +77,7 @@ Item {
77
77
78 readonly property bool skipped: !d.mobileScenario || d.haveShown("top")
78 readonly property bool skipped: !d.mobileScenario || d.haveShown("top")
79 readonly property bool shown: item && item.shown
79 readonly property bool shown: item && item.shown
80− active: !skipped || (item && item.visible)
80+ active: !skipped
81 onSkippedChanged: if (skipped && shown) item.hide()
81 onSkippedChanged: if (skipped && shown) item.hide()
82
82
83 sourceComponent: TutorialTop {
83 sourceComponent: TutorialTop {
@@ -85,7 +85,7 @@ Item {
85 objectName: "tutorialTop"
85 objectName: "tutorialTop"
86 anchors.fill: parent
86 anchors.fill: parent
87 panel: root.panel
87 panel: root.panel
88− hides: [launcher, panel.indicators]
88+ hides: [root.launcher, panel.indicators]
89 paused: root.paused
89 paused: root.paused
90
90
91 skipped: tutorialTopLoader.skipped
91 skipped: tutorialTopLoader.skipped
@@ -111,7 +111,7 @@ Item {
111
111
112 readonly property bool skipped: !d.mobileScenario || d.haveShown("left")
112 readonly property bool skipped: !d.mobileScenario || d.haveShown("left")
113 readonly property bool shown: item && item.shown
113 readonly property bool shown: item && item.shown
114− active: !skipped || (item && item.visible)
114+ active: !skipped
115 onSkippedChanged: if (skipped && shown) item.hide()
115 onSkippedChanged: if (skipped && shown) item.hide()
116
116
117 sourceComponent: TutorialLeft {
117 sourceComponent: TutorialLeft {
@@ -119,7 +119,7 @@ Item {
119 objectName: "tutorialLeft"
119 objectName: "tutorialLeft"
120 anchors.fill: parent
120 anchors.fill: parent
121 launcher: root.launcher
121 launcher: root.launcher
122− hides: [launcher, panel.indicators]
122+ hides: [launcher, root.panel.indicators]
123 paused: root.paused
123 paused: root.paused
124
124
125 isReady: !tutorialLeftLoader.skipped
125 isReady: !tutorialLeftLoader.skipped
@@ -151,7 +151,7 @@ Item {
151
151
152 readonly property bool skipped: !d.mobileScenario || d.haveShown("left-drawer")
152 readonly property bool skipped: !d.mobileScenario || d.haveShown("left-drawer")
153 readonly property bool shown: item && item.shown
153 readonly property bool shown: item && item.shown
154− active: !skipped || (item && item.visible)
154+ active: !skipped
155 onSkippedChanged: if (skipped && shown) item.hide()
155 onSkippedChanged: if (skipped && shown) item.hide()
156
156
157 sourceComponent: TutorialLeftLong {
157 sourceComponent: TutorialLeftLong {
@@ -159,7 +159,7 @@ Item {
159 objectName: "tutorialLeftLong"
159 objectName: "tutorialLeftLong"
160 anchors.fill: parent
160 anchors.fill: parent
161 launcher: root.launcher
161 launcher: root.launcher
162− hides: [launcher, panel.indicators]
162+ hides: [launcher, root.panel.indicators]
163 paused: root.paused
163 paused: root.paused
164
164
165 skipped: tutorialLeftLongLoader.skipped
165 skipped: tutorialLeftLongLoader.skipped
@@ -189,7 +189,7 @@ Item {
189
189
190 readonly property bool skipped: d.haveShown("right")
190 readonly property bool skipped: d.haveShown("right")
191 readonly property bool shown: item && item.shown
191 readonly property bool shown: item && item.shown
192− active: !skipped || (item && item.visible)
192+ active: !skipped
193 onSkippedChanged: if (skipped && shown) item.hide()
193 onSkippedChanged: if (skipped && shown) item.hide()
194
194
195 sourceComponent: TutorialRight {
195 sourceComponent: TutorialRight {
@@ -198,7 +198,7 @@ Item {
198 anchors.fill: parent
198 anchors.fill: parent
199 stage: root.stage
199 stage: root.stage
200 usageScenario: root.usageScenario
200 usageScenario: root.usageScenario
201− hides: [launcher, panel.indicators]
201+ hides: [root.launcher, panel.indicators]
202 paused: root.paused
202 paused: root.paused
203
203
204 skipped: tutorialRightLoader.skipped
204 skipped: tutorialRightLoader.skipped
qml/Tutorial/TutorialLeft.qml+1−1
@@ -26,7 +26,7 @@ TutorialPage {
26 opacityOverride: 1 - launcher.visibleWidth / launcher.panelWidth
26 opacityOverride: 1 - launcher.visibleWidth / launcher.panelWidth
27
27
28 mouseArea {
28 mouseArea {
29− anchors.leftMargin: launcher.dragAreaWidth
29+ anchors.leftMargin: root.launcher.dragAreaWidth
30 }
30 }
31
31
32 background {
32 background {
qml/Tutorial/TutorialLeftLong.qml+1−1
@@ -28,7 +28,7 @@ TutorialPage {
28 opacityOverride: shown ? 1 - launcher.dragDistance / (launcher.panelWidth * 3) : 1
28 opacityOverride: shown ? 1 - launcher.dragDistance / (launcher.panelWidth * 3) : 1
29
29
30 mouseArea {
30 mouseArea {
31− anchors.leftMargin: launcher.dragAreaWidth
31+ anchors.leftMargin: root.launcher.dragAreaWidth
32 }
32 }
33
33
34 background {
34 background {
qml/Tutorial/TutorialTop.qml+2−2
@@ -28,11 +28,11 @@ TutorialPage {
28 QtObject {
28 QtObject {
29 id: d
29 id: d
30 readonly property bool landscape: root.width > units.gu(50)
30 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
32 }
32 }
33
33
34 mouseArea {
34 mouseArea {
35− anchors.topMargin: panel.indicators.minimizedPanelHeight
35+ anchors.topMargin: root.panel.indicators.minimizedPanelHeight
36 }
36 }
37
37
38 background {
38 background {
qml/Wizard/Pages/30-wifi.qml+4−5
@@ -163,8 +163,8 @@ LocalComponents.Page {
163
163
164 Label {
164 Label {
165 id: label
165 id: label
166− anchors.left: parent.left
166+ Layout.fillWidth: true
167− anchors.right: parent.right
167+ Layout.fillHeight: false
168 anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
168 anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
169 font.weight: Font.Light
169 font.weight: Font.Light
170 color: textColor
170 color: textColor
@@ -176,11 +176,10 @@ LocalComponents.Page {
176 ListView {
176 ListView {
177 id: listview
177 id: listview
178 objectName: "accessPointsListView"
178 objectName: "accessPointsListView"
179− anchors.left: parent.left
179+ Layout.fillWidth: true
180− anchors.right: parent.right
180+ Layout.fillHeight: true
181 clip: true
181 clip: true
182 model: menuModel
182 model: menuModel
183− Layout.fillHeight: true
184
183
185 delegate: Loader {
184 delegate: Loader {
186 readonly property bool isAccessPoint: model.type === "unity.widgets.systemsettings.tablet.accesspoint"
185 readonly property bool isAccessPoint: model.type === "unity.widgets.systemsettings.tablet.accesspoint"
tests/qmltests/Notifications/tst_Notifications.qml+2−1
@@ -264,8 +264,9 @@ Item {
264 id: fakeMouseCB
264 id: fakeMouseCB
265 }
265 }
266 Label {
266 Label {
267+ Layout.fillWidth: true
268+ Layout.fillHeight: true
267 text: "With fake mouse"
269 text: "With fake mouse"
268− anchors.verticalCenter: parent.verticalCenter
269 }
270 }
270 }
271 }
271
272
tests/qmltests/Notifications/tst_SwipeToAct.qml+2−1
@@ -149,7 +149,8 @@ Item {
149 }
149 }
150 Label {
150 Label {
151 text: "With fake mouse"
151 text: "With fake mouse"
152− anchors.verticalCenter: parent.verticalCenter
152+ Layout.fillWidth: true
153+ Layout.fillHeight: true
153 }
154 }
154 }
155 }
155
156
tests/qmltests/Panel/PanelUI.qml+1−1
@@ -117,7 +117,7 @@ PanelTest {
117
117
118 ListItem.ItemSelector {
118 ListItem.ItemSelector {
119 id: modeSelector
119 id: modeSelector
120− anchors { left: parent.left; right: parent.right }
120+ Layout.fillWidth: true
121 activeFocusOnPress: false
121 activeFocusOnPress: false
122 text: "Mode"
122 text: "Mode"
123 model: ["staged", "windowed" ]
123 model: ["staged", "windowed" ]
tests/qmltests/Stage/tst_ApplicationWindow.qml+3−2
@@ -99,8 +99,9 @@ Rectangle {
99 }
99 }
100 }
100 }
101 Label {
101 Label {
102+ Layout.fillWidth: true
103+ Layout.fillHeight: true
102 text: "Surface"
104 text: "Surface"
103− anchors.verticalCenter: parent.verticalCenter
104 }
105 }
105 }
106 }
106
107
@@ -123,8 +124,8 @@ Rectangle {
123
124
124 ListItem.ItemSelector {
125 ListItem.ItemSelector {
125 id: appStateSelector
126 id: appStateSelector
127+ Layout.fillWidth: true
126 activeFocusOnPress: false
128 activeFocusOnPress: false
127− anchors { left: parent.left; right: parent.right }
128 text: "Application state"
129 text: "Application state"
129 model: ["Starting",
130 model: ["Starting",
130 "Running",
131 "Running",
tests/qmltests/Stage/tst_SurfaceContainer.qml+2−1
@@ -125,7 +125,8 @@ Rectangle {
125
125
126 Label {
126 Label {
127 text: "surface"
127 text: "surface"
128− anchors.verticalCenter: parent.verticalCenter
128+ Layout.fillWidth: true
129+ Layout.fillHeight: true
129 }
130 }
130 }
131 }
131
132
tests/qmltests/Stage/tst_WindowResizeArea.qml+2−1
@@ -154,7 +154,8 @@ Item {
154 Label {
154 Label {
155 color: "black"
155 color: "black"
156 text: "Window loader active"
156 text: "Window loader active"
157− anchors.verticalCenter: parent.verticalCenter
157+ Layout.fillWidth: true
158+ Layout.fillHeight: true
158 }
159 }
159 }
160 }
160 Label {
161 Label {
tests/qmltests/tst_OrientedShell.qml+4−2
@@ -289,8 +289,9 @@ Rectangle {
289 activeFocusOnPress: false
289 activeFocusOnPress: false
290 }
290 }
291 Label {
291 Label {
292+ Layout.fillWidth: true
293+ Layout.fillHeight: true
292 text: "Orientation Locked"
294 text: "Orientation Locked"
293− anchors.verticalCenter: parent.verticalCenter
294 }
295 }
295 }
296 }
296 Button {
297 Button {
@@ -350,8 +351,9 @@ Rectangle {
350 }
351 }
351 }
352 }
352 Label {
353 Label {
354+ Layout.fillWidth: true
355+ Layout.fillHeight: true
353 text: "Input Method"
356 text: "Input Method"
354− anchors.verticalCenter: parent.verticalCenter
355 }
357 }
356 }
358 }
357 Button {
359 Button {