on xenial help sign in
Make sure the spinner does not get too close to the title text (LP: #1597392)
b3b1cb7Albert Astals Cid
qml/Stages/Splash.qml+3−6
@@ -119,6 +119,7 @@ Item {
119 }
119 }
120
120
121 Label {
121 Label {
122+ id: titleLabel
122 text: root.title
123 text: root.title
123 anchors.horizontalCenter: parent.horizontalCenter
124 anchors.horizontalCenter: parent.horizontalCenter
124 anchors.top: iconShape.bottom
125 anchors.top: iconShape.bottom
@@ -137,12 +138,8 @@ Item {
137
138
138 ActivityIndicator {
139 ActivityIndicator {
139 id: spinner
140 id: spinner
140− anchors.centerIn: header.visible ? parent : undefined
141+ anchors.centerIn: parent
141− anchors.verticalCenterOffset: header.visible ? header.height / 2 : 0
142+ anchors.verticalCenterOffset: header.visible ? header.height / 2 : Math.max(titleLabel.y / 2, units.gu(8))
142−
143− anchors.horizontalCenter: header.visible ? undefined : parent.horizontalCenter
144− anchors.bottom: header.visible ? undefined : parent.bottom
145− anchors.bottomMargin: header.visible ? 0 : units.gu(12)
146 }
143 }
147
144
148 MouseArea {
145 MouseArea {
tests/mocks/Unity/Application/ApplicationInfo.cpp+1−1
@@ -138,7 +138,7 @@ void ApplicationInfo::createSurface()
138
138
139void ApplicationInfo::setIconId(const QString &iconId)
139void ApplicationInfo::setIconId(const QString &iconId)
140{
140{
141− setIcon(QString("../../tests/graphics/applicationIcons/%2@18.png")
141+ setIcon(QString("../../graphics/applicationIcons/%2@18.png")
142 .arg(iconId));
142 .arg(iconId));
143}
143}
144
144
tests/qmltests/Stages/tst_Splash.qml+15−1
@@ -55,7 +55,7 @@ Rectangle {
55 bottom: parent.bottom
55 bottom: parent.bottom
56 left: parent.left
56 left: parent.left
57 }
57 }
58− width: units.gu(40)
58+ width: landscapeCheckbox.checked ? units.gu(70) : units.gu(40)
59 sourceComponent: splashComponent
59 sourceComponent: splashComponent
60 }
60 }
61
61
@@ -97,6 +97,20 @@ Rectangle {
97 CheckBox {id: footerColorCheckbox; checked: false; }
97 CheckBox {id: footerColorCheckbox; checked: false; }
98 Label { text: "custom footerColor"; anchors.verticalCenter: parent.verticalCenter }
98 Label { text: "custom footerColor"; anchors.verticalCenter: parent.verticalCenter }
99 }
99 }
100+ Row {
101+ anchors { left: parent.left; right: parent.right }
102+ CheckBox {
103+ id: landscapeCheckbox
104+ checked: false
105+ onCheckedChanged: {
106+ if (checked) {
107+ window.width = Math.max(window.width, units.gu(110));
108+ }
109+ window.height = checked ? units.gu(40) : units.gu(70);
110+ }
111+ }
112+ Label { text: "Landscape"; anchors.verticalCenter: parent.verticalCenter }
113+ }
100 }
114 }
101 }
115 }
102
116