This commit is contained in:
Valeria Fadeeva 2023-05-03 00:21:45 +05:00
parent 9fb7224e89
commit 5d5731cbb8
5 changed files with 258 additions and 140 deletions

View File

@ -24,9 +24,9 @@ Image {
id: root id: root
source: "images/background.jpg" source: "images/background.jpg"
fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop
property int stage property int stage
onStageChanged: { onStageChanged: {
if (stage == 1) { if (stage == 1) {
introAnimation.running = true introAnimation.running = true
@ -34,12 +34,21 @@ Image {
preOpacityAnimation.to = 1; preOpacityAnimation.to = 1;
preOpacityAnimation.running = true; preOpacityAnimation.running = true;
} }
if (stage == 4) { else if (stage == 2) {
introAnimation.running = true;
}
else if (stage == 4) {
preOpacityAnimation.from = 1; preOpacityAnimation.from = 1;
preOpacityAnimation.to = 0; preOpacityAnimation.to = 0;
preOpacityAnimation.running = true; preOpacityAnimation.running = true;
pausa.start(); pausa.start();
} }
else if (stage == 5) {
introAnimation.target = busyIndicator;
introAnimation.from = 1;
introAnimation.to = 0;
introAnimation.running = true;
}
} }
Item { Item {
@ -49,7 +58,7 @@ Image {
anchors.leftMargin: 0 anchors.leftMargin: 0
anchors.topMargin: 0 anchors.topMargin: 0
anchors.fill: parent anchors.fill: parent
opacity: 1 opacity: 0.85
TextMetrics { TextMetrics {
id: units id: units
text: "M" text: "M"
@ -62,28 +71,58 @@ Image {
id: logo id: logo
property real size: units.gridUnit * 12 property real size: units.gridUnit * 12
anchors.centerIn: parent anchors.centerIn: parent
source: "images/Manjaro logo.png" source: ""
sourceSize.width: size sourceSize.width: size
sourceSize.height: size sourceSize.height: size
} }
}
Text { Row {
id: date spacing: units.smallSpacing*2
text:Qt.formatDateTime(new Date(),"") anchors {
font.pointSize: 26 bottom: parent.bottom
color: "#020304" right: parent.right
opacity:0.85 rightMargin: units.gridUnit * 15
font { family: "OpenSans Light"; weight: Font.Light ;capitalization: Font.Capitalize} bottomMargin: units.gridUnit * 13
anchors.horizontalCenter: parent.horizontalCenter margins: units.gridUnit
y: (parent.height - height) / 2.7 }
Text {
id: date1
text:Qt.formatDateTime(new Date(),"dddd, hh:mm")
font.pointSize: 32
color: "#e92222"
opacity:0.85
font { family: "NotoSans"; weight: Font.Medium ;capitalization: Font.Capitalize}
anchors.horizontalCenter: parent.horizontalCenter
y: (parent.height - height) / 1.2
}
}
Row {
spacing: units.smallSpacing*2
anchors {
bottom: parent.bottom
right: parent.right
rightMargin: units.gridUnit * 15
bottomMargin: units.gridUnit * 10
margins: units.gridUnit
}
Text {
id: date2
text:Qt.formatDateTime(new Date(),"yyyy.MM.dd")
font.pointSize: 32
color: "#e92222"
opacity:0.85
font { family: "NotoSans"; weight: Font.Medium ;capitalization: Font.Capitalize}
anchors.horizontalCenter: parent.horizontalCenter
y: (parent.height - height) / 1.1
}
} }
Image { Image {
id: busyIndicator1 id: busyIndicator1
//in the middle of the remaining space //in the middle of the remaining space
//y: (parent.height - height) / 1.7 //y: (parent.height - height) / 1.7
y: root.height - (root.height - logo.y) / 2.8 - height/2 y: root.height - (root.height - logo.y) / 1.1 - height/2
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
source: "images/start.svg" source: "images/start.svg"
opacity: 0.9 opacity: 0.9
@ -98,69 +137,86 @@ Image {
} }
} }
Image { Row {
id: topRect spacing: units.smallSpacing*2
anchors.horizontalCenter: parent.horizontalCenter anchors {
y: root.height
source: "images/rectangle.svg"
Rectangle {
radius: 3
color: "#1d212f"
height: 6
width: height*40
anchors
{
bottom: parent.bottom bottom: parent.bottom
bottomMargin:0 right: parent.right
horizontalCenter: parent.horizontalCenter rightMargin: units.gridUnit * 1.5
margins: units.gridUnit
} }
Image {
source: "images/Melawy_Linux_640x640.png"
sourceSize.height: units.gridUnit * 8
sourceSize.width: units.gridUnit * 8
}
}
Rectangle Image {
{ id: topRect
anchors.horizontalCenter: parent.horizontalCenter
y: root.height
source: "images/rectangle.svg"
Rectangle {
radius: 3 radius: 3
color: "#FFFFFF" color: "#1d212f"
width: (parent.width / 6) * (stage - 0.00) height: 6
width: height*52
anchors anchors
{ {
left: parent.left
top: parent.top
bottom: parent.bottom bottom: parent.bottom
bottomMargin:0
horizontalCenter: parent.horizontalCenter
} }
Behavior on width {
PropertyAnimation { Rectangle
duration: 200 {
easing.type: Easing.InOutQuad radius: 3
color: "#FFFFFF"
width: (parent.width / 6) * (stage - 0.00)
anchors
{
left: parent.left
top: parent.top
bottom: parent.bottom
}
Behavior on width {
PropertyAnimation {
duration: 200
easing.type: Easing.InOutQuad
}
} }
} }
} }
} }
}
SequentialAnimation { SequentialAnimation {
id: introAnimation id: introAnimation
running: false running: false
ParallelAnimation {
PropertyAnimation {
property: "y"
target: topRect
to: ((root.height / 3) * 2) - 170
duration: 1500
easing.type: Easing.InOutBack
easing.overshoot: 1.0
}
ParallelAnimation {
PropertyAnimation {
property: "y"
target: topRect
to: ((root.height / 3) * 2) - 170
duration: 1500
easing.type: Easing.InOutBack
easing.overshoot: 1.0
} }
} }
}
Text { Text {
visible: true visible: true
height: 1550 height: 1470
width: 1920 width: 1920
Text { Text {
id: text id: text
font.pointSize: 64 font.pointSize: 64
x: (root.width - width) / 2
y: (root.height / 3) * 2
anchors.centerIn: parent anchors.centerIn: parent
text: "Welcome!" text: "Welcome!"
visible: true visible: true
@ -168,55 +224,43 @@ Image {
} }
// LinearGradient { // LinearGradient {
// anchors.fill: text // anchors.fill: text
// source: text // source: text
// gradient: Gradient { // gradient: Gradient {
// GradientStop { position: 0; color: "#e1c5de" } // GradientStop { position: 0; color: "#4e70ac" }
// GradientStop { position: 0.4; color: "#d5b9d0" } // GradientStop { position: 0.4; color: "#4e70ac" }
// GradientStop { position: 0.6; color: "#ccaec8" } // GradientStop { position: 0.6; color: "#bac8df" }
// GradientStop { position: 1; color: "#c5abc4" } // GradientStop { position: 1; color: "#bac8df" }
// } // }
// } // }
}
// OR OpacityAnimator {
id: preOpacityAnimation
running: false
target: preLoadingText
from: 0
to: 1
duration: 2000
easing.type: Easing.InOutQuad
}
// LinearGradient { Text {
// anchors.fill: text id: loadingText
// source: text height: 30
// gradient: Gradient { anchors.bottomMargin: 0
// GradientStop { position: 0; color: "#E03D3D" } anchors.topMargin: 0
// GradientStop { position: 0.4; color: "#E03D3D" } text: ""
// GradientStop { position: 0.6; color: "#E03D3D" } color: "#FFFFFF"
// GradientStop { position: 1; color: "#A03d40" } font.family: webFont.name
// } font.weight: Font.ExtraLight
// }
}
OpacityAnimator { font.pointSize: 20
id: preOpacityAnimation opacity: 0
running: false textFormat: Text.StyledText
target: preLoadingText x: (root.width - width) / 2
from: 0 y: (root.height / 3) * 2
to: 1 }
duration: 2000
easing.type: Easing.InOutQuad
}
Text {
id: loadingText
height: 30
anchors.bottomMargin: 0
anchors.topMargin: 0
text: ""
color: "#FFFFFF"
font.family: webFont.name
font.weight: Font.ExtraLight
font.pointSize: 20
opacity: 0
textFormat: Text.StyledText
x: (root.width - width) / 2
y: (root.height / 3) * 2
} }
OpacityAnimator { OpacityAnimator {

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,39 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" id="svg2" width="460" height="290" version="1.1" viewBox="0 0 460 290"/>
<svg
id="svg2"
width="460"
height="290"
version="1.1"
viewBox="0 0 460 290"
sodipodi:docname="rectangle.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs5" />
<sodipodi:namedview
id="namedview3"
pagecolor="#000000"
bordercolor="#ff1848"
borderopacity="1"
inkscape:showpageshadow="false"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#000000"
showgrid="true"
inkscape:zoom="0.8137931"
inkscape:cx="186.16525"
inkscape:cy="145.61441"
inkscape:window-width="1920"
inkscape:window-height="1004"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2">
<inkscape:grid
type="xygrid"
id="grid180" />
</sodipodi:namedview>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 113 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB