summaryrefslogtreecommitdiff
path: root/raveos-sddm-theme/sddm-rave-theme/Main.qml
diff options
context:
space:
mode:
authorgabeszm <vgabor92@protonmail.com>2026-10-01 21:02:47 +0200
committergabeszm <vgabor92@protonmail.com>2026-10-01 21:02:47 +0200
commitae2eb9d0881e3ef8317fb5476e03b9e599439660 (patch)
treea6ee42f95ca925a3fde29a8c445b197729a70472 /raveos-sddm-theme/sddm-rave-theme/Main.qml
parent159a44375e4dca8079c0e89d1634213f631984b3 (diff)
downloadRaveOS-PKGBUILD-ae2eb9d0881e3ef8317fb5476e03b9e599439660.tar.gz
RaveOS-PKGBUILD-ae2eb9d0881e3ef8317fb5476e03b9e599439660.zip
fix sddm ui
Diffstat (limited to 'raveos-sddm-theme/sddm-rave-theme/Main.qml')
-rw-r--r--raveos-sddm-theme/sddm-rave-theme/Main.qml41
1 files changed, 28 insertions, 13 deletions
diff --git a/raveos-sddm-theme/sddm-rave-theme/Main.qml b/raveos-sddm-theme/sddm-rave-theme/Main.qml
index cb50ce9..10f8325 100644
--- a/raveos-sddm-theme/sddm-rave-theme/Main.qml
+++ b/raveos-sddm-theme/sddm-rave-theme/Main.qml
@@ -27,12 +27,14 @@ Pane {
palette.buttonText: config.HoverSystemButtonsIconsColor
font.family: config.Font
- font.pointSize: config.FontSize !== "" ? config.FontSize : parseInt(height / 80) || 13
+ readonly property real baseFontSize: config.FontSize !== "" ? parseFloat(config.FontSize) : (parseInt(height / 80) || 13)
+ readonly property real contentScale: 0.92
+ font.pointSize: baseFontSize * contentScale
focus: true
- readonly property real formPadding: root.font.pointSize * 2.8
- readonly property real borderInset: root.font.pointSize * 0.20
+ readonly property real formPadding: baseFontSize * 2.8
+ readonly property real borderInset: baseFontSize * 0.20
property bool leftleft: config.HaveFormBackground == "true" &&
config.PartialBlur == "false" &&
@@ -82,7 +84,7 @@ Pane {
z: 3
property real angle: 0
- property real radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 1.5
+ property real radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : baseFontSize * 1.5
onAngleChanged: requestPaint()
@@ -117,7 +119,7 @@ Pane {
grad.addColorStop(1, "rgba(255, 255, 255, 0.65)");
ctx.strokeStyle = grad;
- ctx.lineWidth = root.font.pointSize * 0.15;
+ ctx.lineWidth = baseFontSize * 0.15;
ctx.stroke();
ctx.restore();
}
@@ -144,9 +146,9 @@ Pane {
anchors.centerIn: form
z: 4
- radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 1.5
+ radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : baseFontSize * 1.5
border.color: Qt.rgba(1, 1, 1, 0.45)
- border.width: Math.max(1, root.font.pointSize * 0.08)
+ border.width: Math.max(1, baseFontSize * 0.08)
clip: true
gradient: Gradient {
@@ -159,8 +161,8 @@ Pane {
LoginForm {
id: form
- height: Math.min(implicitHeight, parent.height - formPadding)
- width: Math.min(Math.max(parent.width * 0.22, root.font.pointSize * 16), parent.width * 0.75)
+ height: Math.min(Math.max(implicitHeight, baseFontSize * 40.4), parent.height - formPadding)
+ width: Math.min(Math.max(parent.width * 0.22, baseFontSize * 16), parent.width * 0.75)
clip: true
anchors.left: config.FormPosition == "left" ? parent.left : undefined
anchors.leftMargin: config.FormPosition == "left" ? parent.width * 0.18 : 0
@@ -261,9 +263,12 @@ Pane {
Image {
id: backgroundPlaceholderImage
+ anchors.fill: parent
+ fillMode: config.CropBackground == "true" ? Image.PreserveAspectCrop : Image.PreserveAspectFit
z: 10
source: config.BackgroundPlaceholder
visible: false
+ asynchronous: true
}
AnimatedImage {
@@ -273,12 +278,22 @@ Pane {
id: player
videoOutput: videoOutput
- autoPlay: true
playbackRate: config.BackgroundSpeed == "" ? 1.0 : config.BackgroundSpeed
- loops: -1
+ loops: (config.LoopBackground === "true") ? MediaPlayer.Infinite : 1
onPlayingChanged: {
- console.log("Video started.")
- backgroundPlaceholderImage.visible = false;
+ if (player.playing) {
+ console.log("Video started.")
+ backgroundPlaceholderImage.visible = false;
+ }
+ }
+ onMediaStatusChanged: {
+ if (player.mediaStatus === MediaPlayer.EndOfMedia) {
+ if (config.LoopBackground === "true") {
+ player.play();
+ } else {
+ player.pause();
+ }
+ }
}
}