From 236f693bb94816bc08e307b812684edadc328d26 Mon Sep 17 00:00:00 2001 From: eximus Date: Sat, 10 Nov 2018 14:59:57 +0000 Subject: [PATCH] fully working blur --- Main.qml | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/Main.qml b/Main.qml index 24b4b5a..ee16ea6 100644 --- a/Main.qml +++ b/Main.qml @@ -67,16 +67,25 @@ Rectangle { id: mouseArea1 anchors.fill: parent; //onPressed: {playlist1.shuffle(); playlist1.next();} - onPressed: { fader.state = fader.state == "off" ? "on" : "off" ; } + onPressed: { fader1.state = fader1.state == "off" ? "on" : "off" ; } } Keys.onPressed: { - fader.state = "on"; + fader1.state = "on"; if (username_input_box.text == "") username_input_box.focus = true else password_input_box.focus = true } } + WallpaperFader { + id: fader1 + visible: true + anchors.fill: parent + state: "off" + source: video1 + mainStack: login_container + footer: login_container + } // Set Background Video2 MediaPlayer { @@ -97,12 +106,29 @@ Rectangle { id: mouseArea2 enabled: false anchors.fill: parent; - onPressed: {playlist2.shuffle(); playlist2.next();} + onPressed: { fader2.state = fader2.state == "off" ? "on" : "off" ; } } Behavior on opacity { enabled: true NumberAnimation { easing.type: Easing.InOutQuad; duration: 3000 } } + Keys.onPressed: { + fader2.state = "on"; + if (username_input_box.text == "") + username_input_box.focus = true + else + password_input_box.focus = true + } + } + + WallpaperFader { + id: fader2 + visible: true + anchors.fill: parent + state: "off" + source: video2 + mainStack: login_container + footer: login_container } property MediaPlayer currentPlayer: mediaplayer1 @@ -146,15 +172,6 @@ Rectangle { mediaplayer2.stop() } } - WallpaperFader { - id: fader - visible: true - anchors.fill: parent - state: "off" - source: video1 - mainStack: login_container - footer: login_container - }