diff options
13 files changed, 890 insertions, 477 deletions
diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/BatteryIndicator.qml b/raveos-sddm-theme/sddm-rave-theme/Components/BatteryIndicator.qml index 5497911..0caedbe 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/BatteryIndicator.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/BatteryIndicator.qml @@ -166,7 +166,7 @@ Row { var ty = (height - th) / 2 // Terminál (+ pólus) - rr(ctx, tx, ty, tw, th, 2) + rr(ctx, tx, ty, tw, th, height * 0.15) ctx.fillStyle = col ctx.globalAlpha = 0.7 ctx.fill() @@ -175,11 +175,11 @@ Row { // Keret (akksi test) rr(ctx, bx, by, bw, bh, r) ctx.strokeStyle = col - ctx.lineWidth = 1.5 + ctx.lineWidth = height * 0.09 ctx.stroke() // Töltési szint kitöltés - var padding = 3 + var padding = height * 0.18 var fillW = Math.max(0, (bw - padding * 2) * lvl / 100) if (fillW > 0) { rr(ctx, bx + padding, by + padding, @@ -217,7 +217,7 @@ Row { ctx.lineTo(bw * 0.46, by + bh * 0.68) ctx.lineTo(bw * 0.68, by + bh * 0.28) ctx.strokeStyle = "#ffffff" - ctx.lineWidth = 1.8 + ctx.lineWidth = height * 0.11 ctx.lineCap = "round" ctx.lineJoin = "round" ctx.globalAlpha = 0.95 diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/Clock.qml b/raveos-sddm-theme/sddm-rave-theme/Components/Clock.qml index e9d1399..6c6b7c8 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/Clock.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/Clock.qml @@ -9,8 +9,8 @@ import QtQuick.Controls 2.15 Column { id: clock - width: parent.width / 2 - spacing: 8 + width: parent.width + spacing: root.font.pointSize * 0.45 Image { id: logoImage @@ -18,8 +18,8 @@ Column { anchors.horizontalCenter: parent.horizontalCenter source: (config.Logo && config.Logo !== "") ? Qt.resolvedUrl("../" + config.Logo) : "" fillMode: Image.PreserveAspectFit - width: root.font.pointSize * 13 - height: root.font.pointSize * 13 + width: Math.min(root.font.pointSize * 8.5, root.height * 0.10) + height: Math.min(root.font.pointSize * 8.5, root.height * 0.10) visible: config.Logo && config.Logo !== "" } @@ -28,8 +28,10 @@ Column { anchors.horizontalCenter: parent.horizontalCenter - font.pointSize: root.font.pointSize * 2 + font.pointSize: root.font.pointSize * 1.8 color: config.HeaderTextColor + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.45) renderType: Text.QtRendering text: config.HeaderText } @@ -39,9 +41,11 @@ Column { anchors.horizontalCenter: parent.horizontalCenter - font.pointSize: root.font.pointSize * 3.5 + font.pointSize: Math.min(root.font.pointSize * 2.4, root.height * 0.040) font.bold: true color: config.TimeTextColor + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.45) renderType: Text.QtRendering function updateTime() { @@ -55,8 +59,10 @@ Column { anchors.horizontalCenter: parent.horizontalCenter color: config.DateTextColor - font.pointSize: root.font.pointSize * 0.95 + font.pointSize: root.font.pointSize * 0.82 font.bold: true + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.45) renderType: Text.QtRendering function updateTime() { diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/Input.qml b/raveos-sddm-theme/sddm-rave-theme/Components/Input.qml index 47e6598..daf3ba0 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/Input.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/Input.qml @@ -4,14 +4,16 @@ // Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html import QtQuick 2.15 -import QtQuick.Layouts 1.15 +import QtQuick.Layouts 6.5 import QtQuick.Controls 2.15 -import QtQuick.Effects +import QtQuick.Effects 6.5 Column { id: inputContainer + width: parent.width Layout.fillWidth: true + clip: true property ComboBox exposeSession: sessionSelect.exposeSession property bool failed @@ -21,7 +23,7 @@ Column { // change also in selectSession height: root.font.pointSize * 2 - width: parent.width / 2 + width: parent.width anchors.horizontalCenter: parent.horizontalCenter Label { @@ -65,43 +67,176 @@ Column { } } - // Profilkép + felhasználóváltó + // Profilkép Item { id: avatarField - height: root.font.pointSize * 12 - width: parent.width / 2 + height: Math.min(root.font.pointSize * 6.5, parent.width * 0.35) + width: parent.width anchors.horizontalCenter: parent.horizontalCenter - property string userIconPath: { - var icon = userModel.data(userModel.index(selectUser.currentIndex, 0), Qt.UserRole + 4) - return (icon && icon !== "") ? icon : "" + property int currentAttempt: 0 + property var candidateIcons: [] + + function resolveIconCandidates(idx, name) { + var list = [] + var count = (typeof userModel !== "undefined" && userModel) ? userModel.count : 0 + + var uIndex = -1 + if (name && name !== "" && count > 0) { + for (var i = 0; i < count; i++) { + var qIdx = userModel.index(i, 0) + var uName = userModel.data(qIdx, Qt.UserRole + 1) + if (uName === name) { + uIndex = i + break + } + } + } + if (uIndex === -1) { + uIndex = (idx >= 0 && idx < count) ? idx : (userModel && userModel.lastIndex >= 0 ? userModel.lastIndex : 0) + } + + var directIcon = "" + var home = "" + var uName = name || "" + + if (count > 0 && uIndex >= 0 && uIndex < count) { + var qIdx = userModel.index(uIndex, 0) + directIcon = userModel.data(qIdx, Qt.UserRole + 4) || "" + home = userModel.data(qIdx, Qt.UserRole + 3) || "" + if (!uName || uName === "") { + uName = userModel.data(qIdx, Qt.UserRole + 1) || "" + } + } + + function addCandidate(p) { + if (!p || p === "") return + var s = p.toString().trim() + if (s === "") return + // Ignore generic silhouette icon installed in SDDM faces directory + if (s === "/usr/share/sddm/faces/.face.icon" || s === "file:///usr/share/sddm/faces/.face.icon") return + var url = (s.startsWith("file://") || s.startsWith("image://") || s.startsWith("qrc://") || s.startsWith("http")) ? s : ("file://" + s) + if (list.indexOf(url) === -1) { + list.push(url) + } + } + + // 1. Direct icon reported by SDDM (AccountsService or explicit face config) + if (directIcon !== "") { + addCandidate(directIcon) + } + + // 2. AccountsService system icons (standard across Linux - world-readable 644) + if (uName !== "") { + addCandidate("/var/lib/AccountsService/icons/" + uName) + addCandidate("/var/lib/AccountsService/icons/" + uName + ".png") + addCandidate("/var/lib/AccountsService/icons/" + uName + ".jpg") + addCandidate("/var/lib/AccountsService/icons/" + uName + ".jpeg") + addCandidate("/var/lib/AccountsService/icons/" + uName + ".svg") + } + + // 3. User's home directory faces + if (home !== "") { + addCandidate(home + "/.face") + addCandidate(home + "/.face.icon") + addCandidate(home + "/.face.png") + addCandidate(home + "/.face.jpg") + addCandidate(home + "/.face.jpeg") + addCandidate(home + "/.icon") + addCandidate(home + "/.avatar") + } + if (uName !== "") { + addCandidate("/home/" + uName + "/.face") + addCandidate("/home/" + uName + "/.face.icon") + addCandidate("/home/" + uName + "/.face.png") + addCandidate("/home/" + uName + "/.face.jpg") + addCandidate("/home/" + uName + "/.face.jpeg") + addCandidate("/home/" + uName + "/.icon") + addCandidate("/home/" + uName + "/.avatar") + } + + // 4. System SDDM faces directory + if (uName !== "") { + addCandidate("/usr/share/sddm/faces/" + uName + ".face.icon") + addCandidate("/usr/share/sddm/faces/" + uName + ".png") + addCandidate("/usr/share/sddm/faces/" + uName + ".jpg") + addCandidate("/usr/share/sddm/faces/" + uName) + addCandidate("/var/lib/sddm/faces/" + uName + ".face.icon") + addCandidate("/var/lib/sddm/faces/" + uName + ".png") + addCandidate("/var/lib/sddm/faces/" + uName + ".jpg") + addCandidate("/var/lib/sddm/faces/" + uName) + } + + // 5. Configured theme avatar + if (config.UserAvatar && config.UserAvatar !== "") { + addCandidate(config.UserAvatar) + } + if (config.DefaultAvatar && config.DefaultAvatar !== "") { + addCandidate(config.DefaultAvatar) + } + + return list + } + + function tryNextCandidate() { + if (currentAttempt < candidateIcons.length) { + var nextUrl = candidateIcons[currentAttempt] + currentAttempt++ + avatarPhoto.source = nextUrl + } else { + avatarPhoto.source = "" + } + } + + function updateAvatarSource() { + var targetUser = usernameField.selectedUsername + if (!targetUser && typeof userModel !== "undefined" && userModel && userModel.count > 0) { + targetUser = usernameField.getInitialUsername() + } + candidateIcons = resolveIconCandidates(usernameField.selectedUserIndex, targetUser) + currentAttempt = 0 + avatarPhoto.source = "" + if (candidateIcons.length > 0) { + tryNextCandidate() + } + } + + Component.onCompleted: updateAvatarSource() + + Connections { + target: usernameField + function onSelectedUsernameChanged() { avatarField.updateAvatarSource() } + function onSelectedUserIndexChanged() { avatarField.updateAvatarSource() } } - Column { + Connections { + target: (typeof userModel !== "undefined") ? userModel : null + function onRowsInserted() { avatarField.updateAvatarSource() } + function onModelReset() { avatarField.updateAvatarSource() } + function onDataChanged() { avatarField.updateAvatarSource() } + } + + // Avatar kör + Item { anchors.centerIn: parent - spacing: root.font.pointSize * 0.8 + width: root.font.pointSize * 5.2 + height: root.font.pointSize * 5.2 + + // Avatar drop shadow + Rectangle { + anchors.fill: parent + anchors.topMargin: root.font.pointSize * 0.15 + radius: width / 2 + color: Qt.rgba(0, 0, 0, 0.30) + } - // Avatar kör Rectangle { id: avatarCircle - anchors.horizontalCenter: parent.horizontalCenter - width: root.font.pointSize * 7 - height: root.font.pointSize * 7 + anchors.fill: parent radius: width / 2 clip: true - color: Qt.rgba(0.10, 0.10, 0.15, 0.65) - - // The source image (invisible) - Image { - id: avatarPhoto - anchors.fill: parent - source: avatarField.userIconPath !== "" ? avatarField.userIconPath : "" - fillMode: Image.PreserveAspectCrop - smooth: true - mipmap: true - visible: false - } + color: Qt.rgba(1, 1, 1, 0.15) // The mask source Item { @@ -116,15 +251,23 @@ Column { } } - // Apply MultiEffect to mask the avatarPhoto - MultiEffect { + Image { + id: avatarPhoto anchors.fill: parent - source: avatarPhoto - visible: avatarPhoto.status === Image.Ready && avatarField.userIconPath !== "" - maskEnabled: true - maskSource: avatarMask - maskThresholdMin: 0.5 - maskSpreadAtMin: 1.0 + fillMode: Image.PreserveAspectCrop + smooth: true + mipmap: true + visible: status === Image.Ready + layer.enabled: true + layer.effect: MultiEffect { + maskEnabled: true + maskSource: avatarMask + } + onStatusChanged: { + if (status === Image.Error) { + avatarField.tryNextCandidate() + } + } } Image { @@ -135,8 +278,8 @@ Column { source: Qt.resolvedUrl("../Assets/User.svg") fillMode: Image.PreserveAspectFit smooth: true - visible: avatarField.userIconPath === "" || avatarPhoto.status !== Image.Ready - opacity: 0.75 + visible: avatarPhoto.status !== Image.Ready + opacity: 0.85 } // Draw the border on top of everything! @@ -144,271 +287,391 @@ Column { anchors.fill: parent radius: parent.width / 2 color: "transparent" - border.color: Qt.rgba(1, 1, 1, 0.30) - border.width: 2 - } - } - - // Felhasználóváltó gomb (csak ha több user van) - UserSwitcher { - id: userSwitcher - anchors.horizontalCenter: parent.horizontalCenter - selectedIndex: selectUser.currentIndex - - onUserSwitched: function(idx, name) { - selectUser.currentIndex = idx - username.text = name + border.color: Qt.rgba(1, 1, 1, 0.40) + border.width: root.font.pointSize * 0.12 } } } } - Item { id: usernameField - height: root.font.pointSize * 4.5 - width: parent.width / 2 + height: root.font.pointSize * 3.8 + width: parent.width anchors.horizontalCenter: parent.horizontalCenter - Button { - id: staticUserIcon - - width: parent.height - height: parent.height - anchors.left: parent.left - z: 2 - visible: userModel.count <= 1 - enabled: false - - icon.height: parent.height * 0.25 - icon.width: parent.height * 0.25 - icon.color: config.UserIconColor - icon.source: Qt.resolvedUrl("../Assets/User.svg") + property int selectedUserIndex: (typeof userModel !== "undefined" && userModel && userModel.lastIndex >= 0) ? userModel.lastIndex : 0 + property string selectedUsername: getInitialUsername() - background: Rectangle { - color: "transparent" - border.color: "transparent" - } + function getInitialUsername() { + if (typeof userModel === "undefined" || !userModel || userModel.count === 0) return "" + var idx = (userModel.lastIndex >= 0 && userModel.lastIndex < userModel.count) ? userModel.lastIndex : 0 + var name = userModel.data(userModel.index(idx, 0), Qt.UserRole + 1) + return (name !== undefined && name !== null) ? name.toString() : "" } - ComboBox { - id: selectUser - - width: parent.height - height: parent.height - anchors.left: parent.left - z: 2 - visible: userModel.count > 1 + function selectUserAt(idx) { + if (typeof userModel === "undefined" || !userModel || idx < 0 || idx >= userModel.count) return + selectedUserIndex = idx + selectedUsername = userModel.data(userModel.index(idx, 0), Qt.UserRole + 1) || "" + avatarField.updateAvatarSource() + userDropdownPopup.close() + password.forceActiveFocus() + } - model: userModel - currentIndex: model.lastIndex - textRole: "name" - hoverEnabled: true - onActivated: { - username.text = currentText; + Connections { + target: (typeof userModel !== "undefined") ? userModel : null + function onRowsInserted() { + if (usernameField.selectedUsername === "" || usernameField.selectedUserIndex >= userModel.count) { + usernameField.selectedUserIndex = (userModel.lastIndex >= 0 && userModel.lastIndex < userModel.count) ? userModel.lastIndex : 0 + usernameField.selectedUsername = usernameField.getInitialUsername() + } + avatarField.updateAvatarSource() } - - property var popkey: config.RightToLeftLayout == "true" ? Qt.Key_Right : Qt.Key_Left - Keys.onPressed: function (event) { - if (event.key == Qt.Key_Down && !popup.opened) - username.forceActiveFocus(); - if ((event.key == Qt.Key_Up || event.key == popkey) && !popup.opened) - popup.open(); + function onModelReset() { + usernameField.selectedUserIndex = (userModel.lastIndex >= 0 && userModel.lastIndex < userModel.count) ? userModel.lastIndex : 0 + usernameField.selectedUsername = usernameField.getInitialUsername() + avatarField.updateAvatarSource() } - KeyNavigation.down: username - KeyNavigation.right: username + function onDataChanged() { + usernameField.selectedUsername = usernameField.getInitialUsername() + avatarField.updateAvatarSource() + } + } - delegate: ItemDelegate { - // minus padding - width: popupHandler.width - 20 - anchors.horizontalCenter: popupHandler.horizontalCenter + // Container button / click area + Item { + id: userSelectorButton + anchors.centerIn: parent + height: root.font.pointSize * 2.8 + width: parent.width + activeFocusOnTab: true - contentItem: Text { - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter + Keys.onReturnPressed: userDropdownPopup.visible ? userDropdownPopup.close() : userDropdownPopup.open() + Keys.onEnterPressed: userDropdownPopup.visible ? userDropdownPopup.close() : userDropdownPopup.open() + Keys.onSpacePressed: userDropdownPopup.visible ? userDropdownPopup.close() : userDropdownPopup.open() + Keys.onDownPressed: { + if (!userDropdownPopup.visible) { + password.forceActiveFocus() + } + } + KeyNavigation.down: password - text: model.name - font.pointSize: root.font.pointSize * 0.8 - font.capitalization: Font.AllLowercase - font.family: root.font.family - color: config.DropdownTextColor + // Background with drop shadow and frosted glass + Item { + anchors.fill: parent + Rectangle { + anchors.fill: parent + anchors.topMargin: root.font.pointSize * 0.12 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + color: Qt.rgba(0, 0, 0, 0.20) } - background: Rectangle { - color: selectUser.highlightedIndex === index ? Qt.rgba(1, 1, 1, 0.15) : "transparent" - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 4 : 5 + Rectangle { + anchors.fill: parent + color: userSelectorMouseArea.pressed ? Qt.rgba(1, 1, 1, 0.25) : (userSelectorMouseArea.containsMouse || userSelectorButton.activeFocus ? Qt.rgba(1, 1, 1, 0.20) : Qt.rgba(1, 1, 1, 0.14)) + border.color: userSelectorButton.activeFocus ? Qt.rgba(255, 255, 255, 0.75) : (userSelectorMouseArea.containsMouse ? Qt.rgba(255, 255, 255, 0.45) : Qt.rgba(255, 255, 255, 0.25)) + border.width: userSelectorButton.activeFocus ? root.font.pointSize * 0.12 : root.font.pointSize * 0.08 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + Behavior on color { ColorAnimation { duration: 150 } } + Behavior on border.color { ColorAnimation { duration: 150 } } } } - indicator: Button { - id: usernameIcon - - width: selectUser.height * 1 + // Left Icon (User icon) + Button { + id: userFieldLeftIcon + width: parent.height height: parent.height anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: selectUser.height * 0 - - icon.height: parent.height * 0.25 - icon.width: parent.height * 0.25 enabled: false - icon.color: config.UserIconColor + icon.source: Qt.resolvedUrl("../Assets/User.svg") + icon.width: parent.height * 0.38 + icon.height: parent.height * 0.38 + icon.color: "#ffffff" - background: Rectangle { - color: "transparent" - border.color: "transparent" - } + background: Rectangle { color: "transparent" } } - background: Rectangle { - color: "transparent" - border.color: "transparent" - } + // Username display in the middle (Non-editable, clean text) + Text { + id: username + anchors.centerIn: parent + width: parent.width - userFieldLeftIcon.width * 2.2 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight - popup: Popup { - id: popupHandler + text: usernameField.selectedUsername + color: config.LoginFieldTextColor + font.bold: true + font.pointSize: root.font.pointSize * 0.95 + font.family: root.font.family + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.40) + } - implicitHeight: contentItem.implicitHeight - width: usernameField.width - y: parent.height - username.height / 3 - x: config.RightToLeftLayout == "true" ? -loginButton.width + selectUser.width : 0 - rightMargin: config.RightToLeftLayout == "true" ? root.padding + usernameField.width / 2 : undefined - padding: 10 + // Dropdown Arrow Button on Right + Item { + id: userDropdownBtn + width: parent.height + height: parent.height + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter - contentItem: ListView { - implicitHeight: contentHeight + 20 + Canvas { + id: chevronCanvas + width: root.font.pointSize * 0.85 + height: root.font.pointSize * 0.50 + anchors.centerIn: parent + rotation: userDropdownPopup.visible ? 180 : 0 + Behavior on rotation { NumberAnimation { duration: 200; easing.type: Easing.OutCubic } } - clip: true - model: selectUser.popup.visible ? selectUser.delegateModel : null - currentIndex: selectUser.highlightedIndex - ScrollIndicator.vertical: ScrollIndicator {} - } + onPaint: { + var ctx = getContext("2d"); + ctx.reset(); + ctx.clearRect(0, 0, width, height); + ctx.strokeStyle = userSelectorMouseArea.containsMouse ? "#ffffff" : "rgba(255, 255, 255, 0.85)"; + ctx.lineWidth = Math.max(1.5, root.font.pointSize * 0.12); + ctx.lineCap = "round"; + ctx.lineJoin = "round"; - background: Rectangle { - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 2 : 10 - color: Qt.rgba(1, 1, 1, 0.08) - border.color: Qt.rgba(1, 1, 1, 0.18) - border.width: 1 - layer.enabled: true - } + ctx.beginPath(); + ctx.moveTo(1.5, 1.5); + ctx.lineTo(width / 2, height - 1.5); + ctx.lineTo(width - 1.5, 1.5); + ctx.stroke(); + } - enter: Transition { - NumberAnimation { - property: "opacity" - from: 0 - to: 1 + Connections { + target: userSelectorMouseArea + function onContainsMouseChanged() { chevronCanvas.requestPaint(); } } } } - states: [ - State { - name: "pressed" - when: selectUser.down - PropertyChanges { - target: usernameIcon - icon.color: Qt.lighter(config.HoverUserIconColor, 1.1) - } - }, - State { - name: "hovered" - when: selectUser.hovered - PropertyChanges { - target: usernameIcon - icon.color: Qt.lighter(config.HoverUserIconColor, 1.2) - } - }, - State { - name: "focused" - when: selectUser.activeFocus - PropertyChanges { - target: usernameIcon - icon.color: config.HoverUserIconColor - } - } - ] - transitions: [ - Transition { - PropertyAnimation { - properties: "color, border.color, icon.color" - duration: 150 + // Whole field click area + MouseArea { + id: userSelectorMouseArea + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: { + if (userDropdownPopup.visible) { + userDropdownPopup.close(); + } else { + userDropdownPopup.open(); } } - ] + } } - TextField { - id: username + // Dropdown Popup + Popup { + id: userDropdownPopup - anchors.centerIn: parent - height: root.font.pointSize * 3 width: parent.width - horizontalAlignment: TextInput.AlignHCenter - z: 1 + y: parent.height + root.font.pointSize * 0.4 + x: 0 + padding: root.font.pointSize * 0.5 + dim: false + closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent + z: 100 - text: config.ForceLastUser == "true" ? selectUser.currentText : null - color: config.LoginFieldTextColor - font.bold: true - font.capitalization: config.AllowUppercaseLettersInUsernames == "false" ? Font.AllLowercase : Font.MixedCase - placeholderText: config.TranslatePlaceholderUsername || textConstants.userName - placeholderTextColor: config.PlaceholderTextColor - selectByMouse: true - renderType: Text.QtRendering + background: Item { + // Drop shadow underlay + Rectangle { + anchors.fill: parent + anchors.topMargin: root.font.pointSize * 0.15 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + color: Qt.rgba(0, 0, 0, 0.40) + } - onFocusChanged: { - if (focus) - selectAll(); - } + // Frosted Glass body (minimally translucent) + Rectangle { + anchors.fill: parent + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + border.color: Qt.rgba(1, 1, 1, 0.40) + border.width: 1 + clip: true - background: Rectangle { - color: username.activeFocus ? Qt.rgba(0, 0, 0, 0.35) : Qt.rgba(0, 0, 0, 0.2) - border.color: username.activeFocus ? Qt.rgba(255, 255, 255, 0.3) : Qt.rgba(255, 255, 255, 0.12) - border.width: username.activeFocus ? 1.5 : 1 - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : 10 - Behavior on color { - ColorAnimation { - duration: 150 - } - } - Behavior on border.color { - ColorAnimation { - duration: 150 + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.rgba(0.18, 0.20, 0.28, 0.92) } + GradientStop { position: 0.5; color: Qt.rgba(0.14, 0.16, 0.24, 0.94) } + GradientStop { position: 1.0; color: Qt.rgba(0.11, 0.13, 0.20, 0.96) } } } } - onAccepted: config.AllowUppercaseLettersInUsernames == "false" ? sddm.login(username.text.toLowerCase(), password.text, sessionSelect.selectedSession) : sddm.login(username.text, password.text, sessionSelect.selectedSession) - KeyNavigation.down: passwordIcon + contentItem: ListView { + id: userDropdownList + implicitHeight: Math.min(contentHeight, root.font.pointSize * 16) + clip: true + model: userModel + spacing: root.font.pointSize * 0.25 + boundsBehavior: Flickable.StopAtBounds - states: [ - State { - name: "focused" - when: username.activeFocus - PropertyChanges { - target: username - color: Qt.lighter(config.LoginFieldTextColor, 1.15) + delegate: Item { + id: userDelegateItem + width: userDropdownList.width + height: root.font.pointSize * 3.4 + + property var itemCandidates: avatarField.resolveIconCandidates(index, model.name) + property int itemAttempt: 0 + property bool isSelected: index === usernameField.selectedUserIndex + + function tryNextItemCandidate() { + if (itemAttempt < itemCandidates.length) { + var nextUrl = itemCandidates[itemAttempt] + itemAttempt++ + dPhoto.source = nextUrl + } else { + dPhoto.source = "" + } + } + + Component.onCompleted: { + itemAttempt = 0 + dPhoto.source = "" + if (itemCandidates.length > 0) { + tryNextItemCandidate() + } + } + + Rectangle { + anchors.fill: parent + radius: root.font.pointSize * 0.6 + color: userDelegateMouse.pressed + ? Qt.rgba(1, 1, 1, 0.24) + : userDelegateMouse.containsMouse + ? Qt.rgba(1, 1, 1, 0.16) + : (userDelegateItem.isSelected ? Qt.rgba(1, 1, 1, 0.10) : "transparent") + border.color: userDelegateItem.isSelected ? Qt.rgba(1, 1, 1, 0.45) : (userDelegateMouse.containsMouse ? Qt.rgba(1, 1, 1, 0.25) : "transparent") + border.width: 1 + Behavior on color { ColorAnimation { duration: 100 } } + Behavior on border.color { ColorAnimation { duration: 100 } } + } + + Row { + anchors.fill: parent + anchors.leftMargin: root.font.pointSize * 0.8 + anchors.rightMargin: root.font.pointSize * 0.8 + spacing: root.font.pointSize * 0.8 + + // Mini avatar in dropdown row + Item { + width: root.font.pointSize * 2.4 + height: root.font.pointSize * 2.4 + anchors.verticalCenter: parent.verticalCenter + + Rectangle { + anchors.fill: parent + radius: width / 2 + clip: true + color: Qt.rgba(1, 1, 1, 0.15) + border.color: Qt.rgba(1, 1, 1, 0.35) + border.width: 1 + + Item { + id: dMask + anchors.fill: parent + visible: false + layer.enabled: true + Rectangle { + anchors.fill: parent + radius: parent.width / 2 + color: "black" + } + } + + Image { + id: dPhoto + anchors.fill: parent + fillMode: Image.PreserveAspectCrop + smooth: true + visible: status === Image.Ready + layer.enabled: true + layer.effect: MultiEffect { + maskEnabled: true + maskSource: dMask + } + onStatusChanged: { + if (status === Image.Error) { + userDelegateItem.tryNextItemCandidate() + } + } + } + + Button { + anchors.centerIn: parent + width: parent.width * 0.65 + height: parent.height * 0.65 + enabled: false + icon.source: Qt.resolvedUrl("../Assets/User.svg") + icon.width: parent.width * 0.65 + icon.height: parent.height * 0.65 + icon.color: "#ffffff" + visible: dPhoto.status !== Image.Ready + background: Rectangle { color: "transparent" } + } + } + } + + // Username & realName + Column { + anchors.verticalCenter: parent.verticalCenter + spacing: 2 + + Text { + text: model.name || "" + color: "#ffffff" + font.bold: true + font.pointSize: root.font.pointSize * 0.85 + font.family: root.font.family + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.40) + } + + Text { + text: (model.realName && model.realName !== model.name) ? model.realName : "" + color: Qt.rgba(1, 1, 1, 0.65) + font.pointSize: root.font.pointSize * 0.70 + font.family: root.font.family + visible: text !== "" + } + } + } + + MouseArea { + id: userDelegateMouse + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: { + usernameField.selectUserAt(index) + } } } - ] + } } } Item { id: passwordField - height: root.font.pointSize * 4.5 - width: parent.width / 2 + height: root.font.pointSize * 3.8 + width: parent.width anchors.horizontalCenter: parent.horizontalCenter Button { id: passwordIcon height: parent.height - width: selectUser.height * 1 + width: parent.height anchors.left: parent.left - anchors.leftMargin: selectUser.height * 0 anchors.verticalCenter: parent.verticalCenter z: 2 @@ -478,7 +741,7 @@ Column { TextField { id: password - height: root.font.pointSize * 3 + height: root.font.pointSize * 2.8 width: parent.width anchors.centerIn: parent horizontalAlignment: TextInput.AlignHCenter @@ -494,19 +757,29 @@ Column { renderType: Text.QtRendering selectByMouse: true - background: Rectangle { - color: password.activeFocus ? Qt.rgba(0, 0, 0, 0.35) : Qt.rgba(0, 0, 0, 0.2) - border.color: password.activeFocus ? Qt.rgba(255, 255, 255, 0.3) : Qt.rgba(255, 255, 255, 0.12) - border.width: password.activeFocus ? 1.5 : 1 - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : 10 - Behavior on color { - ColorAnimation { - duration: 150 - } + background: Item { + Rectangle { + anchors.fill: parent + anchors.topMargin: root.font.pointSize * 0.12 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + color: Qt.rgba(0, 0, 0, 0.20) } - Behavior on border.color { - ColorAnimation { - duration: 150 + + Rectangle { + anchors.fill: parent + color: password.activeFocus ? Qt.rgba(1, 1, 1, 0.25) : Qt.rgba(1, 1, 1, 0.14) + border.color: password.activeFocus ? Qt.rgba(255, 255, 255, 0.65) : Qt.rgba(255, 255, 255, 0.25) + border.width: password.activeFocus ? root.font.pointSize * 0.12 : root.font.pointSize * 0.08 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + Behavior on color { + ColorAnimation { + duration: 150 + } + } + Behavior on border.color { + ColorAnimation { + duration: 150 + } } } } @@ -537,10 +810,8 @@ Column { Item { id: login - // important - // try 4 or 9 ... - height: root.font.pointSize * 9 - width: parent.width / 2 + height: root.font.pointSize * 4.2 + width: parent.width anchors.horizontalCenter: parent.horizontalCenter visible: config.HideLoginButton == "true" ? false : true @@ -548,7 +819,7 @@ Column { Item { id: loginButton - height: root.font.pointSize * 3 + height: root.font.pointSize * 2.8 width: parent.width anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter @@ -568,12 +839,20 @@ Column { KeyNavigation.down: rebootBtn + // Drop shadow + Rectangle { + anchors.fill: parent + anchors.topMargin: root.font.pointSize * 0.12 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + color: Qt.rgba(0, 0, 0, 0.25) + } + Rectangle { id: buttonBackground anchors.fill: parent - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : 10 - border.width: loginButton.activeFocus ? 1.5 : 1 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + border.width: loginButton.activeFocus ? root.font.pointSize * 0.12 : root.font.pointSize * 0.08 border.color: loginButton.down ? Qt.rgba(21/255, 128/255, 61/255, 0.95) : (loginButton.hovered ? Qt.rgba(34/255, 197/255, 94/255, 0.85) : Qt.rgba(74/255, 222/255, 128/255, 0.65)) @@ -600,6 +879,8 @@ Column { font.pointSize: root.font.pointSize font.family: root.font.family color: "#ffffff" + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.45) text: config.TranslateLogin || textConstants.login opacity: 1.0 @@ -622,58 +903,71 @@ Column { Item { id: powerButtonsRow - height: root.font.pointSize * 10 - width: parent.width / 2 + height: root.font.pointSize * 5.5 + width: parent.width anchors.horizontalCenter: parent.horizontalCenter Row { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - spacing: root.font.pointSize * 3 + spacing: root.font.pointSize * 1.5 // Reboot gomb Column { - spacing: root.font.pointSize * 0.6 + spacing: root.font.pointSize * 0.45 - RoundButton { - id: rebootBtn + Item { + width: root.font.pointSize * 4.2 + height: root.font.pointSize * 4.2 - width: root.font.pointSize * 6 - height: root.font.pointSize * 6 + // Button shadow + Rectangle { + anchors.fill: parent + anchors.topMargin: root.font.pointSize * 0.12 + radius: width / 2 + color: Qt.rgba(0, 0, 0, 0.30) + } - activeFocusOnTab: true - Keys.onReturnPressed: sddm.reboot() - Keys.onEnterPressed: sddm.reboot() - KeyNavigation.right: shutdownBtn - hoverEnabled: true + RoundButton { + id: rebootBtn + anchors.fill: parent - icon.source: Qt.resolvedUrl("../Assets/Reboot.svg") - icon.width: root.font.pointSize * 3 - icon.height: root.font.pointSize * 3 - icon.color: "#ffffff" + activeFocusOnTab: true + Keys.onReturnPressed: sddm.reboot() + Keys.onEnterPressed: sddm.reboot() + KeyNavigation.right: shutdownBtn + hoverEnabled: true - opacity: rebootBtn.hovered || rebootBtn.activeFocus ? 1.0 : 0.75 - Behavior on opacity { NumberAnimation { duration: 150 } } + icon.source: Qt.resolvedUrl("../Assets/Reboot.svg") + icon.width: root.font.pointSize * 2.1 + icon.height: root.font.pointSize * 2.1 + icon.color: "#ffffff" - scale: rebootBtn.pressed ? 0.88 : 1.0 - Behavior on scale { NumberAnimation { duration: 100 } } + opacity: rebootBtn.hovered || rebootBtn.activeFocus ? 1.0 : 0.75 + Behavior on opacity { NumberAnimation { duration: 150 } } - background: Rectangle { - anchors.fill: parent - radius: width / 2 - color: rebootBtn.pressed ? Qt.rgba(1, 0.45, 0.0, 0.35) : (rebootBtn.hovered ? Qt.rgba(1, 0.55, 0.0, 0.22) : "transparent") - border.color: "transparent" - border.width: 0 - Behavior on color { ColorAnimation { duration: 150 } } - } + scale: rebootBtn.pressed ? 0.88 : 1.0 + Behavior on scale { NumberAnimation { duration: 100 } } - onClicked: sddm.reboot() + background: Rectangle { + anchors.fill: parent + radius: width / 2 + color: rebootBtn.pressed ? Qt.rgba(1, 0.45, 0.0, 0.35) : (rebootBtn.hovered ? Qt.rgba(1, 0.55, 0.0, 0.22) : "transparent") + border.color: "transparent" + border.width: 0 + Behavior on color { ColorAnimation { duration: 150 } } + } + + onClicked: sddm.reboot() + } } Text { anchors.horizontalCenter: parent.children[0].horizontalCenter text: config.TranslateReboot || textConstants.reboot color: "#ffffff" + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.50) font.pointSize: root.font.pointSize * 0.8 font.family: root.font.family horizontalAlignment: Text.AlignHCenter @@ -684,47 +978,60 @@ Column { // Shutdown gomb Column { - spacing: root.font.pointSize * 0.6 + spacing: root.font.pointSize * 0.45 - RoundButton { - id: shutdownBtn + Item { + width: root.font.pointSize * 4.2 + height: root.font.pointSize * 4.2 - width: root.font.pointSize * 6 - height: root.font.pointSize * 6 + // Button shadow + Rectangle { + anchors.fill: parent + anchors.topMargin: root.font.pointSize * 0.12 + radius: width / 2 + color: Qt.rgba(0, 0, 0, 0.30) + } - activeFocusOnTab: true - Keys.onReturnPressed: sddm.powerOff() - Keys.onEnterPressed: sddm.powerOff() - KeyNavigation.left: rebootBtn - hoverEnabled: true + RoundButton { + id: shutdownBtn + anchors.fill: parent - icon.source: Qt.resolvedUrl("../Assets/Shutdown.svg") - icon.width: root.font.pointSize * 3 - icon.height: root.font.pointSize * 3 - icon.color: "#ffffff" + activeFocusOnTab: true + Keys.onReturnPressed: sddm.powerOff() + Keys.onEnterPressed: sddm.powerOff() + KeyNavigation.left: rebootBtn + hoverEnabled: true - opacity: shutdownBtn.hovered || shutdownBtn.activeFocus ? 1.0 : 0.75 - Behavior on opacity { NumberAnimation { duration: 150 } } + icon.source: Qt.resolvedUrl("../Assets/Shutdown.svg") + icon.width: root.font.pointSize * 2.1 + icon.height: root.font.pointSize * 2.1 + icon.color: "#ffffff" - scale: shutdownBtn.pressed ? 0.88 : 1.0 - Behavior on scale { NumberAnimation { duration: 100 } } + opacity: shutdownBtn.hovered || shutdownBtn.activeFocus ? 1.0 : 0.75 + Behavior on opacity { NumberAnimation { duration: 150 } } - background: Rectangle { - anchors.fill: parent - radius: width / 2 - color: shutdownBtn.pressed ? Qt.rgba(0.8, 0.1, 0.1, 0.40) : (shutdownBtn.hovered ? Qt.rgba(0.8, 0.1, 0.1, 0.25) : "transparent") - border.color: "transparent" - border.width: 0 - Behavior on color { ColorAnimation { duration: 150 } } - } + scale: shutdownBtn.pressed ? 0.88 : 1.0 + Behavior on scale { NumberAnimation { duration: 100 } } + + background: Rectangle { + anchors.fill: parent + radius: width / 2 + color: shutdownBtn.pressed ? Qt.rgba(0.8, 0.1, 0.1, 0.40) : (shutdownBtn.hovered ? Qt.rgba(0.8, 0.1, 0.1, 0.25) : "transparent") + border.color: "transparent" + border.width: 0 + Behavior on color { ColorAnimation { duration: 150 } } + } - onClicked: sddm.powerOff() + onClicked: sddm.powerOff() + } } Text { anchors.horizontalCenter: parent.children[0].horizontalCenter text: config.TranslateShutdown || textConstants.shutdown color: "#ffffff" + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.50) font.pointSize: root.font.pointSize * 0.8 font.family: root.font.family horizontalAlignment: Text.AlignHCenter diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/KeyboardLayoutIndicator.qml b/raveos-sddm-theme/sddm-rave-theme/Components/KeyboardLayoutIndicator.qml index 0fb03be..cd1f73d 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/KeyboardLayoutIndicator.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/KeyboardLayoutIndicator.qml @@ -130,6 +130,8 @@ Item { font.pointSize: root.font.pointSize * 0.82 font.family: root.font.family font.bold: true + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.40) } } @@ -148,21 +150,21 @@ Item { Popup { id: layoutPopup - y: parent.height + 5 + y: parent.height + root.font.pointSize * 0.4 x: -width / 2 + parent.width / 2 - width: Math.max(160, layoutRow.width * 1.5) - padding: 5 + width: Math.max(root.font.pointSize * 12, layoutRow.width * 1.5) + padding: root.font.pointSize * 0.4 background: Rectangle { - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 2 : 10 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 2 : root.font.pointSize * 0.8 color: config.BackgroundColor || "#1a1a1a" border.color: Qt.rgba(1, 1, 1, 0.20) - border.width: 1 + border.width: root.font.pointSize * 0.08 } contentItem: ListView { id: layoutListView - implicitHeight: Math.min(200, contentHeight) + implicitHeight: Math.min(root.font.pointSize * 15, contentHeight) clip: true model: layoutsCount ScrollIndicator.vertical: ScrollIndicator { } @@ -172,7 +174,7 @@ Item { width: parent.width height: root.font.pointSize * 2 color: delegateMouse.containsMouse ? Qt.rgba(1, 1, 1, 0.15) : "transparent" - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 4 : 5 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 4 : root.font.pointSize * 0.4 // Get layout object safely property var layoutObj: (typeof keyboard !== "undefined" && keyboard && keyboard.layouts) ? keyboard.layouts[index] : null @@ -180,10 +182,10 @@ Item { property string longName: layoutObj && layoutObj.longName ? layoutObj.longName : "" Row { - spacing: 8 + spacing: root.font.pointSize * 0.6 anchors.fill: parent - anchors.leftMargin: 10 - anchors.rightMargin: 10 + anchors.leftMargin: root.font.pointSize * 0.8 + anchors.rightMargin: root.font.pointSize * 0.8 Text { text: delegateItem.shortName @@ -200,7 +202,7 @@ Item { font.pointSize: root.font.pointSize * 0.8 font.family: root.font.family elide: Text.ElideRight - width: parent.width - x - 10 + width: parent.width - x - root.font.pointSize * 0.8 anchors.verticalCenter: parent.verticalCenter } } diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/LoginForm.qml b/raveos-sddm-theme/sddm-rave-theme/Components/LoginForm.qml index 515d6b3..d3fd1b4 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/LoginForm.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/LoginForm.qml @@ -4,7 +4,7 @@ // Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html import QtQuick 2.15 -import QtQuick.Layouts 1.15 +import QtQuick.Layouts 6.5 import SddmComponents 2.0 as SDDM ColumnLayout { @@ -14,14 +14,19 @@ ColumnLayout { property int p: config.ScreenPadding == "" ? 0 : config.ScreenPadding property string a: config.FormPosition - spacing: 15 + spacing: root.font.pointSize * 0.9 + clip: true + + readonly property real innerPadding: root.font.pointSize * 0.9 Clock { id: clock + Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter Layout.preferredHeight: clock.implicitHeight - Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0 + Layout.leftMargin: innerPadding + Layout.rightMargin: innerPadding } // Akkumulátor + Hálózat jelzők @@ -29,8 +34,7 @@ ColumnLayout { id: statusRow Layout.alignment: Qt.AlignHCenter - Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0 - Layout.bottomMargin: visible ? 4 : 0 + Layout.bottomMargin: visible ? root.font.pointSize * 0.3 : 0 visible: (batteryIndicator.batteryLevel >= 0) || networkIndicator.isConnected spacing: root.font.pointSize * 1.2 @@ -58,32 +62,38 @@ ColumnLayout { Layout.alignment: Qt.AlignHCenter Layout.preferredHeight: keyboardLayoutIndicator.implicitHeight - Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0 - Layout.bottomMargin: visible ? 4 : 0 + Layout.bottomMargin: visible ? root.font.pointSize * 0.3 : 0 + Layout.leftMargin: innerPadding + Layout.rightMargin: innerPadding } Input { id: input + Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter Layout.preferredHeight: input.implicitHeight - Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0 - Layout.topMargin: 0 + Layout.leftMargin: innerPadding + Layout.rightMargin: innerPadding } SessionButton { id: sessionSelect + Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter Layout.preferredHeight: sessionSelect.height - Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0 + Layout.leftMargin: innerPadding + Layout.rightMargin: innerPadding } VirtualKeyboardButton { id: virtualKeyboardButton + Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter Layout.preferredHeight: root.font.pointSize * 2 - Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0 + Layout.leftMargin: innerPadding + Layout.rightMargin: innerPadding } } diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/NetworkIndicator.qml b/raveos-sddm-theme/sddm-rave-theme/Components/NetworkIndicator.qml index bed97c8..c3c5eca 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/NetworkIndicator.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/NetworkIndicator.qml @@ -198,7 +198,7 @@ Row { var pinY = by - pinH + lw var gap = bw / 4 for (var p = 0; p < 3; p++) { - rr(ctx, bx + gap * (p + 0.5) - pinW/2, pinY, pinW, pinH, 2) + rr(ctx, bx + gap * (p + 0.5) - pinW/2, pinY, pinW, pinH, height * 0.12) ctx.fill() } diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml b/raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml index 301256b..ed614b6 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/SessionButton.qml @@ -9,8 +9,8 @@ import QtQuick.Controls 2.15 Item { id: sessionButton - height: root.font.pointSize * 2 - width: parent.width / 2 + height: root.font.pointSize * 1.8 + width: parent.width property var selectedSession: selectSession.currentIndex property string textConstantSession @@ -22,7 +22,7 @@ Item { // important // change also in errorMessage - height: root.font.pointSize * 2 + height: root.font.pointSize * 1.8 anchors.horizontalCenter: parent.horizontalCenter hoverEnabled: true @@ -38,7 +38,7 @@ Item { delegate: ItemDelegate { // minus padding - width: popupHandler.width - 20 + width: popupHandler.width - root.font.pointSize * 1.5 anchors.horizontalCenter: popupHandler.horizontalCenter contentItem: Text { @@ -53,7 +53,7 @@ Item { background: Rectangle { color: selectSession.highlightedIndex === index ? Qt.rgba(1, 1, 1, 0.15) : "transparent" - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 4 : 5 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 4 : root.font.pointSize * 0.4 } } @@ -71,21 +71,32 @@ Item { text: (config.TranslateSessionSelection || "Session") + ": " + selectSession.currentText color: config.SessionButtonTextColor + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.40) font.pointSize: root.font.pointSize * 0.8 font.family: root.font.family Keys.onReleased: parent.popup.open() } - background: Rectangle { - anchors.fill: parent - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : 10 - color: selectSession.down ? Qt.rgba(1, 1, 1, 0.12) : (selectSession.hovered ? Qt.rgba(1, 1, 1, 0.08) : Qt.rgba(1, 1, 1, 0.04)) - border.color: selectSession.visualFocus ? Qt.rgba(1, 1, 1, 0.60) : (selectSession.hovered ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.18)) - border.width: selectSession.visualFocus ? 1.5 : 1 + background: Item { + Rectangle { + anchors.fill: parent + anchors.topMargin: root.font.pointSize * 0.10 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + color: Qt.rgba(0, 0, 0, 0.20) + } + + Rectangle { + anchors.fill: parent + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + color: selectSession.down ? Qt.rgba(1, 1, 1, 0.20) : (selectSession.hovered ? Qt.rgba(1, 1, 1, 0.14) : Qt.rgba(1, 1, 1, 0.08)) + border.color: selectSession.visualFocus ? Qt.rgba(1, 1, 1, 0.70) : (selectSession.hovered ? Qt.rgba(1, 1, 1, 0.40) : Qt.rgba(1, 1, 1, 0.22)) + border.width: selectSession.visualFocus ? root.font.pointSize * 0.12 : root.font.pointSize * 0.08 - Behavior on color { ColorAnimation { duration: 150 } } - Behavior on border.color { ColorAnimation { duration: 150 } } + Behavior on color { ColorAnimation { duration: 150 } } + Behavior on border.color { ColorAnimation { duration: 150 } } + } } popup: Popup { @@ -93,12 +104,12 @@ Item { implicitHeight: contentItem.implicitHeight width: sessionButton.width - y: parent.height - 1 + y: parent.height - root.font.pointSize * 0.08 x: -popupHandler.width/2 + displayedItem.width/2 - padding: 10 + padding: root.font.pointSize * 0.8 contentItem: ListView { - implicitHeight: contentHeight + 20 + implicitHeight: contentHeight + root.font.pointSize * 1.5 clip: true model: selectSession.popup.visible ? selectSession.delegateModel : null @@ -107,10 +118,10 @@ Item { } background: Rectangle { - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 2 : 10 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 2 : root.font.pointSize * 0.8 color: config.BackgroundColor border.color: Qt.rgba(1, 1, 1, 0.20) - border.width: 1 + border.width: root.font.pointSize * 0.08 } enter: Transition { diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/ToastNotification.qml b/raveos-sddm-theme/sddm-rave-theme/Components/ToastNotification.qml index 43817c4..cfe507e 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/ToastNotification.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/ToastNotification.qml @@ -31,7 +31,7 @@ Item { id: toastRect anchors.horizontalCenter: parent.horizontalCenter - y: toastRoot.showing ? root.font.pointSize * 2 : -height - 10 + y: toastRoot.showing ? root.font.pointSize * 2 : -height - root.font.pointSize * 0.8 Behavior on y { NumberAnimation { duration: 380; easing.type: Easing.OutBack } @@ -43,7 +43,7 @@ Item { color: Qt.rgba(0.75, 0.08, 0.08, 0.88) border.color: Qt.rgba(1, 0.35, 0.35, 0.65) - border.width: 1 + border.width: root.font.pointSize * 0.08 // Pulse animation border SequentialAnimation on border.color { diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/UserSwitcher.qml b/raveos-sddm-theme/sddm-rave-theme/Components/UserSwitcher.qml index d16c496..ee8852e 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/UserSwitcher.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/UserSwitcher.qml @@ -4,7 +4,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 -import QtQuick.Effects +import QtQuick.Effects 6.5 Item { id: userSwitcher @@ -26,14 +26,38 @@ Item { signal userSwitched(int idx, string name) // ── Segédfüggvények ─────────────────────────────────────────────────────────────────── - function isImagePath(p) { - return p && p !== "" - } + function resolveUserIcon(idx) { + var list = [] + var count = (typeof userModel !== "undefined" && userModel) ? userModel.count : 0 + if (count === 0 || idx < 0 || idx >= count) return list + + var qIdx = userModel.index(idx, 0) + var directIcon = userModel.data(qIdx, Qt.UserRole + 4) || "" + var home = userModel.data(qIdx, Qt.UserRole + 3) || "" + var uName = userModel.data(qIdx, Qt.UserRole + 1) || "" + + function addCandidate(p) { + if (!p || p === "") return + var s = p.toString().trim() + if (s === "") return + var url = (s.startsWith("file://") || s.startsWith("image://") || s.startsWith("qrc://") || s.startsWith("http")) ? s : ("file://" + s) + if (list.indexOf(url) === -1) { + list.push(url) + } + } - function getUserIcon(idx) { - // Qt.UserRole+4 = IconRole (ebben az SDDM verziban a Home = +3) - var icon = userModel.data(userModel.index(idx, 0), Qt.UserRole + 4) - return isImagePath(icon) ? icon : "" + if (directIcon !== "") addCandidate(directIcon) + if (home !== "") { + addCandidate(home + "/.face.icon") + addCandidate(home + "/.face") + } + if (uName !== "") { + addCandidate("/var/lib/AccountsService/icons/" + uName) + addCandidate("/var/lib/AccountsService/icons/" + uName + ".png") + addCandidate("/home/" + uName + "/.face.icon") + addCandidate("/home/" + uName + "/.face") + } + return list } function getUserName(idx) { @@ -56,7 +80,7 @@ Item { border.color: btnArea.containsMouse ? Qt.rgba(1, 1, 1, 0.45) : Qt.rgba(1, 1, 1, 0.22) - border.width: 1 + border.width: root.font.pointSize * 0.08 Behavior on color { ColorAnimation { duration: 150 } } Behavior on border.color{ ColorAnimation { duration: 150 } } @@ -73,18 +97,25 @@ Item { height: root.font.pointSize * 1.6 radius: width / 2 clip: true - color: Qt.rgba(0.10, 0.10, 0.18, 0.70) + color: Qt.rgba(1, 1, 1, 0.15) anchors.verticalCenter: parent.verticalCenter - Image { - id: miniPhoto - anchors.fill: parent - source: userSwitcher.getUserIcon(userSwitcher.selectedIndex) - fillMode: Image.PreserveAspectCrop - smooth: true - visible: false + property var miniCandidates: userSwitcher.resolveUserIcon(userSwitcher.selectedIndex) + property int miniAttempt: 0 + + Connections { + target: userSwitcher + function onSelectedIndexChanged() { + miniAvatarCircle.miniCandidates = userSwitcher.resolveUserIcon(userSwitcher.selectedIndex) + miniAvatarCircle.miniAttempt = 0 + if (miniAvatarCircle.miniCandidates.length > 0) { + miniPhoto.source = miniAvatarCircle.miniCandidates[0] + } else { + miniPhoto.source = "" + } + } } - + Item { id: miniMask anchors.fill: parent @@ -96,15 +127,25 @@ Item { color: "black" } } - - MultiEffect { + + Image { + id: miniPhoto anchors.fill: parent - source: miniPhoto - visible: miniPhoto.status === Image.Ready && miniPhoto.source !== "" - maskEnabled: true - maskSource: miniMask - maskThresholdMin: 0.5 - maskSpreadAtMin: 1.0 + source: miniAvatarCircle.miniCandidates.length > 0 ? miniAvatarCircle.miniCandidates[0] : "" + fillMode: Image.PreserveAspectCrop + smooth: true + visible: status === Image.Ready + layer.enabled: true + layer.effect: MultiEffect { + maskEnabled: true + maskSource: miniMask + } + onStatusChanged: { + if (status === Image.Error && miniAvatarCircle.miniAttempt < miniAvatarCircle.miniCandidates.length - 1) { + miniAvatarCircle.miniAttempt++ + miniPhoto.source = miniAvatarCircle.miniCandidates[miniAvatarCircle.miniAttempt] + } + } } Image { @@ -113,7 +154,7 @@ Item { height: parent.height * 0.70 source: Qt.resolvedUrl("../Assets/User.svg") fillMode: Image.PreserveAspectFit - visible: miniPhoto.status !== Image.Ready || miniPhoto.source === "" + visible: miniPhoto.status !== Image.Ready opacity: 0.80 } } @@ -123,6 +164,8 @@ Item { anchors.verticalCenter: parent.verticalCenter text: userSwitcher.selectedName color: "#ffffff" + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.40) font.pointSize: root.font.pointSize * 0.82 font.family: root.font.family } @@ -176,10 +219,10 @@ Item { } background: Rectangle { - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : 16 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 1.2 color: config.BackgroundColor border.color: Qt.rgba(1, 1, 1, 0.18) - border.width: 1 + border.width: root.font.pointSize * 0.08 } // Fejléc @@ -199,7 +242,7 @@ Item { // Elválasztó vonal Rectangle { width: parent.width - height: 1 + height: root.font.pointSize * 0.08 color: Qt.rgba(1, 1, 1, 0.12) } @@ -210,7 +253,7 @@ Item { height: Math.min(contentHeight, root.font.pointSize * 22) model: userModel clip: true - spacing: 2 + spacing: root.font.pointSize * 0.15 boundsBehavior: Flickable.StopAtBounds ScrollIndicator.vertical: ScrollIndicator { } @@ -219,7 +262,7 @@ Item { id: delegateRect width: userList.width height: root.font.pointSize * 4 - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 2 : 8 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 2 : root.font.pointSize * 0.6 // Kiemelés: aktív felhasználó property bool isActive: index === userSwitcher.selectedIndex @@ -247,17 +290,9 @@ Item { color: Qt.rgba(0.12, 0.12, 0.20, 0.80) anchors.verticalCenter: parent.verticalCenter - property string iconPath: userSwitcher.getUserIcon(index) + property var delegateCandidates: userSwitcher.resolveUserIcon(index) + property int delegateAttempt: 0 - Image { - id: delegatePhoto - anchors.fill: parent - source: parent.iconPath - fillMode: Image.PreserveAspectCrop - smooth: true - visible: false - } - Item { id: delegateMask anchors.fill: parent @@ -269,15 +304,25 @@ Item { color: "black" } } - - MultiEffect { + + Image { + id: delegatePhoto anchors.fill: parent - source: delegatePhoto - visible: delegatePhoto.status === Image.Ready && parent.iconPath !== "" - maskEnabled: true - maskSource: delegateMask - maskThresholdMin: 0.5 - maskSpreadAtMin: 1.0 + source: delegateAvatarCircle.delegateCandidates.length > 0 ? delegateAvatarCircle.delegateCandidates[0] : "" + fillMode: Image.PreserveAspectCrop + smooth: true + visible: status === Image.Ready + layer.enabled: true + layer.effect: MultiEffect { + maskEnabled: true + maskSource: delegateMask + } + onStatusChanged: { + if (status === Image.Error && delegateAvatarCircle.delegateAttempt < delegateAvatarCircle.delegateCandidates.length - 1) { + delegateAvatarCircle.delegateAttempt++ + delegatePhoto.source = delegateAvatarCircle.delegateCandidates[delegateAvatarCircle.delegateAttempt] + } + } } Image { @@ -286,7 +331,7 @@ Item { height: parent.height * 0.65 source: Qt.resolvedUrl("../Assets/User.svg") fillMode: Image.PreserveAspectFit - visible: delegatePhoto.status !== Image.Ready || parent.iconPath === "" + visible: delegatePhoto.status !== Image.Ready opacity: 0.75 } } @@ -305,13 +350,13 @@ Item { // Aktív jelző csík a bal oldalon Rectangle { visible: delegateRect.isActive - width: 3 + width: root.font.pointSize * 0.23 height: parent.height * 0.55 - radius: 2 + radius: root.font.pointSize * 0.15 color: Qt.rgba(74/255, 222/255, 128/255, 0.90) anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left - anchors.leftMargin: 2 + anchors.leftMargin: root.font.pointSize * 0.15 } MouseArea { diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/VirtualKeyboard.qml b/raveos-sddm-theme/sddm-rave-theme/Components/VirtualKeyboard.qml index b7b7a0f..a0682e0 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/VirtualKeyboard.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/VirtualKeyboard.qml @@ -1,6 +1,6 @@ import QtQuick 2.15 -import QtQuick.VirtualKeyboard -import QtQuick.VirtualKeyboard.Settings +import QtQuick.VirtualKeyboard 6.5 +import QtQuick.VirtualKeyboard.Settings 6.5 InputPanel { id: virtualKeyboard diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/VirtualKeyboardButton.qml b/raveos-sddm-theme/sddm-rave-theme/Components/VirtualKeyboardButton.qml index 90a52b8..f109dd1 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/VirtualKeyboardButton.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/VirtualKeyboardButton.qml @@ -6,10 +6,14 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 Item { + width: parent.width + height: root.font.pointSize * 1.8 + Button { id: virtualKeyboardButton anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter z: 1 focusPolicy: Qt.TabFocus @@ -32,20 +36,31 @@ Item { text: config.TranslateVirtualKeyboardButtonOff || "Virtual Keyboard (off)" font.pointSize: root.font.pointSize * 0.8 font.family: root.font.family + style: Text.Raised + styleColor: Qt.rgba(0, 0, 0, 0.40) color: parent.visualFocus ? config.HoverVirtualKeyboardButtonTextColor : config.VirtualKeyboardButtonTextColor } - background: Rectangle { - id: virtualKeyboardButtonBackground + background: Item { + Rectangle { + anchors.fill: parent + anchors.topMargin: root.font.pointSize * 0.10 + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + color: Qt.rgba(0, 0, 0, 0.20) + } + + Rectangle { + id: virtualKeyboardButtonBackground - anchors.fill: parent - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : 10 - color: virtualKeyboardButton.down ? Qt.rgba(1, 1, 1, 0.12) : (virtualKeyboardButton.hovered ? Qt.rgba(1, 1, 1, 0.08) : Qt.rgba(1, 1, 1, 0.04)) - border.color: virtualKeyboardButton.visualFocus ? Qt.rgba(1, 1, 1, 0.60) : (virtualKeyboardButton.hovered ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.18)) - border.width: virtualKeyboardButton.visualFocus ? 1.5 : 1 + anchors.fill: parent + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 0.8 + color: virtualKeyboardButton.down ? Qt.rgba(1, 1, 1, 0.20) : (virtualKeyboardButton.hovered ? Qt.rgba(1, 1, 1, 0.14) : Qt.rgba(1, 1, 1, 0.08)) + border.color: virtualKeyboardButton.visualFocus ? Qt.rgba(1, 1, 1, 0.70) : (virtualKeyboardButton.hovered ? Qt.rgba(1, 1, 1, 0.40) : Qt.rgba(1, 1, 1, 0.22)) + border.width: virtualKeyboardButton.visualFocus ? root.font.pointSize * 0.12 : root.font.pointSize * 0.08 - Behavior on color { ColorAnimation { duration: 150 } } - Behavior on border.color { ColorAnimation { duration: 150 } } + Behavior on color { ColorAnimation { duration: 150 } } + Behavior on border.color { ColorAnimation { duration: 150 } } + } } states: [ State { diff --git a/raveos-sddm-theme/sddm-rave-theme/Main.qml b/raveos-sddm-theme/sddm-rave-theme/Main.qml index 00837d2..cb50ce9 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Main.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Main.qml @@ -1,13 +1,13 @@ // Config created by gabeszm https://git.rp1.hu/gabeszm/sddm-rave-theme -// Copyright (C) 2022-2025 gabeszm +// Copyright (C) 2026 gabeszm // Based on https://github.com/MarianArlt/sddm-sugar-dark // Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html import QtQuick 2.15 -import QtQuick.Layouts 1.15 +import QtQuick.Layouts 6.5 import QtQuick.Controls 2.15 -import QtQuick.Effects -import QtMultimedia +import QtQuick.Effects 6.5 +import QtMultimedia 6.5 import "Components" @@ -15,7 +15,7 @@ Pane { id: root height: config.ScreenHeight || Screen.height - width: config.ScreenWidth || Screen.ScreenWidth + width: config.ScreenWidth || Screen.width padding: config.ScreenPadding LayoutMirroring.enabled: config.RightToLeftLayout == "true" ? true : Qt.application.layoutDirection === Qt.RightToLeft @@ -31,6 +31,9 @@ Pane { focus: true + readonly property real formPadding: root.font.pointSize * 2.8 + readonly property real borderInset: root.font.pointSize * 0.20 + property bool leftleft: config.HaveFormBackground == "true" && config.PartialBlur == "false" && config.FormPosition == "left" && @@ -73,13 +76,13 @@ Pane { Canvas { id: animatedBorder - width: form.width / 2 + 60 + 6 - height: form.height + 60 + 6 + width: form.width + formPadding + borderInset * 2 + height: form.height + formPadding + borderInset * 2 anchors.centerIn: form z: 3 property real angle: 0 - property real radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : 20 + property real radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 1.5 onAngleChanged: requestPaint() @@ -89,10 +92,10 @@ Pane { ctx.clearRect(0, 0, width, height); var r = radius; - var x = 3; - var y = 3; - var w = width - 6; - var h = height - 6; + var x = borderInset; + var y = borderInset; + var w = width - borderInset * 2; + var h = height - borderInset * 2; ctx.beginPath(); ctx.arc(x + r, y + r, r, Math.PI, 1.5 * Math.PI); @@ -109,12 +112,12 @@ Pane { ctx.rotate(angle); var grad = ctx.createLinearGradient(-width / 2, -height / 2, width / 2, height / 2); - grad.addColorStop(0, "rgba(255, 255, 255, 0.45)"); - grad.addColorStop(0.5, "rgba(255, 255, 255, 0.12)"); - grad.addColorStop(1, "rgba(255, 255, 255, 0.45)"); + grad.addColorStop(0, "rgba(255, 255, 255, 0.65)"); + grad.addColorStop(0.5, "rgba(255, 255, 255, 0.15)"); + grad.addColorStop(1, "rgba(255, 255, 255, 0.65)"); ctx.strokeStyle = grad; - ctx.lineWidth = 2; + ctx.lineWidth = root.font.pointSize * 0.15; ctx.stroke(); ctx.restore(); } @@ -136,26 +139,34 @@ Pane { Rectangle { id: formBackground - width: form.width / 2 + 60 - height: form.height + 60 + width: form.width + formPadding + height: form.height + formPadding anchors.centerIn: form z: 4 - color: Qt.rgba(1, 1, 1, 0.08) - border.color: Qt.rgba(1, 1, 1, 0.18) - border.width: 1 - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : 20 - visible: true + radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : root.font.pointSize * 1.5 + border.color: Qt.rgba(1, 1, 1, 0.45) + border.width: Math.max(1, root.font.pointSize * 0.08) + clip: true + + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.rgba(1, 1, 1, 0.28) } + GradientStop { position: 0.4; color: Qt.rgba(1, 1, 1, 0.16) } + GradientStop { position: 1.0; color: Qt.rgba(1, 1, 1, 0.22) } + } } LoginForm { id: form - height: implicitHeight - width: parent.width / 2.5 + height: Math.min(implicitHeight, parent.height - formPadding) + width: Math.min(Math.max(parent.width * 0.22, root.font.pointSize * 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 anchors.horizontalCenter: config.FormPosition == "center" ? parent.horizontalCenter : undefined anchors.right: config.FormPosition == "right" ? parent.right : undefined + anchors.rightMargin: config.FormPosition == "right" ? parent.width * 0.18 : 0 anchors.verticalCenter: parent.verticalCenter z: 5 } @@ -323,42 +334,44 @@ Pane { ShaderEffectSource { id: blurMask - height: form.height + 60 - width: form.width / 2 + 60 + height: formBackground.height + width: formBackground.width anchors.centerIn: form sourceItem: backgroundImage - sourceRect: Qt.rect(x,y,width,height) - visible: true + sourceRect: Qt.rect(formBackground.x, formBackground.y, formBackground.width, formBackground.height) + live: true + visible: false } - ShaderEffectSource { + Item { id: blurMaskItem + width: formBackground.width + height: formBackground.height + visible: false + layer.enabled: true - sourceItem: Rectangle { - width: blurMask.width - height: blurMask.height - radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) : 20 + Rectangle { + anchors.fill: parent + radius: formBackground.radius color: "black" } - hideSource: true - visible: false } MultiEffect { id: blur z: 2 - height: config.FullBlur == "true" ? parent.height : blurMask.height - width: config.FullBlur == "true" ? parent.width : blurMask.width + height: config.FullBlur == "true" ? parent.height : formBackground.height + width: config.FullBlur == "true" ? parent.width : formBackground.width anchors.centerIn: config.FullBlur == "true" ? backgroundImage : form source: config.FullBlur == "true" ? backgroundImage : blurMask blurEnabled: true autoPaddingEnabled: false - blur: config.Blur == "" ? 2.5 : config.Blur - blurMax: config.BlurMax == "" ? 48 : config.BlurMax - visible: true + blur: config.Blur !== "" ? parseFloat(config.Blur) : 1.0 + blurMax: config.BlurMax !== "" ? parseInt(config.BlurMax) : 48 + visible: config.PartialBlur != "false" maskEnabled: config.FullBlur == "true" ? false : true maskSource: blurMaskItem diff --git a/raveos-sddm-theme/sddm-rave-theme/Themes/rave.conf b/raveos-sddm-theme/sddm-rave-theme/Themes/rave.conf index 372cc23..d73c476 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Themes/rave.conf +++ b/raveos-sddm-theme/sddm-rave-theme/Themes/rave.conf @@ -1,20 +1,24 @@ [General] #################### General #################### -ScreenWidth="1920" -ScreenHeight="1080" +ScreenWidth="" +ScreenHeight="" ScreenPadding="" Logo="Themes/logo.png" # Default 0, Options: from 0 to min(screen width/2,screen height/2). +UserAvatar="" +# Optional path to a specific user avatar image (e.g. "/usr/share/sddm/faces/user.face.icon" or relative to theme) +DefaultAvatar="" +# Fallback avatar when no user-specific avatar is found. Font="Open Sans" -FontSize="13" +FontSize="" # Default is screen height divided by 80 (1080/80=13.5), Options: 0-inf. KeyboardSize="0.4" # Default 0.4, Options 0.1-1.0 -RoundCorners="20" +RoundCorners="" Locale="hu" # Locale for data and time format. I suggest leaving it blank. @@ -66,7 +70,7 @@ HeaderTextColor="#ffffff" DateTextColor="#ffffff" TimeTextColor="#ffffff" -FormBackgroundColor="#21222C" +FormBackgroundColor="#30ffffff" BackgroundColor="#21222C" DimBackgroundColor="#21222C" @@ -107,11 +111,11 @@ PartialBlur="true" FullBlur="" # Default false. # If you use FullBlur I recommend setting BlurMax to 64 and Blur to 1.0. -BlurMax="" -# Default 48, Options: 2-64 (can go higher because depends on Blur). +BlurMax="48" +# Default 48, Options: 2-64. # Connected with: Blur. -Blur="" -# Default 2.0, Options: 0.0-3.0 (without 3.0). +Blur="1.0" +# Default 1.0, Options: 0.0-1.0. # Connected with: BlurMax. HaveFormBackground="false" |