Update
This commit is contained in:
		
							parent
							
								
									6734277a22
								
							
						
					
					
						commit
						9c5b23436e
					
				|  | @ -1,36 +1,61 @@ | |||
| /* | ||||
|  *   Copyright 2014 Marco Martin <mart@kde.org> | ||||
|  *   Copyright 2023 Valeria Fadeeva <valeria@fadeeva.me> | ||||
|  * | ||||
|  *   This program is free software; you can redistribute it and/or modify | ||||
|  *   it under the terms of the GNU General Public License version 2, | ||||
|  *   it under the terms of the GNU Affero General Public License version 3, | ||||
|  *   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 | ||||
|  *   GNU Affero General Public License for more details | ||||
|  * | ||||
|  *   You should have received a copy of the GNU General Public | ||||
|  *   You should have received a copy of the GNU Affero 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.5 | ||||
| import QtQuick 2.11 | ||||
| import QtQuick.Layouts 1.11 | ||||
| import QtQuick.Controls 2.4 | ||||
| import QtGraphicalEffects 1.0 | ||||
| 
 | ||||
| Image { | ||||
| Pane { | ||||
|     id: root | ||||
|     source: "images/background.jpg" | ||||
|     fillMode: Image.PreserveAspectCrop | ||||
|      | ||||
| 
 | ||||
|     height: Screen.height | ||||
|     width: Screen.ScreenWidth | ||||
| 
 | ||||
|     LayoutMirroring.enabled: false | ||||
|     LayoutMirroring.childrenInherit: true | ||||
| 
 | ||||
|     padding: 0 | ||||
|     palette.button: "transparent" | ||||
|     palette.highlight: "#E03D3D" | ||||
|     palette.text: "#A03d40" | ||||
|     palette.buttonText: "#A03d40" | ||||
|     palette.window: "#EEEEEE" | ||||
| 
 | ||||
|     font.family: "Noto Sans" | ||||
|     font.pointSize: parseInt(height / 80) | ||||
|     focus: true | ||||
| 
 | ||||
|     TextMetrics { | ||||
|         id: units | ||||
|         text: "M" | ||||
|         property int gridUnit: boundingRect.height | ||||
|         property int largeSpacing: units.gridUnit | ||||
|         property int smallSpacing: Math.max(2, gridUnit/4) | ||||
|     } | ||||
| 
 | ||||
|     property int stage | ||||
| 
 | ||||
|     onStageChanged: { | ||||
|         if (stage == 2) { | ||||
|         if (stage == 1) { | ||||
|             inOpacityAnimationContent.running = true; | ||||
|             inOpacityAnimationBusyIndicator.running = true; | ||||
|             lineAnimation.running = true; | ||||
|         } | ||||
| 
 | ||||
|         else if (stage == 2) { | ||||
|  | @ -39,16 +64,87 @@ Image { | |||
| 
 | ||||
|         else if (stage == 3) { | ||||
|             lineAnimation.running = true; | ||||
|             // timerOpacityAnimationLoadingText.start(); | ||||
|         } | ||||
| 
 | ||||
|         else if (stage == 4) { | ||||
|             lineAnimation.running = true; | ||||
|             outOpacityAnimationForm.running = true; | ||||
|             outOpacityAnimationContent.running = true; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     Item { | ||||
|         id: sizeHelper | ||||
| 
 | ||||
|         anchors.fill: parent | ||||
|         height: parent.height | ||||
|         width: parent.width | ||||
| 
 | ||||
|         Rectangle { | ||||
|             id: tintLayer | ||||
| 
 | ||||
|             anchors.fill: parent | ||||
|             width: parent.width | ||||
|             height: parent.height | ||||
|             color: "#000000" | ||||
|             opacity: 0.0 | ||||
|             z: 1 | ||||
|         } | ||||
| 
 | ||||
|         else if (stage == 5) { | ||||
|             outOpacityAnimationBusyIndicator.running = true; | ||||
|             outOpacityAnimationContent.running = true; | ||||
|         Rectangle { | ||||
|             id: form | ||||
| 
 | ||||
|             height: parent.height | ||||
|             width: parent.width / 2.5 | ||||
|             anchors.horizontalCenter: undefined | ||||
|             anchors.left: parent.left | ||||
|             anchors.right: undefined | ||||
|             opacity: 0.0 | ||||
|             z: 1 | ||||
|         } | ||||
| 
 | ||||
|         Image { | ||||
|             id: backgroundImage | ||||
| 
 | ||||
|             height: parent.height | ||||
|             width: parent.width | ||||
|             anchors.left: parent.left | ||||
|             anchors.right: parent.right | ||||
| 
 | ||||
|             horizontalAlignment: Image.AlignHCenter | ||||
|             verticalAlignment: Image.AlignVCenter | ||||
| 
 | ||||
|             source: "images/background.jpg" | ||||
|             fillMode: Image.PreserveAspectCrop | ||||
|             //fillMode: Image.PreserveAspectFit | ||||
|             asynchronous: true | ||||
|             cache: true | ||||
|             clip: true | ||||
|             mipmap: true | ||||
|         } | ||||
| 
 | ||||
|         ShaderEffectSource { | ||||
|             id: blurMask | ||||
| 
 | ||||
|             sourceItem: backgroundImage | ||||
|             width: form.width | ||||
|             height: parent.height | ||||
|             anchors.centerIn: form | ||||
|             sourceRect: Qt.rect(x,y,width,height) | ||||
|             visible: true | ||||
|         } | ||||
| 
 | ||||
|         GaussianBlur { | ||||
|             id: blur | ||||
| 
 | ||||
|             height: parent.height | ||||
|             width: form.width | ||||
|             source: blurMask | ||||
|             radius: 100 | ||||
|             samples: 201 | ||||
|             cached: true | ||||
|             anchors.centerIn: form | ||||
|             visible: true | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  | @ -58,124 +154,59 @@ Image { | |||
|         anchors.bottomMargin: 0 | ||||
|         anchors.leftMargin: 0 | ||||
|         anchors.topMargin: 0 | ||||
|         anchors.fill: parent | ||||
|         anchors.fill: form | ||||
|         opacity: 0 | ||||
|         TextMetrics { | ||||
|             id: units | ||||
|             text: "M" | ||||
|             property int gridUnit: boundingRect.height | ||||
|             property int largeSpacing: units.gridUnit | ||||
|             property int smallSpacing: Math.max(2, gridUnit/4) | ||||
| 
 | ||||
|         Text { | ||||
|         visible: true | ||||
|         height: 1470 | ||||
|         width: 1920 | ||||
|             Text { | ||||
|                 id: text | ||||
|                 font.pointSize: 64 | ||||
|                 x: (form.width - width) / 2 | ||||
|                 y: (form.height / 3) * 2 | ||||
|                 anchors.centerIn: form | ||||
|                 text: "Welcome!" | ||||
|                 visible: true | ||||
|                 color: "#e92222" | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         Image { | ||||
|             id: logo | ||||
|             property real size: units.gridUnit * 12 | ||||
|             anchors.centerIn: parent | ||||
|             source: "" | ||||
|             property real size: units.gridUnit * 15 | ||||
|             anchors.centerIn: form | ||||
|             source: "images/Melawy_Linux_640x640.svg" | ||||
|             sourceSize.width: size | ||||
|             sourceSize.height: size | ||||
|         } | ||||
|          | ||||
|         Row { | ||||
|             spacing: units.smallSpacing*2 | ||||
|             anchors { | ||||
|                 bottom: parent.bottom | ||||
|                 right: parent.right | ||||
|                 rightMargin: units.gridUnit * 15 | ||||
|                 bottomMargin: units.gridUnit * 13 | ||||
|                 margins: units.gridUnit | ||||
|             } | ||||
|             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 { | ||||
|             id: busyIndicator | ||||
|             //in the middle of the remaining space | ||||
|             //y: (parent.height - height) / 1.7 | ||||
|             y: root.height - (root.height - logo.y) / 1.1 - height/2 | ||||
|             anchors.horizontalCenter: parent.horizontalCenter | ||||
|             source: "images/start.svg" | ||||
|             opacity: 0 | ||||
|             sourceSize.height: units.gridUnit * 15.0 | ||||
|             sourceSize.width: units.gridUnit * 15.0 | ||||
|             RotationAnimator on rotation { | ||||
|                 id: rotationAnimator1 | ||||
|                 from: 0 | ||||
|                 to: 0 | ||||
|                 duration: 1100 | ||||
|                 loops: Animation.Infinite | ||||
|             } | ||||
|         } | ||||
|          | ||||
|         Row { | ||||
|             spacing: units.smallSpacing*2 | ||||
|             anchors { | ||||
|                 bottom: parent.bottom | ||||
|                 right: parent.right | ||||
|                 rightMargin: units.gridUnit * 1.5 | ||||
|                 margins: units.gridUnit | ||||
|             } | ||||
|             Image { | ||||
|                 source: "images/Melawy_Linux_640x640.svg" | ||||
|                 sourceSize.height: units.gridUnit * 8 | ||||
|                 sourceSize.width: units.gridUnit * 8 | ||||
|             } | ||||
|             x: (form.width - width) / 2 | ||||
|             y: (form.height / 3) * 2.2 | ||||
|         } | ||||
| 
 | ||||
|         Image { | ||||
|             id: topRect | ||||
|             anchors.horizontalCenter: parent.horizontalCenter | ||||
|             y: root.height | ||||
|             anchors.left: form.left | ||||
|             y: form.height | ||||
|             source: "images/rectangle.svg" | ||||
| 
 | ||||
|             Rectangle { | ||||
|                 radius: 3 | ||||
|                 color: "#1d212f" | ||||
|                 height: 6 | ||||
|                 width: height*52 | ||||
|                 width: form.width | ||||
|                 anchors | ||||
|                 { | ||||
|                     bottom: parent.bottom | ||||
|                     bottomMargin:0 | ||||
|                     horizontalCenter: parent.horizontalCenter | ||||
|                     left: parent.left | ||||
|                 } | ||||
| 
 | ||||
|                 Rectangle | ||||
|                 { | ||||
|                     radius: 3 | ||||
|                     color: "#FFFFFF" | ||||
|                     width: (parent.width / 6) * (stage - 0.00) | ||||
|                     width: (form.width / 6) * (stage - 0.00) | ||||
|                     anchors | ||||
|                     { | ||||
|                         left: parent.left | ||||
|  | @ -200,7 +231,7 @@ Image { | |||
|                 PropertyAnimation { | ||||
|                     property: "y" | ||||
|                     target: topRect | ||||
|                     to: ((root.height / 3) * 2) - 170 | ||||
|                     to: (form.height / 3) * 2 | ||||
|                     duration: 1500 | ||||
|                     easing.type: Easing.InOutBack | ||||
|                     easing.overshoot: 1.0 | ||||
|  | @ -208,100 +239,45 @@ Image { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         Text { | ||||
|         visible: true | ||||
|         height: 1470 | ||||
|         width: 1920 | ||||
|             Text { | ||||
|                 id: text | ||||
|                 font.pointSize: 64 | ||||
|                 x: (root.width - width) / 2 | ||||
|                 y: (root.height / 3) * 2 | ||||
|                 anchors.centerIn: parent | ||||
|                 text: "Welcome!" | ||||
|                 visible: true | ||||
|                 color: "#e92222" | ||||
|             } | ||||
|         OpacityAnimator { | ||||
|             id: inOpacityAnimationContent | ||||
|             running: false | ||||
|             target: content | ||||
|             from: 0 | ||||
|             to: 1 | ||||
|             duration: 1000 | ||||
|             easing.type: Easing.InOutQuad | ||||
|         } | ||||
| 
 | ||||
|         Text { | ||||
|             id: loadingText | ||||
|             height: 40 | ||||
|             anchors.bottomMargin: 0 | ||||
|             anchors.topMargin: 0 | ||||
|             text: "Made with Love" | ||||
|             color: "#FFFFFF" | ||||
|             font.family: webFont.name | ||||
|             font.weight: Font.ExtraLight | ||||
| 
 | ||||
|             font.pointSize: 32 | ||||
|             opacity: 0 | ||||
|             textFormat: Text.StyledText | ||||
|             x: (root.width - width) / 2 | ||||
|             y: (root.height / 3) * 2 | ||||
|         OpacityAnimator { | ||||
|             id: outOpacityAnimationContent | ||||
|             running: false | ||||
|             target: content | ||||
|             from: 1 | ||||
|             to: 0 | ||||
|             duration: 5000 | ||||
|             easing.type: Easing.InOutQuad | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     OpacityAnimator { | ||||
|         id: inOpacityAnimationBusyIndicator | ||||
|         running: false | ||||
|         target: busyIndicator | ||||
|         from: 0 | ||||
|         to: 1 | ||||
|         duration: 1000 | ||||
|         easing.type: Easing.InOutQuad | ||||
|     } | ||||
|         OpacityAnimator { | ||||
|             id: inOpacityAnimationForm | ||||
|             running: false | ||||
|             target: blur | ||||
|             from: 0 | ||||
|             to: 1 | ||||
|             duration: 1000 | ||||
|             easing.type: Easing.InOutQuad | ||||
|         } | ||||
| 
 | ||||
|     OpacityAnimator { | ||||
|         id: outOpacityAnimationBusyIndicator | ||||
|         running: false | ||||
|         target: busyIndicator | ||||
|         from: 1 | ||||
|         to: 0 | ||||
|         duration: 1500 | ||||
|         easing.type: Easing.InOutQuad | ||||
|     } | ||||
|         OpacityAnimator { | ||||
|             id: outOpacityAnimationForm | ||||
|             running: false | ||||
|             target: blur | ||||
|             from: 1 | ||||
|             to: 0 | ||||
|             duration: 5000 | ||||
|             easing.type: Easing.InOutQuad | ||||
|         } | ||||
| 
 | ||||
|     OpacityAnimator { | ||||
|         id: inOpacityAnimationContent | ||||
|         running: false | ||||
|         target: content | ||||
|         from: 0 | ||||
|         to: 1 | ||||
|         duration: 1000 | ||||
|         easing.type: Easing.InOutQuad | ||||
|     } | ||||
| 
 | ||||
|     OpacityAnimator { | ||||
|         id: outOpacityAnimationContent | ||||
|         running: false | ||||
|         target: content | ||||
|         from: 1 | ||||
|         to: 0 | ||||
|         duration: 3000 | ||||
|         easing.type: Easing.InOutQuad | ||||
|     } | ||||
| 
 | ||||
|     OpacityAnimator { | ||||
|         id: inOpacityAnimationLoadingText | ||||
|         running: false | ||||
|         target: loadingText | ||||
|         from: 0 | ||||
|         to: 1 | ||||
|         duration: 2000 | ||||
|         easing.type: Easing.InOutQuad | ||||
|         paused: true | ||||
|     } | ||||
| 
 | ||||
|     Timer { | ||||
|         id: timerOpacityAnimationLoadingText | ||||
|         interval: 1500; running: false; repeat: false; | ||||
|         onTriggered: root.viewLoadingText(); | ||||
|     } | ||||
| 
 | ||||
|     function viewLoadingText() { | ||||
|         inOpacityAnimationLoadingText.from = 0; | ||||
|         inOpacityAnimationLoadingText.to = 1; | ||||
|         inOpacityAnimationLoadingText.running = true; | ||||
|     } | ||||
| } | ||||
|  |  | |||
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 16 KiB | 
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| Before Width: | Height: | Size: 11 KiB | 
		Loading…
	
		Reference in New Issue