summaryrefslogtreecommitdiffstats
path: root/components/WallpaperFader.qml
diff options
context:
space:
mode:
Diffstat (limited to 'components/WallpaperFader.qml')
-rw-r--r--components/WallpaperFader.qml72
1 files changed, 25 insertions, 47 deletions
diff --git a/components/WallpaperFader.qml b/components/WallpaperFader.qml
index c695d69..5c885d1 100644
--- a/components/WallpaperFader.qml
+++ b/components/WallpaperFader.qml
@@ -1,21 +1,8 @@
-/********************************************************************
- This file is part of the KDE project.
+/*
+ SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
-Copyright (C) 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*********************************************************************/
+ SPDX-License-Identifier: GPL-2.0-or-later
+*/
import QtQuick 2.6
import QtQuick.Controls 1.1
@@ -23,7 +10,6 @@ import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import org.kde.plasma.core 2.0 as PlasmaCore
-import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.private.sessions 2.0
import "../components"
@@ -44,14 +30,14 @@ Item {
NumberAnimation {
target: wallpaperFader
property: "factor"
- duration: 1000
+ duration: PlasmaCore.Units.veryLongDuration * 2
easing.type: Easing.InOutQuad
}
}
FastBlur {
id: wallpaperBlur
anchors.fill: parent
- radius: -100 * wallpaperFader.factor
+ radius: 50 * wallpaperFader.factor
}
ShaderEffect {
id: wallpaperShader
@@ -121,6 +107,10 @@ Item {
target: clock.shadow
opacity: 0
}
+ PropertyChanges {
+ target: clock
+ opacity: 1
+ }
},
State {
name: "off"
@@ -138,7 +128,11 @@ Item {
}
PropertyChanges {
target: clock.shadow
- opacity: 1
+ opacity: wallpaperFader.alwaysShowClock ? 1 : 0
+ }
+ PropertyChanges {
+ target: clock
+ opacity: wallpaperFader.alwaysShowClock ? 1 : 0
}
}
]
@@ -147,37 +141,21 @@ Item {
from: "off"
to: "on"
//Note: can't use animators as they don't play well with parallelanimations
- ParallelAnimation {
- NumberAnimation {
- target: mainStack
- property: "opacity"
- duration: units.longDuration
- easing.type: Easing.InOutQuad
- }
- NumberAnimation {
- target: footer
- property: "opacity"
- duration: units.longDuration
- easing.type: Easing.InOutQuad
- }
+ NumberAnimation {
+ targets: [mainStack, footer, clock]
+ property: "opacity"
+ duration: PlasmaCore.Units.veryLongDuration
+ easing.type: Easing.InOutQuad
}
},
Transition {
from: "on"
to: "off"
- ParallelAnimation {
- NumberAnimation {
- target: mainStack
- property: "opacity"
- duration: 500
- easing.type: Easing.InOutQuad
- }
- NumberAnimation {
- target: footer
- property: "opacity"
- duration: 500
- easing.type: Easing.InOutQuad
- }
+ NumberAnimation {
+ targets: [mainStack, footer, clock]
+ property: "opacity"
+ duration: PlasmaCore.Units.veryLongDuration
+ easing.type: Easing.InOutQuad
}
}
]