on xenial help sign in
Make sure the spinner does not get too close to the title text (LP: #1597392)

Approved by: Lukáš Tinkl

commit3a01ab66747f5b0da48ed73a519d7a5843d1ae49 authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 13 Sep 2016, 06:50 (10 years ago) parent3a6fe628383b1d
3 files changed+19−8
qml/Stages/Splash.qml+3−6 tests/mocks/Unity/Application/ApplicationInfo.cpp+1−1 tests/qmltests/Stages/tst_Splash.qml+15−1
qml/Stages/Splash.qml+3−6
@@ -119,6 +119,7 @@ Item {
119119 }
120120
121121 Label {
122+ id: titleLabel
122123 text: root.title
123124 anchors.horizontalCenter: parent.horizontalCenter
124125 anchors.top: iconShape.bottom
@@ -137,12 +138,8 @@ Item {
137138
138139 ActivityIndicator {
139140 id: spinner
140− anchors.centerIn: header.visible ? parent : undefined
141− anchors.verticalCenterOffset: header.visible ? header.height / 2 : 0
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)
141+ anchors.centerIn: parent
142+ anchors.verticalCenterOffset: header.visible ? header.height / 2 : Math.max(titleLabel.y / 2, units.gu(8))
146143 }
147144
148145 MouseArea {
tests/mocks/Unity/Application/ApplicationInfo.cpp+1−1
@@ -138,7 +138,7 @@ void ApplicationInfo::createSurface()
138138
139139void ApplicationInfo::setIconId(const QString &iconId)
140140{
141− setIcon(QString("../../tests/graphics/applicationIcons/%2@18.png")
141+ setIcon(QString("../../graphics/applicationIcons/%2@18.png")
142142 .arg(iconId));
143143}
144144
tests/qmltests/Stages/tst_Splash.qml+15−1
@@ -55,7 +55,7 @@ Rectangle {
5555 bottom: parent.bottom
5656 left: parent.left
5757 }
58− width: units.gu(40)
58+ width: landscapeCheckbox.checked ? units.gu(70) : units.gu(40)
5959 sourceComponent: splashComponent
6060 }
6161
@@ -97,6 +97,20 @@ Rectangle {
9797 CheckBox {id: footerColorCheckbox; checked: false; }
9898 Label { text: "custom footerColor"; anchors.verticalCenter: parent.verticalCenter }
9999 }
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+ }
100114 }
101115 }
102116