From d22769c728ff5b705acdc87c8c8ed20602ad48e3 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 9 Sep 2014 14:57:31 +0200 Subject: Beautify the qquickviewcomparison example Remove the red rectangle. Change the background color to a gradient. (taken from rendercontrol) Disable the transparency checkbox everywhere but Linux since it usually will not work. (too much hassle with platform specifics like frameless windows, etc.) Change-Id: I21488386cddc5841a2bdc8104e7abb197b075b0d Reviewed-by: Paul Olav Tvete --- .../quickwidgets/qquickviewcomparison/test.qml | 25 +++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'examples/quick/quickwidgets/qquickviewcomparison/test.qml') diff --git a/examples/quick/quickwidgets/qquickviewcomparison/test.qml b/examples/quick/quickwidgets/qquickviewcomparison/test.qml index 5e11c3bda9..9dc356558d 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/test.qml +++ b/examples/quick/quickwidgets/qquickviewcomparison/test.qml @@ -46,6 +46,23 @@ Rectangle { id: root property alias currentText: edit.text property alias multisample: fbitem.multisample + property bool translucency: false + + gradient: Gradient { + id: grad + GradientStop { position: 0; color: "steelblue" } + GradientStop { position: 1; color: "black" } + } + + onTranslucencyChanged: { + if (translucency) { + root.color = "transparent"; + root.gradient = null; + } else { + root.color = "white"; + root.gradient = grad; + } + } ParticleSystem { anchors.fill: parent @@ -91,14 +108,6 @@ Rectangle { } } - Rectangle { - width: 300 - height: 300 - anchors.centerIn: parent - color: "red" - NumberAnimation on rotation { from: 0; to: 360; duration: 20000; loops: Animation.Infinite; } - } - FbItem { id: fbitem anchors.fill: parent -- cgit v1.2.1