You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
110 lines
2.9 KiB
110 lines
2.9 KiB
/* |
|
* Copyright 2014 Marco Martin <mart@kde.org> |
|
* |
|
* This program is free software; you can redistribute it and/or modify |
|
* it under the terms of the GNU General Public License version 2, |
|
* or (at your option) any later version, as published by the Free |
|
* Software Foundation |
|
* |
|
* 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, write to the |
|
* Free Software Foundation, Inc., |
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
*/ |
|
|
|
import QtQuick 2.1 |
|
|
|
|
|
Image { |
|
id: root |
|
source: "images/background.png" |
|
|
|
property int stage |
|
|
|
onStageChanged: { |
|
if (stage == 1) { |
|
introAnimation.running = true |
|
} |
|
} |
|
|
|
Rectangle { |
|
id: topRect |
|
width: parent.width |
|
height: (root.height / 3) - bottomRect.height - 2 |
|
y: root.height |
|
color: "black" |
|
opacity: 0.3 |
|
Image { |
|
source: "images/kde.svgz" |
|
anchors.centerIn: parent |
|
} |
|
} |
|
|
|
Rectangle { |
|
id: bottomRect |
|
width: parent.width |
|
y: -height |
|
height: 50 |
|
color: "black" |
|
opacity: 0.3 |
|
|
|
Rectangle { |
|
radius: 5 |
|
border.color: "white" |
|
color: "transparent" |
|
anchors { |
|
horizontalCenter: parent.horizontalCenter |
|
top: parent.top |
|
bottom: parent.bottom |
|
margins: 12 |
|
} |
|
width: height * 10 |
|
Rectangle { |
|
radius: 3 |
|
anchors { |
|
left: parent.left |
|
top: parent.top |
|
bottom: parent.bottom |
|
margins: 2 |
|
} |
|
width: ((parent.width - 4) / 5) * (stage - 1) |
|
Behavior on width { |
|
PropertyAnimation { |
|
duration: 250 |
|
easing.type: Easing.InOutQuad |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
SequentialAnimation { |
|
id: introAnimation |
|
running: false |
|
|
|
ParallelAnimation { |
|
PropertyAnimation { |
|
property: "y" |
|
target: topRect |
|
to: root.height / 3 |
|
duration: 1000 |
|
easing.type: Easing.InOutBack |
|
easing.overshoot: 1.0 |
|
} |
|
|
|
PropertyAnimation { |
|
property: "y" |
|
target: bottomRect |
|
to: 2 * (root.height / 3) - bottomRect.height |
|
duration: 1000 |
|
easing.type: Easing.InOutBack |
|
easing.overshoot: 1.0 |
|
} |
|
} |
|
} |
|
}
|
|
|