on xenial help sign in
Add landscape checkbox
commit8383b1d5066cf40a910c5e71b140e6c5687b3c1d authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 23 Aug 2016, 11:06 (10 years ago) parent85b157d
1 file changed+15−1
tests/qmltests/Stages/tst_Splash.qml+15−1
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