From 4f7b3b21e97b99b372b43b314888d42be5f995f9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 8 Nov 2024 08:50:49 +0000 Subject: x11-themes/redcore-theme-sddm : fix overlapping users --- .../files/redcore/Components/UserList.qml | 2 +- .../files/redcore/Components/UserPanel.qml | 6 +-- .../redcore-theme-sddm/files/redcore/Main.qml | 55 +++++++++++++++------ .../redcore-theme-sddm/files/redcore/preview.png | Bin 12966612 -> 2680258 bytes 4 files changed, 45 insertions(+), 18 deletions(-) (limited to 'x11-themes/redcore-theme-sddm/files') diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/UserList.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/UserList.qml index d5437224..22241310 100644 --- a/x11-themes/redcore-theme-sddm/files/redcore/Components/UserList.qml +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/UserList.qml @@ -63,7 +63,7 @@ Rectangle { if (icon.status == Image.Error) icon.source = "../user-192.png" else - "/var/lib/AccountsService/icons/" + name + icon.source = "../user-192.png" } x: 12 diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/UserPanel.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/UserPanel.qml index 24ca7bb0..0b3a5643 100644 --- a/x11-themes/redcore-theme-sddm/files/redcore/Components/UserPanel.qml +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/UserPanel.qml @@ -43,8 +43,8 @@ FocusScope { Image { id: icon - width: 192 - height: 192 + width: 128 + height: 128 smooth: true visible: false @@ -52,7 +52,7 @@ FocusScope { if (icon.status == Image.Error) icon.source = "../user-192.png" else - "/var/lib/AccountsService/icons/" + name + icon.source = "../user-192.png" } x: -(icon.width / 2) diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Main.qml b/x11-themes/redcore-theme-sddm/files/redcore/Main.qml index 7f2387d9..a850fc51 100644 --- a/x11-themes/redcore-theme-sddm/files/redcore/Main.qml +++ b/x11-themes/redcore-theme-sddm/files/redcore/Main.qml @@ -67,7 +67,7 @@ Item { FontLoader { id: localsys - source: "/usr/local/share/fonts/s/SegMDL2.ttf" + source: Qt.resolvedUrl("fonts/SegMDL2.ttf") } Text { @@ -393,7 +393,7 @@ Item { UserList { id: userList name: (model.realName === "") ? model.name : model.realName - icon: "/var/lib/AccountsService/icons/" + name + icon: "../user-192.png" anchors { horizontalCenter: parent.horizontalCenter @@ -412,7 +412,7 @@ Item { } Rectangle { - width: 150 + width: 255 height: listView2.count > 17 ? Screen.height - 68 : 58 * listView2.count color: "transparent" clip: true @@ -486,13 +486,32 @@ Item { Item { - Component { - id: userDelegate - - UserPanel { - anchors.centerIn: parent - name: (model.realName === "") ? model.name : model.realName - icon: "/var/lib/AccountsService/icons/" + name + Component { + id: userDelegate + + Item { + width: parent.width + height: selected ? 100 : 70 + anchors.horizontalCenter: parent.horizontalCenter + property bool selected: ListView.isCurrentItem + + Rectangle { + width: parent.width + height: parent.height + color: selected ? "#ffffff10" : "transparent" + + UserPanel { + anchors.centerIn: parent + name: (model.realName === "") ? model.name : model.realName + icon: "../user-192.png" + } + + Rectangle { + anchors.fill: parent + color: selected ? "#00ff00" : "transparent" + z: -1 + } + } } } @@ -503,22 +522,30 @@ Item { visible: false } - ListView { + ListView { id: listView focus: true model: userModel delegate: userDelegate currentIndex: userModel.lastIndex interactive: false + orientation: ListView.Vertical + spacing: 5 + + onCurrentIndexChanged: { + if (listView.currentItem) { + listView.currentItem.selected = true; + } + } anchors { left: prevUser.right right: nextUser.left } - } + } - Button { - id: nextUser + Button { + id: nextUser anchors.right: parent.right enabled: false visible: false diff --git a/x11-themes/redcore-theme-sddm/files/redcore/preview.png b/x11-themes/redcore-theme-sddm/files/redcore/preview.png index 196752c8..0632e710 100644 Binary files a/x11-themes/redcore-theme-sddm/files/redcore/preview.png and b/x11-themes/redcore-theme-sddm/files/redcore/preview.png differ -- cgit v1.2.3