Skip to content

Commit a4efd13

Browse files
committed
Fix formating of Splash.qml
1 parent 2086ab2 commit a4efd13

1 file changed

Lines changed: 95 additions & 94 deletions

File tree

contents/splash/Splash.qml

Lines changed: 95 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -18,107 +18,108 @@
1818
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020

21-
import QtQuick 2.5
22-
import QtQuick.Window 2.2
21+
import QtQuick 2.5
22+
import QtQuick.Window 2.2
2323

24-
AnimatedImage {
25-
id: root
26-
source: "images/BeautifulTreeAnimation.gif"
27-
property int stage
28-
29-
onStageChanged: {
30-
if (stage == 2) {
31-
introAnimation.running = true;
32-
} else if (stage == 5) {
33-
introAnimation.target = busyIndicator;
34-
introAnimation.from = 1;
35-
introAnimation.to = 0;
36-
introAnimation.running = true;
37-
}
24+
AnimatedImage {
25+
id: root
26+
source: "images/BeautifulTreeAnimation.gif"
27+
property int stage
28+
29+
onStageChanged: {
30+
if (stage == 2) {
31+
introAnimation.running = true;
32+
} else if (stage == 5) {
33+
introAnimation.target = busyIndicator;
34+
introAnimation.from = 1;
35+
introAnimation.to = 0;
36+
introAnimation.running = true;
3837
}
39-
40-
Text {
41-
id: date
42-
text:Qt.formatDateTime(new Date(),"dd/MM/yyyy")
43-
font.pointSize: 24
44-
color: "#a0a0a0"
45-
opacity:0.85
46-
font { family: "NotoSans MED"; weight: Font.Light ;capitalization: Font.Capitalize}
38+
}
39+
40+
Text {
41+
id: date
42+
text:Qt.formatDateTime(new Date(),"dd/MM/yyyy")
43+
font.pointSize: 24
44+
color: "#a0a0a0"
45+
opacity:0.85
46+
font { family: "NotoSans MED"; weight: Font.Light ;capitalization: Font.Capitalize}
47+
anchors.horizontalCenter: parent.horizontalCenter
48+
y: (parent.height - height) / 1.1
49+
}
50+
Item {
51+
id: content
52+
anchors.fill: parent
53+
opacity: 0
54+
TextMetrics {
55+
id: units
56+
text: "M"
57+
property int gridUnit: boundingRect.height
58+
property int largeSpacing: units.gridUnit
59+
property int smallSpacing: Math.max(2, gridUnit/4)
60+
}
61+
62+
Image {
63+
id: logo
64+
//match SDDM/lockscreen avatar positioning
65+
property real size: units.gridUnit * 8
66+
67+
anchors.centerIn: parent
68+
69+
source: "images/plasma.svgz"
70+
71+
sourceSize.width: size
72+
sourceSize.height: size
73+
}
74+
75+
Image {
76+
id: busyIndicator
77+
//in the middle of the remaining space
78+
y: parent.height - (parent.height - logo.y) / 2 - height/2
4779
anchors.horizontalCenter: parent.horizontalCenter
48-
y: (parent.height - height) / 1.1
80+
source: "images/739.svg"
81+
82+
sourceSize.height: units.gridUnit * 2
83+
sourceSize.width: units.gridUnit * 2
84+
RotationAnimator on rotation {
85+
id: rotationAnimator
86+
from: 0
87+
to: 360
88+
duration: 1500
89+
loops: Animation.Infinite
90+
}
4991
}
50-
Item {
51-
id: content
52-
anchors.fill: parent
53-
opacity: 0
54-
TextMetrics {
55-
id: units
56-
text: "M"
57-
property int gridUnit: boundingRect.height
58-
property int largeSpacing: units.gridUnit
59-
property int smallSpacing: Math.max(2, gridUnit/4)
92+
Row {
93+
spacing: units.smallSpacing*2
94+
anchors {
95+
bottom: parent.bottom
96+
right: parent.right
97+
margins: units.gridUnit
6098
}
61-
62-
Image {
63-
id: logo
64-
//match SDDM/lockscreen avatar positioning
65-
property real size: units.gridUnit * 8
66-
67-
anchors.centerIn: parent
68-
69-
source: "images/plasma.svgz"
70-
71-
sourceSize.width: size
72-
sourceSize.height: size
99+
Text {
100+
color: "#eff0f1"
101+
// Work around Qt bug where NativeRendering breaks for non-integer scale factors
102+
// https://bugreports.qt.io/browse/QTBUG-67007
103+
renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering
104+
anchors.verticalCenter: parent.verticalCenter
105+
text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "This is the first text the user sees while starting in the splash screen, should be translated as something short, is a form that can be seen on a product. Plasma is the project name so shouldn't be translated.", "Plasma made by KDE")
73106
}
74-
75107
Image {
76-
id: busyIndicator
77-
//in the middle of the remaining space
78-
y: parent.height - (parent.height - logo.y) / 2 - height/2
79-
anchors.horizontalCenter: parent.horizontalCenter
80-
source: "images/739.svg"
81-
108+
source: "images/kde.svgz"
82109
sourceSize.height: units.gridUnit * 2
83110
sourceSize.width: units.gridUnit * 2
84-
RotationAnimator on rotation {
85-
id: rotationAnimator
86-
from: 0
87-
to: 360
88-
duration: 1500
89-
loops: Animation.Infinite
90-
}
91111
}
92-
Row {
93-
spacing: units.smallSpacing*2
94-
anchors {
95-
bottom: parent.bottom
96-
right: parent.right
97-
margins: units.gridUnit
98-
}
99-
Text {
100-
color: "#eff0f1"
101-
// Work around Qt bug where NativeRendering breaks for non-integer scale factors
102-
// https://bugreports.qt.io/browse/QTBUG-67007
103-
renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering
104-
anchors.verticalCenter: parent.verticalCenter
105-
text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "This is the first text the user sees while starting in the splash screen, should be translated as something short, is a form that can be seen on a product. Plasma is the project name so shouldn't be translated.", "Plasma made by KDE")
106-
}
107-
Image {
108-
source: "images/kde.svgz"
109-
sourceSize.height: units.gridUnit * 2
110-
sourceSize.width: units.gridUnit * 2
111-
}
112-
}
113-
}
114-
115-
OpacityAnimator {
116-
id: introAnimation
117-
running: false
118-
target: content
119-
from: 0
120-
to: 1
121-
duration: 1000
122-
easing.type: Easing.InOutQuad
123-
}
124-
}
112+
}
113+
}
114+
115+
OpacityAnimator {
116+
id: introAnimation
117+
running: false
118+
target: content
119+
from: 0
120+
to: 1
121+
duration: 1000
122+
easing.type: Easing.InOutQuad
123+
}
124+
}
125+

0 commit comments

Comments
 (0)