on xenial help sign in
Add landscape checkbox
8383b1dAlbert Astals Cid
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