From f0bfc317968d5f4cc27c5eb0a608e13c11b6cbd0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 7 Nov 2024 18:08:45 +0000 Subject: x11-themes/redcore-theme-sddm : revision bump --- .../x11-themes/redcore-theme-sddm-1.314.1337-r1 | 7 - .../x11-themes/redcore-theme-sddm-1.314.1337-r2 | 7 + metadata/pkg_desc_index | 2 +- .../files/redcore/Background.qml | 56 - .../files/redcore/Components/CapsOn.qml | 21 + .../files/redcore/Components/FalsePass.qml | 168 +++ .../files/redcore/Components/LayoutPanel.qml | 213 ++++ .../files/redcore/Components/LoginBg.qml | 53 + .../files/redcore/Components/LoginButton.qml | 35 + .../files/redcore/Components/PasswordField.qml | 35 + .../files/redcore/Components/PasswordFieldPin.qml | 35 + .../files/redcore/Components/PowerPanel.qml | 390 +++++++ .../files/redcore/Components/RevealButton.qml | 68 ++ .../files/redcore/Components/SessionPanel.qml | 354 +++++++ .../files/redcore/Components/TruePass.qml | 787 ++++++++++++++ .../files/redcore/Components/UserList.qml | 113 ++ .../files/redcore/Components/UserPanel.qml | 1092 ++++++++++++++++++++ .../files/redcore/KeyboardButton.qml | 61 -- .../redcore-theme-sddm/files/redcore/Login.qml | 156 --- .../redcore-theme-sddm/files/redcore/Main.qml | 860 ++++++++------- .../redcore-theme-sddm/files/redcore/Messages.sh | 2 - .../files/redcore/SessionButton.qml | 55 - .../files/redcore/faces/.face.icon | 14 - .../files/redcore/fonts/SegMDL2.ttf | Bin 0 -> 203656 bytes .../files/redcore/fonts/SegoeBoot-Semilight.woff | Bin 0 -> 41404 bytes .../files/redcore/fonts/segoeui.ttf | Bin 0 -> 926016 bytes .../files/redcore/fonts/segoeuil.ttf | Bin 0 -> 879172 bytes .../files/redcore/metadata.desktop | 20 +- .../redcore-theme-sddm/files/redcore/preview.png | Bin 0 -> 12966612 bytes .../files/redcore/redcore-weblink.svg | 15 - .../redcore-theme-sddm/files/redcore/theme.conf | 10 +- .../redcore-theme-sddm/files/redcore/user-192.png | Bin 0 -> 2392 bytes .../redcore-theme-sddm-1.314.1337-r1.ebuild | 22 - .../redcore-theme-sddm-1.314.1337-r2.ebuild | 22 + 34 files changed, 3831 insertions(+), 842 deletions(-) delete mode 100644 metadata/md5-cache/x11-themes/redcore-theme-sddm-1.314.1337-r1 create mode 100644 metadata/md5-cache/x11-themes/redcore-theme-sddm-1.314.1337-r2 delete mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Background.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/CapsOn.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/FalsePass.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/LayoutPanel.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/LoginBg.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/LoginButton.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/PasswordField.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/PasswordFieldPin.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/PowerPanel.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/RevealButton.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/SessionPanel.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/TruePass.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/UserList.qml create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Components/UserPanel.qml delete mode 100644 x11-themes/redcore-theme-sddm/files/redcore/KeyboardButton.qml delete mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Login.qml delete mode 100644 x11-themes/redcore-theme-sddm/files/redcore/Messages.sh delete mode 100644 x11-themes/redcore-theme-sddm/files/redcore/SessionButton.qml delete mode 100644 x11-themes/redcore-theme-sddm/files/redcore/faces/.face.icon create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/fonts/SegMDL2.ttf create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/fonts/SegoeBoot-Semilight.woff create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/fonts/segoeui.ttf create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/fonts/segoeuil.ttf create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/preview.png delete mode 100644 x11-themes/redcore-theme-sddm/files/redcore/redcore-weblink.svg create mode 100644 x11-themes/redcore-theme-sddm/files/redcore/user-192.png delete mode 100644 x11-themes/redcore-theme-sddm/redcore-theme-sddm-1.314.1337-r1.ebuild create mode 100644 x11-themes/redcore-theme-sddm/redcore-theme-sddm-1.314.1337-r2.ebuild diff --git a/metadata/md5-cache/x11-themes/redcore-theme-sddm-1.314.1337-r1 b/metadata/md5-cache/x11-themes/redcore-theme-sddm-1.314.1337-r1 deleted file mode 100644 index 23cd2b8f..00000000 --- a/metadata/md5-cache/x11-themes/redcore-theme-sddm-1.314.1337-r1 +++ /dev/null @@ -1,7 +0,0 @@ -DEFINED_PHASES=install -DESCRIPTION=Redcore Linux SDDM Theme -EAPI=7 -KEYWORDS=amd64 x86 -LICENSE=CC-BY-SA -SLOT=0 -_md5_=481c083633b8b8326bdca26b91662515 diff --git a/metadata/md5-cache/x11-themes/redcore-theme-sddm-1.314.1337-r2 b/metadata/md5-cache/x11-themes/redcore-theme-sddm-1.314.1337-r2 new file mode 100644 index 00000000..23cd2b8f --- /dev/null +++ b/metadata/md5-cache/x11-themes/redcore-theme-sddm-1.314.1337-r2 @@ -0,0 +1,7 @@ +DEFINED_PHASES=install +DESCRIPTION=Redcore Linux SDDM Theme +EAPI=7 +KEYWORDS=amd64 x86 +LICENSE=CC-BY-SA +SLOT=0 +_md5_=481c083633b8b8326bdca26b91662515 diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index ad370b36..fb6ef63b 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -97,5 +97,5 @@ x11-themes/redcore-artwork-core 1.314.1337-r1: Offical Redcore Linux Core Artwor x11-themes/redcore-artwork-grub 1.314.1337-r1: Redcore Linux GRUB2 Images x11-themes/redcore-theme 1.314.1337-r1: Official Redcore Linux GTK theme x11-themes/redcore-theme-lxqt 1.314.1337: Official Redcore Linux LXQT theme -x11-themes/redcore-theme-sddm 1.314.1337-r1: Redcore Linux SDDM Theme +x11-themes/redcore-theme-sddm 1.314.1337-r2: Redcore Linux SDDM Theme x11-wm/qtile-meta 1-r7: Meta ebuild for Qtile, a hackable tiling window manager written in Python diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Background.qml b/x11-themes/redcore-theme-sddm/files/redcore/Background.qml deleted file mode 100644 index 6721e57f..00000000 --- a/x11-themes/redcore-theme-sddm/files/redcore/Background.qml +++ /dev/null @@ -1,56 +0,0 @@ -/* - SPDX-FileCopyrightText: 2016 Boudhayan Gupta - - SPDX-License-Identifier: LGPL-2.0-or-later -*/ - -import QtQuick 2.15 - -FocusScope { - id: sceneBackground - - property var sceneBackgroundType - property alias sceneBackgroundColor: sceneColorBackground.color - property alias sceneBackgroundImage: sceneImageBackground.source - - Rectangle { - id: sceneColorBackground - anchors.fill: parent - } - - Image { - id: sceneImageBackground - anchors.fill: parent - sourceSize.width: parent.width - sourceSize.height: parent.height - fillMode: Image.PreserveAspectCrop - smooth: true; - } - - states: [ - State { - name: "imageBackground" - when: sceneBackgroundType === "image" - PropertyChanges { - target: sceneColorBackground - visible: false - } - PropertyChanges { - target: sceneImageBackground - visible: true - } - }, - State { - name: "colorBackground" - when: sceneBackgroundType !== "image" - PropertyChanges { - target: sceneColorBackground - visible: true - } - PropertyChanges { - target: sceneImageBackground - visible: false - } - } - ] -} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/CapsOn.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/CapsOn.qml new file mode 100644 index 00000000..64578872 --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/CapsOn.qml @@ -0,0 +1,21 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Rectangle { + id: capsButton + + color: "transparent" + + x: -50 + + Text { + color: "white" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + text: "Caps Lock is on" + renderType: Text.NativeRendering + font.weight: Font.Bold + font.pointSize: 12 + } +} + + diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/FalsePass.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/FalsePass.qml new file mode 100644 index 00000000..026a89c4 --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/FalsePass.qml @@ -0,0 +1,168 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +FocusScope { + + Text { + id: falseText + text: "The password is incorrect. Try again." + color: "white" + font.pointSize: 11 + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + renderType: Text.NativeRendering + x: -falseText.width / 2 + } + + Button { + id: falseButton + hoverEnabled: true + width: 120 + height: 33 + + x: 1 + y: 1 + + Text { + color: "white" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + text: "OK" + renderType: Text.NativeRendering + font.pointSize: 11 + anchors.centerIn: parent + } + + anchors { + horizontalCenter: parent.horizontalCenter + topMargin: 25 + top: falseText.bottom + } + + background: Rectangle { + id: falseButtonBackground + color: "#35FFFFFF" + border.color: "#35FFFFFF" + border.width: 2 + } + + states: [ + State { + name: "1hovered" + when: falseButton.hovered + PropertyChanges { + target: falseButtonBackground + border.color: "#90FFFFFF" + } + }, + State { + name: "2hovered" + when: falseBg.hovered + PropertyChanges { + target: falseButtonBackground + border.color: "#90FFFFFF" + } + }, + State { + name: "3hovered" + when: falseBg2.hovered + PropertyChanges { + target: falseButtonBackground + border.color: "#90FFFFFF" + } + } + ] + + Button { + id: falseBg + hoverEnabled: true + width: 122 + height: 35 + + x: -1 + y: -1 + + background: Rectangle { + id: bgBackground + color: "transparent" + border.color: "black" + border.width: 1 + } + } + + Button { + id: falseBg2 + hoverEnabled: true + focus: true + + x: -3 + y: -3 + + width: 126 + height: 39 + + background: Rectangle { + id: bg2Background + color: "transparent" + border.color: "white" + border.width: 2 + } + + onClicked: { + falsePass.visible = false + + passwordField.visible = config.PinMode === "off" ? true : false + passwordField.enabled = config.PinMode === "off" ? true : false + passwordField.focus = config.PinMode === "off" ? true : false + + passwordFieldPin.visible = config.PinMode === "off" ? false : true + passwordFieldPin.enabled = config.PinMode === "off" ? false : true + passwordFieldPin.focus = config.PinMode === "off" ? false : true + + leftPanel.visible = listView2.count > 1 ? true : false + rightPanel.visible = true + + passwordField.text = "" + + passwordFieldPin.text = "" + } + + Keys.onReturnPressed: { + falsePass.visible = false + + passwordField.visible = config.PinMode === "off" ? true : false + passwordField.enabled = config.PinMode === "off" ? true : false + passwordField.focus = config.PinMode === "off" ? true : false + + passwordFieldPin.visible = config.PinMode === "off" ? false : true + passwordFieldPin.enabled = config.PinMode === "off" ? false : true + passwordFieldPin.focus = config.PinMode === "off" ? false : true + + leftPanel.visible = listView2.count > 1 ? true : false + rightPanel.visible = true + + passwordField.text = "" + + passwordFieldPin.text = "" + } + + Keys.onEnterPressed: { + falsePass.visible = false + + passwordField.visible = config.PinMode === "off" ? true : false + passwordField.enabled = config.PinMode === "off" ? true : false + passwordField.focus = config.PinMode === "off" ? true : false + + passwordFieldPin.visible = config.PinMode === "off" ? false : true + passwordFieldPin.enabled = config.PinMode === "off" ? false : true + passwordFieldPin.focus = config.PinMode === "off" ? false : true + + leftPanel.visible = listView2.count > 1 ? true : false + rightPanel.visible = true + + passwordField.text = "" + + passwordFieldPin.text = "" + } + } + } +} + diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/LayoutPanel.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/LayoutPanel.qml new file mode 100644 index 00000000..f2cd9188 --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/LayoutPanel.qml @@ -0,0 +1,213 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Item { + implicitHeight: layoutButton.height + implicitWidth: layoutButton.width + + signal valueChanged(int id) + + // This gives an error but works, applying what the error says causes it to not work so this stays like that for a while. + onValueChanged: { + keyboard.currentLayout = id + } + + DelegateModel { + id: layoutWrapper + + model: keyboard.layouts + delegate: ItemDelegate { + id: layoutEntry + width: parent.width + height: 34 + highlighted: layoutList.currentIndex == index + + contentItem: Text { + renderType: Text.NativeRendering + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.pointSize: 10 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + color: "white" + text: modelData.longName + } + + background: Rectangle { + id: layoutEntryBackground + color: "transparent" + } + + states: [ + State { + name: "focused" + when: layoutEntry.focus + PropertyChanges { + target: layoutEntryBackground + color: config.color + } + }, + + State { + name: "hovered" + when: layoutEntry.hovered + PropertyChanges { + target: layoutEntryBackground + color: "#343434" + } + } + ] + + MouseArea { + anchors.fill: parent + + onPressed: { + layoutEntryBackground.color = "#35FFFFFF" + } + + onReleased: { + if (layoutEntry.focus) { + layoutEntryBackground.color = config.color + } + else { + layoutEntryBackground.color = "#1E1E1E" + } + } + + onClicked: { + layoutList.currentIndex = index + layoutPopup.close() + valueChanged(layoutList.currentIndex) + } + } + } + } + + Button { + id: layoutButton + height: 50 + width: 50 + hoverEnabled: true + + Text { + color: "white" + text: keyboard.layouts[keyboard.currentLayout].shortName + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.capitalization: Font.AllUppercase + renderType: Text.NativeRendering + font.pointSize: 12 + + anchors { + horizontalCenter: layoutButton.horizontalCenter + verticalCenter: layoutButton.verticalCenter + } + } + + ToolTip { + id: layoutButtonTip + + delay: 1000 + timeout: 4800 + leftPadding: 9 + rightPadding: 9 + topPadding: 7 + bottomPadding: 7 + y: layoutButton.height + 5 + z: 2 + visible: layoutButton.hovered + + contentItem: Text { + text: keyboard.layouts[keyboard.currentLayout].longName + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + renderType: Text.NativeRendering + color: "white" + } + + background: Rectangle { + color: "#2A2A2A" + border.width: 1 + border.color: "#1A1A1A" + } + } + + background: Rectangle { + id: layoutButtonBackground + color: "transparent" + } + + states: [ + State { + name: "pressed" + when: layoutButton.down + PropertyChanges { + target: layoutButtonBackground + color: "#33FFFFFF" + } + }, + State { + name: "hovered" + when: layoutButton.hovered + PropertyChanges { + target: layoutButtonBackground + color: "#1AFFFFFF" + } + }, + State { + name: "selection" + when: layoutPopup.visible + PropertyChanges { + target: layoutButtonBackground + color: "transparent" + } + } + ] + + onClicked: { + layoutPopup.visible ? layoutPopup.close() : layoutPopup.open() + layoutPopup.visible === layoutPopup.open ; layoutButton.state = "selection" + layoutButtonTip.hide() + } + } + + Popup { + id: layoutPopup + width: 121 + x: Math.round((parent.width - width) / 2) + y: Math.round(-layoutButton.height -(layoutPopup.height) + 45) + topPadding: 5 + bottomPadding: 5 + leftPadding: 0 + rightPadding: 0 + + background: Rectangle { + color: "#1E1E1E" + } + + contentItem: ListView { + id: layoutList + implicitHeight: contentHeight + model: layoutWrapper + currentIndex: keyboard.currentLayout + clip: true + interactive: false + } + + enter: Transition { + NumberAnimation { + property: "opacity" + from: 0 + to: 1 + easing.type: Easing.OutCirc + } + } + + exit: Transition { + NumberAnimation { + property: "opacity" + from: 1 + to: 0 + easing.type: Easing.OutCirc + } + } + } +} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/LoginBg.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/LoginBg.qml new file mode 100644 index 00000000..6b190804 --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/LoginBg.qml @@ -0,0 +1,53 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Button { + id: loginBg + hoverEnabled: true + width: 0 + height: 0 + + background: Rectangle { + id: loginbgBackground + width: 293 + height: 36 + x: -2 + y: -2 + color: "transparent" + border.color: "#70FFFFFF" + border.width: 2 + } + + states: [ + State { + name: "hovered" + when: loginButton.hovered + PropertyChanges { + target: loginbgBackground + border.color: "#FFFFFF" + width: loginbgBackground.width + height: loginbgBackground.height + } + }, + + State { + when: revealButton.hovered + PropertyChanges { + target: loginbgBackground + border.color: "#FFFFFF" + width: loginbgBackground.width + height: loginbgBackground.height + } + }, + + State { + when: passwordField.hovered + PropertyChanges { + target: loginbgBackground + border.color: "#FFFFFF" + width: loginbgBackground.width + height: loginbgBackground.height + } + } + ] +} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/LoginButton.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/LoginButton.qml new file mode 100644 index 00000000..8cd15cb5 --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/LoginButton.qml @@ -0,0 +1,35 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Button { + id: loginButton + hoverEnabled: true + width: 31 + height: 32 + x: passwordField.width + + Text { + color: "white" + text: String.fromCodePoint(0xebe7) + font.family: Qt.resolvedUrl("../fonts") ? "Segoe MDL2 Assets" : iconfont.name + font.pointSize: 13 + renderType: Text.NativeRendering + anchors.centerIn: parent + } + + background: Rectangle { + id: loginbuttonBackground + color: "#35FFFFFF" + } + + states: [ + State { + name: "pressed" + when: loginButton.down + PropertyChanges { + target: loginbuttonBackground + color: "#75FFFFFF" + } + } + ] +} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/PasswordField.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/PasswordField.qml new file mode 100644 index 00000000..076b8189 --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/PasswordField.qml @@ -0,0 +1,35 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +TextField { + id: passwordField + focus: true + visible: true + selectByMouse: true + placeholderText: "Password" + + property alias text: passwordField.text + + echoMode: TextInput.Password ? TextInput.Password : TextInput.Normal + selectionColor: config.color + + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.pointSize: 10.9 + renderType: Text.NativeRendering + + color: "black" + + x: 3 + + horizontalAlignment: TextInput.AlignLeft + width: 258 + height: 32 + + background: Rectangle { + id: passFieldBackground + color: "white" + x: -3 + width: parent.width + height: parent.height + } +} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/PasswordFieldPin.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/PasswordFieldPin.qml new file mode 100644 index 00000000..cae4360a --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/PasswordFieldPin.qml @@ -0,0 +1,35 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +TextField { + id: passwordFieldPin + focus: true + visible: true + selectByMouse: true + placeholderText: "PIN" + + property alias text: passwordFieldPin.text + + echoMode: TextInput.Password ? TextInput.Password : TextInput.Normal + selectionColor: config.color + + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.pointSize: 10.9 + renderType: Text.NativeRendering + + color: "black" + + x: 3 + + horizontalAlignment: TextInput.AlignLeft + width: 289 + height: 32 + + background: Rectangle { + id: passFieldBackgroundPin + color: "white" + x: -3 + width: parent.width + height: parent.height + } +} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/PowerPanel.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/PowerPanel.qml new file mode 100644 index 00000000..0484850f --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/PowerPanel.qml @@ -0,0 +1,390 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Item { + Button { + id: powerButton + height: 50 + width: 50 + hoverEnabled: true + + Text { + color: "white" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe MDL2 Assets" : iconfont.name + text: String.fromCodePoint(0xe7e8) + renderType: Text.NativeRendering + font.pointSize: powerButton.height / 2 + anchors.centerIn: powerButton + } + + ToolTip { + id: powerButtonTip + + delay: 1000 + timeout: 4800 + leftPadding: 9 + rightPadding: 9 + topPadding: 7 + bottomPadding: 7 + y: powerButton.height + 5 + z: 2 + visible: powerButton.hovered + + contentItem: Text { + text: "Power" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + renderType: Text.NativeRendering + color: "white" + } + + background: Rectangle { + color: "#2A2A2A" + border.width: 1 + border.color: "#1A1A1A" + } + } + + background: Rectangle { + id: powerButtonBackground + color: "transparent" + } + + states: [ + State { + name: "pressed" + when: powerButton.down + PropertyChanges { + target: powerButtonBackground + color: "#33FFFFFF" + } + }, + + State { + name: "hovered" + when: powerButton.hovered + PropertyChanges { + target: powerButtonBackground + color: "#1AFFFFFF" + } + }, + + State { + name: "selection" + when: powerPopup.visible + PropertyChanges { + target: powerButtonBackground + color: "transparent" + } + } + ] + + onClicked: { + powerPopup.visible ? powerPopup.close() : powerPopup.open() + powerPopup.visible === powerPopup.open ; powerButton.state = "selection" + powerButtonTip.hide() + } + } + + Popup { + id: powerPopup + width: 125 + height: poweroffButton.height + rebootButton.height + sleepButton.height + 10 + x: Math.round((powerButton.width - width) / 2) - 13 + y: -117 + z: 3 + topPadding: 5 + bottomPadding: 5 + leftPadding: 1 + rightPadding: 1 + background: Rectangle { + color: "#F51F1F1F" + border.width: 1 + border.color: "black" + } + + Button { + id: poweroffButton + width: parent.width + height: 34 + hoverEnabled: true + + ToolTip { + id: poweroffTip + + delay: 1000 + timeout: 4800 + leftPadding: 9 + rightPadding: 9 + topPadding: 7 + bottomPadding: 7 + visible: poweroffButton.hovered + + contentItem: Text { + text: "Closes all apps and turns off the PC." + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + renderType: Text.NativeRendering + color: "white" + } + + background: Rectangle { + color: "#2A2A2A" + border.width: 1 + border.color: "#1A1A1A" + } + } + + background: Rectangle { + id: poweroffButtonBackground + color: "transparent" + border.width: 0 + border.color: "#29292A" + } + + Text { + text: "Shut Down" + color: "white" + + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.pointSize: 10 + leftPadding: 10 + renderType: Text.NativeRendering + + anchors { + left: poweroffIcon.right + verticalCenter: poweroffButton.verticalCenter + } + } + + Text { + id: poweroffIcon + color: "white" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe MDL2 Assets" : iconfont.name + text: String.fromCodePoint(0xe7e8) + renderType: Text.NativeRendering + font.pointSize: 12 + + x: 10 + + anchors { + verticalCenter: poweroffButton.verticalCenter + } + } + + + states: [ + State { + name: "hovered" + when: poweroffButton.hovered + PropertyChanges { + target: poweroffButtonBackground + color: "#30FFFFFF" + border.color: "#60FFFFFF" + border.width: 1 + } + } + ] + + onClicked: sddm.powerOff() + } + + Button { + id: rebootButton + width: parent.width + height: 34 + hoverEnabled: true + + anchors { + horizontalCenter: poweroffButton.horizontalCenter + top: poweroffButton.bottom + } + + background: Rectangle { + id: rebootButtonBackground + color: "transparent" + border.width: 0 + border.color: "#29292A" + } + + Text { + id: rebootText + text: "Restart" + color: "white" + + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.pointSize: 10 + leftPadding: 10 + renderType: Text.NativeRendering + + anchors { + left: rebootIcon.right + verticalCenter: rebootButton.verticalCenter + } + } + + Text { + id: rebootIcon + color: "white" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe MDL2 Assets" : iconfont.name + text: String.fromCodePoint(0xe777) + renderType: Text.NativeRendering + font.pointSize: 12 + + x: 10 + + anchors { + verticalCenter: rebootButton.verticalCenter + } + } + + ToolTip { + id: rebootButtonTip + + delay: 1000 + timeout: 4800 + leftPadding: 9 + rightPadding: 9 + topPadding: 7 + bottomPadding: 7 + visible: rebootButton.hovered + + contentItem: Text { + text: "Closes all apps, turns off the PC, and then turns it on +again." // I had to make it like this, so it's normal, don't touch. + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + renderType: Text.NativeRendering + color: "white" + } + + background: Rectangle { + color: "#2A2A2A" + border.width: 1 + border.color: "#1A1A1A" + } + } + + states: [ + State { + name: "hovered" + when: rebootButton.hovered + PropertyChanges { + target: rebootButtonBackground + color: "#30FFFFFF" + border.color: "#60FFFFFF" + border.width: 1 + } + } + ] + + onClicked: sddm.reboot() + } + + Button { + id: sleepButton + width: parent.width + height: 34 + hoverEnabled: true + + anchors { + horizontalCenter: rebootButton.horizontalCenter + top: rebootButton.bottom + } + + background: Rectangle { + id: sleepButtonBackground + color: "transparent" + border.width: 0 + border.color: "#29292A" + } + + Text { + text: "Sleep" + color: "white" + + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.pointSize: 10 + leftPadding: 10 + renderType: Text.NativeRendering + + anchors { + left: sleepIcon.right + verticalCenter: sleepButton.verticalCenter + } + } + + Text { + id: sleepIcon + color: "white" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe MDL2 Assets" : iconfont.name + text: String.fromCodePoint(0xe708) + renderType: Text.NativeRendering + font.pointSize: 12 + + x: 10 + + anchors { + verticalCenter: sleepButton.verticalCenter + } + } + + ToolTip { + id: sleepButtonTip + + delay: 1000 + timeout: 4800 + leftPadding: 9 + rightPadding: 9 + topPadding: 7 + bottomPadding: 7 + visible: sleepButton.hovered + + contentItem: Text { + text: "The PC stays on but uses low power. Apps stay open so +when the PC wakes up, you're instantly back to where +you left off." // Again, it had to be like this, don't touch. + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + renderType: Text.NativeRendering + color: "white" + } + + background: Rectangle { + color: "#2A2A2A" + border.width: 1 + border.color: "#1A1A1A" + } + } + + states: [ + State { + name: "hovered" + when: sleepButton.hovered + PropertyChanges { + target: sleepButtonBackground + color: "#30FFFFFF" + border.color: "#60FFFFFF" + border.width: 1 + } + } + ] + + onClicked: sddm.suspend() + } + + enter: Transition { + NumberAnimation { + property: "opacity" + from: 0 + to: 1 + easing.type: Easing.OutCirc + } + } + + exit: Transition { + NumberAnimation { + property: "opacity" + from: 1 + to: 0 + easing.type: Easing.OutCirc + } + } + } +} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/RevealButton.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/RevealButton.qml new file mode 100644 index 00000000..9c1afa5d --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/RevealButton.qml @@ -0,0 +1,68 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Button { + id: revealButton + hoverEnabled: true + width: 32 + height: 32 + + x: passwordField.width - loginButton.width + + Text { + id: revealText + color: "black" + text: String.fromCodePoint(0xe18b) + font.family: Qt.resolvedUrl("../fonts") ? "Segoe MDL2 Assets" : iconfont.name + font.pointSize: 10 + renderType: Text.NativeRendering + anchors.centerIn: parent + } + + background: Rectangle { + id: revealButtonBackground + color: "white" + } + + states: [ + State { + name: "on" + when: revealButton.down + PropertyChanges { + target: passwordField + echoMode: TextInput.Normal + } + PropertyChanges { + target: passwordFieldPin + echoMode: TextInput.Normal + } + PropertyChanges { + target: revealButtonBackground + color: config.color + } + PropertyChanges { + target: revealText + color: "white" + } + }, + State { + name: "off" + PropertyChanges { + target: passwordField + echoMode: TextInput.Password + } + PropertyChanges { + target: passwordFieldPin + echoMode: TextInput.Password + } + }, + State { + name: "hovered" + when: revealButton.hovered + PropertyChanges { + target: revealText + color: config.color + } + } + ] +} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/SessionPanel.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/SessionPanel.qml new file mode 100644 index 00000000..49ec000b --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/SessionPanel.qml @@ -0,0 +1,354 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Item { + property int session: sessionList.currentIndex + + implicitHeight: sessionButton.height + implicitWidth: sessionButton.width + + DelegateModel { + id: sessionWrapper + model: sessionModel + delegate: ItemDelegate { + id: sessionEntry + width: parent.width + height: 36 + highlighted: sessionList.currentIndex == index + contentItem: Text { + renderType: Text.NativeRendering + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.pointSize: 10 + verticalAlignment: Text.AlignVCenter + color: "black" + text: name + + Text { + id: offon + text: "Off" + color: "black" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.weight: Font.Bold + font.pointSize: 10 + renderType: Text.NativeRendering + + anchors { + verticalCenter: parent.verticalCenter + bottom: parent.top + bottomMargin: 5 + } + } + + Button { + id: sessionLever + width: 46 + height: 15 + z: 3 + + anchors { + top: parent.bottom + topMargin: 7 + right: parent.right + rightMargin: 7 + } + + background: Rectangle { + id: sessionLeverBackground + color: "#A6A6A6" + border.color: "white" + border.width: 1 + } + + MouseArea { + anchors.fill: parent + + onClicked: { + sessionList.currentIndex = index + } + } + + Button { + id: leftblackLever + width: 12 + height: 19 + + anchors { + verticalCenter: parent.verticalCenter + left: parent.left + leftMargin: -2 + } + + background: Rectangle { + color: "black" + } + + MouseArea { + anchors.fill: parent + + onClicked: { + sessionList.currentIndex = index + } + } + } + + Button { + id: rightblackLever + width: 12 + height: 19 + visible: false + + anchors { + verticalCenter: parent.verticalCenter + right: parent.right + rightMargin: -2 + } + + background: Rectangle { + color: "black" + } + } + + MouseArea { + anchors.fill: parent + + onClicked: { + sessionList.currentIndex = index + } + } + } + + Button { + width: 50 + height: 19 + + anchors { + top: parent.bottom + topMargin: 5 + right: parent.right + rightMargin: 5 + } + + MouseArea { + anchors.fill: parent + + onClicked: { + sessionList.currentIndex = index + } + } + + background: Rectangle { + id: leverBack + color: "#A6A6A6" + } + } + } + + background: Rectangle { + id: sessionEntryBackground + color: "transparent" + } + + states: [ + State { + name: "focused" + when: sessionEntry.focus + PropertyChanges { + target: sessionLeverBackground + color: config.color + } + PropertyChanges { + target: rightblackLever + visible: true + } + PropertyChanges { + target: leftblackLever + visible: false + } + PropertyChanges { + target: offon + text: "On" + } + }, + + State { + name: "hovered" + when: sessionLever.hovered + PropertyChanges { + target: sessionLeverBackground + color: "#B5B5B5" + } + } + ] + } + } + + Button { + id: sessionButton + height: 50 + width: 50 + hoverEnabled: true + + Text { + color: "white" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe MDL2 Assets" : iconfont.name + text: String.fromCodePoint(0xe776) + renderType: Text.NativeRendering + font.pointSize: sessionButton.height / 2 + anchors.centerIn: sessionButton + } + + ToolTip { + id: sessionButtonTip + + delay: 1000 + timeout: 4800 + leftPadding: 9 + rightPadding: 9 + topPadding: 7 + bottomPadding: 7 + y: sessionButton.height + 5 + z: 2 + visible: sessionButton.hovered + + contentItem: Text { + text: "Session" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + renderType: Text.NativeRendering + color: "white" + } + + background: Rectangle { + color: "#2A2A2A" + border.width: 1 + border.color: "#1A1A1A" + } + } + + background: Rectangle { + id: sessionButtonBackground + color: "transparent" + } + + states: [ + State { + name: "pressed" + when: sessionButton.down + PropertyChanges { + target: sessionButtonBackground + color: "#33FFFFFF" + } + }, + + State { + name: "hovered" + when: sessionButton.hovered + PropertyChanges { + target: sessionButtonBackground + color: "#1AFFFFFF" + } + }, + + State { + name: "selection" + when: sessionPopup.visible + PropertyChanges { + target: sessionButtonBackground + color: "transparent" + } + } + ] + + onClicked: { + sessionPopup.visible ? sessionPopup.close() : sessionPopup.open() + sessionPopup.visible === sessionPopup.open ; sessionButton.state = "selection" + sessionButtonTip.hide() + } + } + + Popup { + id: sessionPopup + width: 175 + x: Math.round((parent.width - width) / 2) + y: Math.round(-sessionButton.height -(sessionPopup.height) + 45) + z: 3 + topPadding: 5 + bottomPadding: 15 + leftPadding: 15 + rightPadding: 15 + + background: Rectangle { + color: "white" + border.width: 1 + border.color: "black" + + Button { + id: screenKeyboard + width: parent.width - 2 + height: 41 + x: 1 + y: 1 + z: 3 + + visible: false // disabled for now because i have no idea how to add on screen keyboard :3 + enabled: false + + Text { + color: "black" + text: "On-Screen Keyboard" + renderType: Text.NativeRendering + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.pointSize: 10 + anchors { + verticalCenter: parent.verticalCenter + left: parent.left + leftMargin: 20 + } + } + + states: [ + State { + name: "hovered" + when: screenKeyboard.hovered + PropertyChanges { + target: screenKeyboardBackground + color: "#30000000" + } + } + ] + + background: Rectangle { + id: screenKeyboardBackground + color: "transparent" + } + } + } + + contentItem: ListView { + id: sessionList + implicitHeight: contentHeight + 20 + model: sessionWrapper + currentIndex: sessionModel.lastIndex + clip: true + spacing: 25 + interactive: false + } + + enter: Transition { + NumberAnimation { + property: "opacity" + from: 0 + to: 1 + easing.type: Easing.OutCirc + } + } + + exit: Transition { + NumberAnimation { + property: "opacity" + from: 1 + to: 0 + easing.type: Easing.OutCirc + } + } + } +} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/TruePass.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/TruePass.qml new file mode 100644 index 00000000..58032049 --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/TruePass.qml @@ -0,0 +1,787 @@ +// UNUSED FILE! +// Planning to use boot up animation but I can't because SDDM isn't made for something like this. +// https://github.com/sddm/sddm/issues/1960 + + +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Rectangle { + id: trueButton + x: 1 + y: 1 + color: "transparent" + + Text { + id: welcome + color: "white" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + text: "Welcome" + renderType: Text.NativeRendering + font.weight: Font.Normal + font.pointSize: 16.5 + anchors.centerIn: parent + } + + Text { + id: splash + color: "white" + text: "" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe Boot Semilight" : animFont.name + renderType: Text.NativeRendering + font.weight: Font.Normal + font.pointSize: 17 + + anchors { + left: welcome.left + leftMargin: -45 + verticalCenter: parent.verticalCenter + } + + SequentialAnimation { + id: seqStart + running: true + loops: Animation.Infinite + + PropertyAnimation { + target: splash + property: "text" + to: "" // 1 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 2 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 3 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 4 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 5 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 6 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 7 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 8 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 9 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 10 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 11 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 12 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 13 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" //14 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 15 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 16 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 17 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 18 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 19 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 20 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 21 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 22 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 23 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 24 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 25 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" //26 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 27 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 28 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 29 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 30 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 31 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 32 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 33 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 34 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 35 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 36 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 37 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 38 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 39 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 40 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 41 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 42 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 43 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 44 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 45 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 46 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 47 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 48 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 49 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 50 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 51 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 52 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 53 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 54 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 55 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 56 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 57 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // sivas + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 59 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 60 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 61 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" //62 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 63 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 64 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 65 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 66 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 67 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 68 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // haha funni number + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 70 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 71 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 72 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 73 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 74 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 75 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 76 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 77 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 78 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 79 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 80 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 81 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 82 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 83 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 84 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" //85 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 86 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 87 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 88 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 89 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 90 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 91 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 92 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 93 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 94 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" //95 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 96 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 97 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 98 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 99 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 100 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 101 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 102 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 103 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 104 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 105 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 106 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 107 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 108 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 109 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 110 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 111 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 112 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 113 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 114 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 115 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 116 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 117 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 118 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 119 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 120 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 121 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 122 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 123 + duration: 30 + } + } + } +} + diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Components/UserList.qml b/x11-themes/redcore-theme-sddm/files/redcore/Components/UserList.qml new file mode 100644 index 00000000..d5437224 --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/UserList.qml @@ -0,0 +1,113 @@ +import QtQuick 2.15 +import QtQuick.Layouts 2.15 +import QtQuick.Controls 2.15 +import Qt5Compat.GraphicalEffects + +Rectangle { + id: container + + property alias name: name.text + property alias icon: icon.source + + height: 58 + color: "transparent" + + anchors.left: parent.left + + MouseArea { + id: rectArea + hoverEnabled: true + anchors.fill: parent + + onEntered: { + if (container.focus == false) + container.color = "#30FFFFFF"; + } + + onExited: { + if (container.focus == false) + container.color = "transparent"; + } + } + + states: [ + State { + name: "focused" + when: container.focus + PropertyChanges { + target: container + color: config.color + } + }, + State { + name: "unfocused" + when: !container.focus + PropertyChanges { + target: container + color: "transparent" + } + } + ] + + Item { + id: users + + Image { + id: icon + width: 48 + height: 48 + smooth: true + visible: false + + onStatusChanged: { + if (icon.status == Image.Error) + icon.source = "../user-192.png" + else + "/var/lib/AccountsService/icons/" + name + } + + x: 12 + y: 5 + } + + OpacityMask { + id: img + anchors.fill: icon + source: icon + maskSource: mask + } + + Item { + id: mask + width: icon.width + height: icon.height + layer.enabled: true + visible: false + + Rectangle { + width: icon.width + height: icon.height + radius: width / 2 + color: "black" + } + } + + Text { + id: name + renderType: Text.NativeRendering + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + font.pointSize: 10 + elide: Text.ElideRight + verticalAlignment: Text.AlignVCenter + clip: true + + color: "white" + + anchors { + verticalCenter: img.verticalCenter + left: img.right + leftMargin: 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 new file mode 100644 index 00000000..24ca7bb0 --- /dev/null +++ b/x11-themes/redcore-theme-sddm/files/redcore/Components/UserPanel.qml @@ -0,0 +1,1092 @@ +import QtQuick 2.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import Qt5Compat.GraphicalEffects + +FocusScope { + + property alias icon: icon.source + + property alias name: name.text + + property alias password: passwordField.text + + property alias passwordpin: passwordFieldPin.text + + property int session: sessionPanel.session + + Connections { + target: sddm + + function onLoginFailed() { + truePass.visible = false + + passwordField.visible = false + passwordField.enabled = false + passwordField.focus = false + + rightPanel.visible = false + leftPanel.visible = false + + passwordFieldPin.visible = false + passwordFieldPin.enabled = false + passwordFieldPin.focus = false + + falsePass.visible = true + falsePass.focus = true + + bootani.stop() + } + + function onLoginSucceeded() {} //broken, but this time it's not my fault. see https://github.com/sddm/sddm/issues/1960 + } + + Image { + id: icon + width: 192 + height: 192 + smooth: true + visible: false + + onStatusChanged: { + if (icon.status == Image.Error) + icon.source = "../user-192.png" + else + "/var/lib/AccountsService/icons/" + name + } + + x: -(icon.width / 2) + y: -(icon.width * 2) + (icon.width * 0.8) + } + + OpacityMask { + anchors.fill: icon + source: icon + maskSource: mask + } + + Item { + id: mask + width: icon.width + height: icon.height + layer.enabled: true + visible: false + + Rectangle { + width: icon.width + height: icon.height + radius: width / 2 + color: "black" + } + } + + Text { + id: name + color: "white" + font.pointSize: 40 + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI Light" : segoeuil.name + renderType: Text.NativeRendering + + anchors { + topMargin: 15 + horizontalCenter: icon.horizontalCenter + top: icon.bottom + } + } + + PasswordField { + id: passwordField + visible: config.PinMode === "off" ? true : false + enabled: config.PinMode === "off" ? true : false + focus: config.PinMode === "off" ? true : false + x: -135 + + anchors { + topMargin: 25 + top: name.bottom + } + + onTextChanged: { + if (passwordField.text !== "") { + passwordField.width = 226 + loginButton.x = passwordField.width + loginButton.width + 1 + revealButton.x = passwordField.width + revealButton.visible = true + } + + else { + passwordField.width = 258 + revealButton.visible = false + } + } + + Keys.onReturnPressed: { + truePass.visible = true + passwordField.visible = false + passwordFieldPin.visible = false + rightPanel.visible = false + leftPanel.visible = false + sddm.login(model.name, password, session) + + bootani.start() + } + + Keys.onEnterPressed: { + truePass.visible = true + passwordField.visible = false + passwordFieldPin.visible = false + rightPanel.visible = false + leftPanel.visible = false + sddm.login(model.name, password, session) + + bootani.start() + } + + LoginBg { + id: loginBg + + x: -3 + + LoginButton { + id: loginButton + visible: true + + ToolTip { + id: loginButtonTip + + delay: 1000 + timeout: 4800 + leftPadding: 9 + rightPadding: 9 + topPadding: 7 + bottomPadding: 7 + visible: loginButton.hovered + + contentItem: Text { + text: "Submit" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + renderType: Text.NativeRendering + color: "white" + } + + background: Rectangle { + color: "#2A2A2A" + border.width: 1 + border.color: "#1A1A1A" + } + } + + onClicked: { + loginButtonTip.hide() + truePass.visible = true + rightPanel.visible = false + leftPanel.visible = false + passwordField.visible = false + passwordFieldPin.visible = false + sddm.login(model.name, password, session) + + bootani.start() + } + } + + RevealButton { + id: revealButton + visible: false + } + } + } + + PasswordFieldPin { + id: passwordFieldPin + visible: config.PinMode === "off" ? false : true + enabled: config.PinMode === "off" ? false : true + focus: config.PinMode === "off" ? false : true + + x: -135 + + validator: IntValidator { // this dude allows only numbers to be typed, if something goes wrong, blame this dude. + bottom: 8 + top: 1000 + } + + anchors { + topMargin: 25 + top: name.bottom + } + + onTextChanged: { + if (passwordFieldPin.text !== "") { + passwordFieldPin.width = 257 + revealButtonPin.x = passwordFieldPin.width + revealButtonPin.visible = true + } + + else { + passwordFieldPin.width = 289 + revealButtonPin.visible = false + } + + if (passwordFieldPin.length > 3 ) { + rightPanel.visible = false + leftPanel.visible = false + sddm.login(model.name, password, session) + + bootani.start() + } + } + + LoginBg { + id: loginBgPin + + x: -3 + + RevealButton { + id: revealButtonPin + visible: false + } + } + } + + FalsePass { + id: falsePass + visible: false + + anchors { + horizontalCenter: parent.horizontalCenter + topMargin: 25 + top: name.bottom + } + } + + Rectangle { + id: truePass + x: 1 + y: 1 + color: "transparent" + visible: false + + Text { + id: welcome + color: "white" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI" : segoeui.name + text: "Welcome" + renderType: Text.NativeRendering + font.weight: Font.DemiBold + font.pointSize: 17 + anchors.centerIn: parent + + leftPadding: 50 + topPadding: 155 + } + + Rectangle { + id: trueButton + color: "transparent" + + FontLoader { + id: animFont + source: Qt.resolvedUrl("../fonts/SegoeBoot-Semilight.woff") + } + + anchors.left: welcome.right + anchors.top: welcome.bottom + + Text { + id: splash + color: "white" + text: "" + font.family: Qt.resolvedUrl("../fonts") ? "Segoe Boot Semilight" : animFont.name + renderType: Text.NativeRendering + font.weight: Font.Normal + font.pointSize: 24 + + topPadding: -25 + leftPadding: -150 + + visible: true + // visible: animFont.status == FontLoader.Ready ? true : false + + anchors { + verticalCenter: parent.verticalCenter + } + + SequentialAnimation { + id: bootani + running: false + loops: Animation.Infinite + + PropertyAnimation { + target: splash + property: "text" + to: "" // 1 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 2 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 3 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 4 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 5 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 6 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 7 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 8 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 9 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 10 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 11 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 12 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 13 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" //14 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 15 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 16 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 17 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 18 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 19 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 20 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 21 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 22 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 23 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 24 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 25 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" //26 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 27 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 28 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 29 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 30 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 31 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 32 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 33 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 34 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 35 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 36 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 37 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 38 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 39 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 40 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 41 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 42 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 43 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 44 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 45 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 46 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 47 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 48 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 49 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 50 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 51 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 52 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 53 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 54 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 55 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 56 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 57 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // sivas + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 59 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 60 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 61 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" //62 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 63 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 64 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 65 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 66 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 67 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 68 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // haha funni number + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 70 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 71 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 72 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 73 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 74 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 75 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 76 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 77 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 78 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 79 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 80 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 81 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 82 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 83 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 84 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" //85 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 86 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 87 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 88 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 89 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 90 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 91 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 92 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 93 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 94 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" //95 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 96 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 97 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 98 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 99 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 100 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 101 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 102 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 103 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 104 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 105 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 106 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 107 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 108 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 109 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 110 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 111 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 112 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 113 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 114 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 115 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 116 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 117 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 118 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 119 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 120 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 121 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 122 + duration: 30 + } + PropertyAnimation { + target: splash + property: "text" + to: "" // 123 + duration: 30 + } + } + } + } + + + } + + CapsOn { + id: capsOn + visible: false + + state: keyboard.capsLock ? "on" : "off" + + states: [ + State { + name: "on" + PropertyChanges { + target: capsOn + visible: true + } + }, + + State { + name: "off" + PropertyChanges { + target: capsOn + visible: false + } + } + ] + + anchors { + top: passwordField.bottom + topMargin: 25 + } + } +} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/KeyboardButton.qml b/x11-themes/redcore-theme-sddm/files/redcore/KeyboardButton.qml deleted file mode 100644 index cd9f97bd..00000000 --- a/x11-themes/redcore-theme-sddm/files/redcore/KeyboardButton.qml +++ /dev/null @@ -1,61 +0,0 @@ -/* - SPDX-FileCopyrightText: 2016 David Edmundson - SPDX-FileCopyrightText: 2022 Aleix Pol Gonzalez - - SPDX-License-Identifier: LGPL-2.0-or-later -*/ - -import QtQuick 2.15 - -import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.kirigami 2.20 as Kirigami - -PlasmaComponents.ToolButton { - id: root - - property int currentIndex: keyboard.currentLayout - onCurrentIndexChanged: keyboard.currentLayout = currentIndex - - text: i18nd("plasma-desktop-sddm-theme", "Keyboard Layout: %1", keyboard.layouts[currentIndex].longName) - visible: keyboard.layouts.length > 1 - - checkable: true - checked: menu.opened - onToggled: { - if (checked) { - menu.popup(root, 0, 0) - } else { - menu.dismiss() - } - } - - signal keyboardLayoutChanged() - - PlasmaComponents.Menu { - id: menu - Kirigami.Theme.colorSet: Kirigami.Theme.Window - Kirigami.Theme.inherit: false - - onAboutToShow: { - if (instantiator.model === null) { - let layouts = keyboard.layouts; - layouts.sort((a, b) => a.longName.localeCompare(b.longName)); - instantiator.model = layouts; - } - } - - Instantiator { - id: instantiator - model: null - onObjectAdded: (index, object) => menu.insertItem(index, object) - onObjectRemoved: (index, object) => menu.removeItem(object) - delegate: PlasmaComponents.MenuItem { - text: modelData.longName - onTriggered: { - keyboard.currentLayout = keyboard.layouts.indexOf(modelData) - root.keyboardLayoutChanged() - } - } - } - } -} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Login.qml b/x11-themes/redcore-theme-sddm/files/redcore/Login.qml deleted file mode 100644 index 22751b01..00000000 --- a/x11-themes/redcore-theme-sddm/files/redcore/Login.qml +++ /dev/null @@ -1,156 +0,0 @@ -import org.kde.breeze.components - -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Controls 2.15 as QQC2 - -import org.kde.plasma.components 3.0 as PlasmaComponents3 -import org.kde.plasma.extras 2.0 as PlasmaExtras -import org.kde.kirigami 2.20 as Kirigami - -SessionManagementScreen { - id: root - property Item mainPasswordBox: passwordBox - - property bool showUsernamePrompt: !showUserList - - property string lastUserName - property bool loginScreenUiVisible: false - - //the y position that should be ensured visible when the on screen keyboard is visible - property int visibleBoundary: mapFromItem(loginButton, 0, 0).y - onHeightChanged: visibleBoundary = mapFromItem(loginButton, 0, 0).y + loginButton.height + Kirigami.Units.smallSpacing - - property real fontSize: Kirigami.Theme.defaultFont.pointSize - - signal loginRequest(string username, string password) - - onShowUsernamePromptChanged: { - if (!showUsernamePrompt) { - lastUserName = "" - } - } - - onUserSelected: { - // Don't startLogin() here, because the signal is connected to the - // Escape key as well, for which it wouldn't make sense to trigger - // login. - focusFirstVisibleFormControl(); - } - - QQC2.StackView.onActivating: { - // Controls are not visible yet. - Qt.callLater(focusFirstVisibleFormControl); - } - - function focusFirstVisibleFormControl() { - const nextControl = (userNameInput.visible - ? userNameInput - : (passwordBox.visible - ? passwordBox - : loginButton)); - // Using TabFocusReason, so that the loginButton gets the visual highlight. - nextControl.forceActiveFocus(Qt.TabFocusReason); - } - - /* - * Login has been requested with the following username and password - * If username field is visible, it will be taken from that, otherwise from the "name" property of the currentIndex - */ - function startLogin() { - const username = showUsernamePrompt ? userNameInput.text : userList.selectedUser - const password = passwordBox.text - - footer.enabled = false - mainStack.enabled = false - userListComponent.userList.opacity = 0.5 - - // This is partly because it looks nicer, but more importantly it - // works round a Qt bug that can trigger if the app is closed with a - // TextField focused. - // - // See https://bugreports.qt.io/browse/QTBUG-55460 - loginButton.forceActiveFocus(); - loginRequest(username, password); - } - - PlasmaComponents3.TextField { - id: userNameInput - font.pointSize: fontSize + 1 - Layout.fillWidth: true - - text: lastUserName - visible: showUsernamePrompt - focus: showUsernamePrompt && !lastUserName //if there's a username prompt it gets focus first, otherwise password does - placeholderText: i18nd("plasma-desktop-sddm-theme", "Username") - - onAccepted: { - if (root.loginScreenUiVisible) { - passwordBox.forceActiveFocus() - } - } - } - - RowLayout { - Layout.fillWidth: true - - PlasmaExtras.PasswordField { - id: passwordBox - font.pointSize: fontSize + 1 - Layout.fillWidth: true - - placeholderText: i18nd("plasma-desktop-sddm-theme", "Password") - focus: !showUsernamePrompt || lastUserName - - // Disable reveal password action because SDDM does not have the breeze icon set loaded - rightActions: [] - - onAccepted: { - if (root.loginScreenUiVisible) { - startLogin(); - } - } - - visible: root.showUsernamePrompt || userList.currentItem.needsPassword - - Keys.onEscapePressed: { - mainStack.currentItem.forceActiveFocus(); - } - - //if empty and left or right is pressed change selection in user switch - //this cannot be in keys.onLeftPressed as then it doesn't reach the password box - Keys.onPressed: event => { - if (event.key === Qt.Key_Left && !text) { - userList.decrementCurrentIndex(); - event.accepted = true - } - if (event.key === Qt.Key_Right && !text) { - userList.incrementCurrentIndex(); - event.accepted = true - } - } - - Connections { - target: sddm - function onLoginFailed() { - passwordBox.selectAll() - passwordBox.forceActiveFocus() - } - } - } - - PlasmaComponents3.Button { - id: loginButton - Accessible.name: i18nd("plasma-desktop-sddm-theme", "Log In") - Layout.preferredHeight: passwordBox.implicitHeight - Layout.preferredWidth: text.length === 0 ? loginButton.Layout.preferredHeight : -1 - - icon.name: text.length === 0 ? (root.LayoutMirroring.enabled ? "go-previous" : "go-next") : "" - - text: root.showUsernamePrompt || userList.currentItem.needsPassword ? "" : i18n("Log In") - onClicked: startLogin() - Keys.onEnterPressed: clicked() - Keys.onReturnPressed: clicked() - } - } -} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Main.qml b/x11-themes/redcore-theme-sddm/files/redcore/Main.qml index 60b8f61d..7f2387d9 100644 --- a/x11-themes/redcore-theme-sddm/files/redcore/Main.qml +++ b/x11-themes/redcore-theme-sddm/files/redcore/Main.qml @@ -1,540 +1,528 @@ -/* - SPDX-FileCopyrightText: 2016 David Edmundson - - SPDX-License-Identifier: LGPL-2.0-or-later -*/ - import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Controls 2.15 as QQC2 -import Qt5Compat.GraphicalEffects - -import org.kde.plasma.components 3.0 as PlasmaComponents3 -import org.kde.plasma.private.keyboardindicator as KeyboardIndicator -import org.kde.kirigami 2.20 as Kirigami - -import org.kde.breeze.components +import QtQuick.Controls 2.15 +import QtQuick.Layouts 2.15 +import "Components" Item { id: root + width: Screen.width + height: Screen.height - // If we're using software rendering, draw outlines instead of shadows - // See https://bugs.kde.org/show_bug.cgi?id=398317 - readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software - - Kirigami.Theme.colorSet: Kirigami.Theme.Complementary - Kirigami.Theme.inherit: false - - width: 1600 - height: 900 - - property string notificationMessage - - LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft - LayoutMirroring.childrenInherit: true - - KeyboardIndicator.KeyState { - id: capsLockState - key: Qt.Key_CapsLock + FontLoader { + id: segoeui + source: Qt.resolvedUrl("fonts/segoeui.ttf") } - Item { - id: wallpaper - anchors.fill: parent - Repeater { - model: screenModel - - Background { - x: geometry.x; y: geometry.y; width: geometry.width; height: geometry.height - sceneBackgroundType: config.type - sceneBackgroundColor: config.color - sceneBackgroundImage: config.background - } - } + FontLoader { + id: segoeuil + source: Qt.resolvedUrl("fonts/segoeuil.ttf") } - RejectPasswordAnimation { - id: rejectPasswordAnimation - target: mainStack + FontLoader { + id: iconfont + source: Qt.resolvedUrl("fonts/SegMDL2.ttf") } - MouseArea { - id: loginScreenRoot + Rectangle { + id: background anchors.fill: parent + width: parent.width + height: parent.height - property bool uiVisible: true - property bool blockUI: mainStack.depth > 1 || userListComponent.mainPasswordBox.text.length > 0 || inputPanel.keyboardActive || config.type !== "image" - - hoverEnabled: true - drag.filterChildren: true - onPressed: uiVisible = true; - onPositionChanged: uiVisible = true; - onUiVisibleChanged: { - if (blockUI) { - fadeoutTimer.running = false; - } else if (uiVisible) { - fadeoutTimer.restart(); + Image { + anchors.fill: parent + width: parent.width + height: parent.height + source: config.background + + Rectangle { + width: parent.width + height: parent.height + color: "#75000000" } } - onBlockUIChanged: { - if (blockUI) { - fadeoutTimer.running = false; - uiVisible = true; - } else { - fadeoutTimer.restart(); + } + + Rectangle { + id: startupBg + width: Screen.width + height: Screen.height + color: "transparent" + z: 4 + + Image { + anchors.fill: parent + width: Screen.width + height: Screen.height + smooth: true + source: config.background + + Rectangle { + id: backRect + width: Screen.width + height: Screen.height + color: "#15000000" } } - Keys.onPressed: event => { - uiVisible = true; - event.accepted = false; + FontLoader { + id: localsys + source: "/usr/local/share/fonts/s/SegMDL2.ttf" } - //takes one full minute for the ui to disappear - Timer { - id: fadeoutTimer - running: true - interval: 60000 - onTriggered: { - if (!loginScreenRoot.blockUI) { - userListComponent.mainPasswordBox.showPassword = false; - loginScreenRoot.uiVisible = false; - } + Text { + id: warning + visible: { + if (segoeui.status === FontLoader.Error && localsys.status === FontLoader.Error) return true + + return false } - } - WallpaperFader { - visible: config.type === "image" - anchors.fill: parent - state: loginScreenRoot.uiVisible ? "on" : "off" - source: wallpaper - mainStack: mainStack - footer: footer - clock: clock - } - DropShadow { - id: clockShadow - anchors.fill: clock - source: clock - visible: !softwareRendering - radius: 6 - samples: 14 - spread: 0.3 - color : "black" // shadows should always be black - Behavior on opacity { - OpacityAnimator { - duration: Kirigami.Units.veryLongDuration * 2 - easing.type: Easing.InOutQuad - } + color: "white" + font.pointSize: 19 + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI Light" : segoeuisb.name + font.weight: Font.DemiBold + renderType: Text.NativeRendering + horizontalAlignment: Text.AlignLeft + text: "w00t" + bottomPadding: 400 + + anchors { + horizontalCenter: parent.horizontalCenter + verticalCenter: parent.verticalCenter } } - Clock { - id: clock - property Item shadow: clockShadow - visible: y > 0 - anchors.horizontalCenter: parent.horizontalCenter - y: (userListComponent.userList.y + mainStack.y)/2 - height/2 - Layout.alignment: Qt.AlignBaseline + Text { + id: warning2 + visible: warning.visible ? true : false + + color: "white" + font.pointSize: 19 + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI Light" : segoeuisb.name + font.weight: Font.DemiBold + renderType: Text.NativeRendering + horizontalAlignment: Text.AlignLeft + text: "w00t" + bottomPadding: 250 + + anchors { + horizontalCenter: parent.horizontalCenter + verticalCenter: parent.verticalCenter + } } - QQC2.StackView { - id: mainStack + Text { + id: warning3 + visible: warning.visible ? true : false + + color: "white" + font.pointSize: 19 + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI Light" : segoeuisb.name + font.weight: Font.DemiBold + renderType: Text.NativeRendering + horizontalAlignment: Text.AlignLeft + text: "w00t" + bottomPadding: 200 + anchors { - left: parent.left - right: parent.right + horizontalCenter: parent.horizontalCenter + verticalCenter: parent.verticalCenter } - height: root.height + Kirigami.Units.gridUnit * 3 - - // If true (depends on the style and environment variables), hover events are always accepted - // and propagation stopped. This means the parent MouseArea won't get them and the UI won't be shown. - // Disable capturing those events while the UI is hidden to avoid that, while still passing events otherwise. - // One issue is that while the UI is visible, mouse activity won't keep resetting the timer, but when it - // finally expires, the next event should immediately set uiVisible = true again. - hoverEnabled: loginScreenRoot.uiVisible ? undefined : false - - focus: true //StackView is an implicit focus scope, so we need to give this focus so the item inside will have it - - Timer { - //SDDM has a bug in 0.13 where even though we set the focus on the right item within the window, the window doesn't have focus - //it is fixed in 6d5b36b28907b16280ff78995fef764bb0c573db which will be 0.14 - //we need to call "window->activate()" *After* it's been shown. We can't control that in QML so we use a shoddy timer - //it's been this way for all Plasma 5.x without a huge problem - running: true - repeat: false - interval: 200 - onTriggered: mainStack.forceActiveFocus() + } + + Text { + id: warning4 + visible: warning.visible ? true : false + + color: "white" + font.pointSize: 19 + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI Light" : segoeuisb.name + font.weight: Font.DemiBold + renderType: Text.NativeRendering + horizontalAlignment: Text.AlignLeft + text: "w00t" + bottomPadding: 50 + + anchors { + horizontalCenter: parent.horizontalCenter + verticalCenter: parent.verticalCenter } + } - initialItem: Login { - id: userListComponent - userListModel: userModel - loginScreenUiVisible: loginScreenRoot.uiVisible - userListCurrentIndex: userModel.lastIndex >= 0 ? userModel.lastIndex : 0 - lastUserName: userModel.lastUser - showUserList: { - if (!userListModel.hasOwnProperty("count") - || !userListModel.hasOwnProperty("disableAvatarsThreshold")) { - return false - } + MouseArea { + id: mouseArea + anchors.fill: parent + drag.target: timeDate + drag.axis: Drag.YAxis + drag.minimumY: -Screen.height / 2 + drag.maximumY: 0 + focus: true + + onClicked: { + listView.focus = true + mouseArea.focus = false + mouseArea.enabled = false + seqStart.start() + parStart.start() + } - if (userListModel.count === 0 ) { - return false - } + Keys.onPressed: { + listView.focus = true + mouseArea.focus = false + mouseArea.enabled = false + seqStart.start() + parStart.start() + } - if (userListModel.hasOwnProperty("containsAllUsers") && !userListModel.containsAllUsers) { - return false - } + property bool dragActive: drag.active - return userListModel.count <= userListModel.disableAvatarsThreshold + onDragActiveChanged: { + if(drag.active) {} + else { + listView.focus = true + mouseArea.focus = false + mouseArea.enabled = false + seqStart.start() + parslideStart.start() } + } + } - notificationMessage: { - const parts = []; - if (capsLockState.locked) { - parts.push(i18nd("plasma-desktop-sddm-theme", "Caps Lock is on")); - } - if (root.notificationMessage) { - parts.push(root.notificationMessage); - } - return parts.join(" • "); - } + ParallelAnimation { + id: parStart + running: false - actionItemsVisible: !inputPanel.keyboardActive - actionItems: [ - ActionButton { - iconSource: "system-suspend" - text: i18ndc("plasma-desktop-sddm-theme", "Suspend to RAM", "Sleep") - fontSize: Kirigami.Theme.defaultFont.pointSize + 1 - onClicked: sddm.suspend() - enabled: sddm.canSuspend - }, - ActionButton { - iconSource: "system-reboot" - text: i18nd("plasma-desktop-sddm-theme", "Restart") - fontSize: Kirigami.Theme.defaultFont.pointSize + 1 - onClicked: sddm.reboot() - enabled: sddm.canReboot - }, - ActionButton { - iconSource: "system-shutdown" - text: i18nd("plasma-desktop-sddm-theme", "Shut Down") - fontSize: Kirigami.Theme.defaultFont.pointSize + 1 - onClicked: sddm.powerOff() - enabled: sddm.canPowerOff - }, - ActionButton { - iconSource: "system-user-prompt" - text: i18ndc("plasma-desktop-sddm-theme", "For switching to a username and password prompt", "Other…") - fontSize: Kirigami.Theme.defaultFont.pointSize + 1 - onClicked: mainStack.push(userPromptComponent) - enabled: true - visible: !userListComponent.showUsernamePrompt - }] - - onLoginRequest: { - root.notificationMessage = "" - sddm.login(username, password, sessionButton.currentIndex) - } + NumberAnimation { + target: timeDate + properties: "y" + from: 0 + to: -45 + duration: 125 } - Behavior on opacity { - OpacityAnimator { - duration: Kirigami.Units.longDuration - } + NumberAnimation { + target: timeDate + properties: "visible" + from: 1 + to: 0 + duration: 125 } - readonly property real zoomFactor: 1.5 + NumberAnimation { + target: startupBg + properties: "opacity" + from: 1 + to: 0 + duration: 100 + } + } - popEnter: Transition { - ScaleAnimator { - from: mainStack.zoomFactor - to: 1 - duration: Kirigami.Units.veryLongDuration - easing.type: Easing.OutCubic - } - OpacityAnimator { - from: 0 - to: 1 - duration: Kirigami.Units.veryLongDuration - easing.type: Easing.OutCubic - } + ParallelAnimation { + id: parslideStart + running: false + + NumberAnimation { + target: startupBg + properties: "opacity" + from: 1 + to: 0 + duration: 100 + } + } + + SequentialAnimation { + id: seqStart + running: false + + ColorAnimation { + target: backRect + properties: "color" + from: "#15000000" + to: "#75000000" + duration: 125 } - popExit: Transition { + ParallelAnimation { + ScaleAnimator { + target: background from: 1 - to: 1 / mainStack.zoomFactor - duration: Kirigami.Units.veryLongDuration - easing.type: Easing.OutCubic + to: 1.01 + duration: 250 } - OpacityAnimator { - from: 1 - to: 0 - duration: Kirigami.Units.veryLongDuration - easing.type: Easing.OutCubic - } - } - pushEnter: Transition { - ScaleAnimator { - from: 1 / mainStack.zoomFactor + NumberAnimation { + target: centerPanel + properties: "opacity" + from: 0 to: 1 - duration: Kirigami.Units.veryLongDuration - easing.type: Easing.OutCubic + duration: 225 } - OpacityAnimator { + + NumberAnimation { + target: rightPanel + properties: "opacity" from: 0 to: 1 - duration: Kirigami.Units.veryLongDuration - easing.type: Easing.OutCubic + duration: 100 } - } - pushExit: Transition { - ScaleAnimator { - from: 1 - to: mainStack.zoomFactor - duration: Kirigami.Units.veryLongDuration - easing.type: Easing.OutCubic - } - OpacityAnimator { - from: 1 - to: 0 - duration: Kirigami.Units.veryLongDuration - easing.type: Easing.OutCubic + NumberAnimation { + target: leftPanel + properties: "opacity" + from: 0 + to: 1 + duration: 100 } } } - VirtualKeyboardLoader { - id: inputPanel + Rectangle { + id: timeDate + width: parent.width + height: parent.height + color: "transparent" - z: 1 + Column { + id: timeContainer - screenRoot: root - mainStack: mainStack - mainBlock: userListComponent - passwordField: userListComponent.mainPasswordBox - } + anchors { + bottom: parent.bottom + left: parent.left + bottomMargin: 90 + leftMargin: 35 + } - Component { - id: userPromptComponent - Login { - showUsernamePrompt: true - notificationMessage: root.notificationMessage - loginScreenUiVisible: loginScreenRoot.uiVisible - fontSize: Kirigami.Theme.defaultFont.pointSize + 2 - - // using a model rather than a QObject list to avoid QTBUG-75900 - userListModel: ListModel { - ListElement { - name: "" - icon: "" - } - Component.onCompleted: { - // as we can't bind inside ListElement - setProperty(0, "name", i18nd("plasma-desktop-sddm-theme", "Type in Username and Password")); - setProperty(0, "icon", Qt.resolvedUrl("faces/.face.icon")) + property date dateTime: new Date() + + Timer { + interval: 100; running: true; repeat: true; + onTriggered: timeContainer.dateTime = new Date() + } + + Text { + id: time + + color: "white" + font.pointSize: 95 + font.family: Qt.resolvedUrl("../fonts") ? "Segoe UI Light" : segoeuil.name + renderType: Text.NativeRendering + text: Qt.formatTime(timeContainer.dateTime, "hh:mm") + + anchors { + horizontalCenter: parent.horizontalCenter + left: parent.left } } - onLoginRequest: { - root.notificationMessage = "" - sddm.login(username, password, sessionButton.currentIndex) + Rectangle { + id: spacingRect + color: "transparent" + width: 15 + height: 15 + + anchors { + horizontalCenter: parent.horizontalCenter + } } - actionItemsVisible: !inputPanel.keyboardActive - actionItems: [ - ActionButton { - iconSource: "system-suspend" - text: i18ndc("plasma-desktop-sddm-theme", "Suspend to RAM", "Sleep") - fontSize: Kirigami.Theme.defaultFont.pointSize + 1 - onClicked: sddm.suspend() - enabled: sddm.canSuspend - }, - ActionButton { - iconSource: "system-reboot" - text: i18nd("plasma-desktop-sddm-theme", "Restart") - fontSize: Kirigami.Theme.defaultFont.pointSize + 1 - onClicked: sddm.reboot() - enabled: sddm.canReboot - }, - ActionButton { - iconSource: "system-shutdown" - text: i18nd("plasma-desktop-sddm-theme", "Shut Down") - fontSize: Kirigami.Theme.defaultFont.pointSize + 1 - onClicked: sddm.powerOff() - enabled: sddm.canPowerOff - }, - ActionButton { - iconSource: "system-user-list" - text: i18nd("plasma-desktop-sddm-theme", "List Users") - fontSize: Kirigami.Theme.defaultFont.pointSize + 1 - onClicked: mainStack.pop() + Text { + id: date + + color: "white" + font.pointSize: 45 + font.family: "Segoe UI Light" + renderType: Text.NativeRendering + horizontalAlignment: Text.AlignLeft + text: Qt.formatDate(timeContainer.dateTime, "dddd, MMMM dd") + + anchors { + horizontalCenter: parent.horizontalCenter } - ] + } } } + } - DropShadow { - id: logoShadow - anchors.fill: logo - source: logo - visible: !softwareRendering && config.showlogo === "shown" - horizontalOffset: 1 - verticalOffset: 1 - radius: 6 - samples: 14 - spread: 0.3 - color : "black" // shadows should always be black - opacity: loginScreenRoot.uiVisible ? 0 : 1 - Behavior on opacity { - //OpacityAnimator when starting from 0 is buggy (it shows one frame with opacity 1)" - NumberAnimation { - duration: Kirigami.Units.longDuration - easing.type: Easing.InOutQuad - } + Item { + id: rightPanel + z: 2 + opacity: 0 + + anchors { + bottom: parent.bottom + right: parent.right + margins: 75 + } + + PowerPanel { + id: powerPanel + } + + SessionPanel { + id: sessionPanel + + anchors { + right: powerPanel.left } } - Image { - id: logo - visible: config.showlogo === "shown" - source: config.logo - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: footer.top - anchors.bottomMargin: Kirigami.Units.largeSpacing - asynchronous: true - sourceSize.height: height - opacity: loginScreenRoot.uiVisible ? 0 : 1 - fillMode: Image.PreserveAspectFit - height: Math.round(Kirigami.Units.gridUnit * 3.5) - Behavior on opacity { - // OpacityAnimator when starting from 0 is buggy (it shows one frame with opacity 1)" - NumberAnimation { - duration: Kirigami.Units.longDuration - easing.type: Easing.InOutQuad + LayoutPanel { + id: layoutPanel + + anchors { + right: sessionPanel.left + } + } + } + + Rectangle { + id: leftPanel + color: "transparent" + anchors.fill: parent + z: 2 + opacity: 0 + + visible: listView2.count > 1 ? true : false + enabled: listView2.count > 1 ? true : false + + Component { + id: userDelegate2 + + UserList { + id: userList + name: (model.realName === "") ? model.name : model.realName + icon: "/var/lib/AccountsService/icons/" + name + + anchors { + horizontalCenter: parent.horizontalCenter + } + + MouseArea { + anchors.fill: parent + onClicked: { + listView2.currentIndex = index + listView2.focus = true + listView.currentIndex = index + listView.focus = true + } } } } - // Note: Containment masks stretch clickable area of their buttons to - // the screen edges, essentially making them adhere to Fitts's law. - // Due to virtual keyboard button having an icon, buttons may have - // different heights, so fillHeight is required. - // - // Note for contributors: Keep this in sync with LockScreenUi.qml footer. - RowLayout { - id: footer + Rectangle { + width: 150 + height: listView2.count > 17 ? Screen.height - 68 : 58 * listView2.count + color: "transparent" + clip: true + anchors { bottom: parent.bottom + bottomMargin: 35 left: parent.left - right: parent.right - margins: Kirigami.Units.smallSpacing + leftMargin: 35 } - spacing: Kirigami.Units.smallSpacing - Behavior on opacity { - OpacityAnimator { - duration: Kirigami.Units.longDuration + Item { + id: usersContainer2 + width: 255 + height: parent.height + + anchors { + bottom: parent.bottom + left: parent.left } - } - PlasmaComponents3.ToolButton { - id: virtualKeyboardButton + Button { + id: prevUser2 + visible: true + enabled: false + width: 0 - text: i18ndc("plasma-desktop-sddm-theme", "Button to show/hide virtual keyboard", "Virtual Keyboard") - icon.name: inputPanel.keyboardActive ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off" - onClicked: { - // Otherwise the password field loses focus and virtual keyboard - // keystrokes get eaten - userListComponent.mainPasswordBox.forceActiveFocus(); - inputPanel.showHide() + anchors { + bottom: parent.bottom + left: parent.left + } } - visible: inputPanel.status === Loader.Ready - Layout.fillHeight: true - containmentMask: Item { - parent: virtualKeyboardButton - anchors.fill: parent - anchors.leftMargin: -footer.anchors.margins - anchors.bottomMargin: -footer.anchors.margins + ListView { + id: listView2 + height: parent.height + focus: true + model: userModel + currentIndex: userModel.lastIndex + delegate: userDelegate2 + verticalLayoutDirection: ListView.TopToBottom + orientation: ListView.Vertical + interactive: listView2.count > 17 ? true : false + + anchors { + left: prevUser2.right + right: nextUser2.left + } } - } - KeyboardButton { - id: keyboardButton + Button { + id: nextUser2 + visible: true + width: 0 + enabled: false - onKeyboardLayoutChanged: { - // Otherwise the password field loses focus and virtual keyboard - // keystrokes get eaten - userListComponent.mainPasswordBox.forceActiveFocus(); - } - - Layout.fillHeight: true - containmentMask: Item { - parent: keyboardButton - anchors.fill: parent - anchors.leftMargin: virtualKeyboardButton.visible ? 0 : -footer.anchors.margins - anchors.bottomMargin: -footer.anchors.margins + anchors { + bottom: parent.bottom + right: parent.right + } } } + } + } - SessionButton { - id: sessionButton + Item { + id: centerPanel + anchors.centerIn: root + z: 2 + opacity: 0 - onSessionChanged: { - // Otherwise the password field loses focus and virtual keyboard - // keystrokes get eaten - userListComponent.mainPasswordBox.forceActiveFocus(); - } + Item { - Layout.fillHeight: true - containmentMask: Item { - parent: sessionButton - anchors.fill: parent - anchors.leftMargin: virtualKeyboardButton.visible || keyboardButton.visible - ? 0 : -footer.anchors.margins - anchors.bottomMargin: -footer.anchors.margins + Component { + id: userDelegate + + UserPanel { + anchors.centerIn: parent + name: (model.realName === "") ? model.name : model.realName + icon: "/var/lib/AccountsService/icons/" + name } } - Item { - Layout.fillWidth: true + Button { + id: prevUser + anchors.left: parent.left + enabled: false + visible: false } - Battery {} - } - } - - Connections { - target: sddm - function onLoginFailed() { - notificationMessage = i18nd("plasma-desktop-sddm-theme", "Login Failed") - footer.enabled = true - mainStack.enabled = true - userListComponent.userList.opacity = 1 - rejectPasswordAnimation.start() - } - function onLoginSucceeded() { - //note SDDM will kill the greeter at some random point after this - //there is no certainty any transition will finish, it depends on the time it - //takes to complete the init - mainStack.opacity = 0 - footer.opacity = 0 - } - } + ListView { + id: listView + focus: true + model: userModel + delegate: userDelegate + currentIndex: userModel.lastIndex + interactive: false + + anchors { + left: prevUser.right + right: nextUser.left + } + } - onNotificationMessageChanged: { - if (notificationMessage) { - notificationResetTimer.start(); + Button { + id: nextUser + anchors.right: parent.right + enabled: false + visible: false + } } } - - Timer { - id: notificationResetTimer - interval: 3000 - onTriggered: notificationMessage = "" - } } diff --git a/x11-themes/redcore-theme-sddm/files/redcore/Messages.sh b/x11-themes/redcore-theme-sddm/files/redcore/Messages.sh deleted file mode 100644 index 1ded812a..00000000 --- a/x11-themes/redcore-theme-sddm/files/redcore/Messages.sh +++ /dev/null @@ -1,2 +0,0 @@ -#! /usr/bin/env bash -$XGETTEXT `find . -name \*.qml` -L Java -o $podir/plasma-desktop-sddm-theme.pot diff --git a/x11-themes/redcore-theme-sddm/files/redcore/SessionButton.qml b/x11-themes/redcore-theme-sddm/files/redcore/SessionButton.qml deleted file mode 100644 index ad387b51..00000000 --- a/x11-themes/redcore-theme-sddm/files/redcore/SessionButton.qml +++ /dev/null @@ -1,55 +0,0 @@ -/* - SPDX-FileCopyrightText: 2016 David Edmundson - SPDX-FileCopyrightText: 2022 Aleix Pol Gonzalez - - SPDX-License-Identifier: LGPL-2.0-or-later -*/ - -import QtQuick 2.15 - -import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.kirigami 2.20 as Kirigami - -PlasmaComponents.ToolButton { - id: root - - property int currentIndex: -1 - - text: i18nd("plasma-desktop-sddm-theme", "Desktop Session: %1", instantiator.objectAt(currentIndex).text || "") - visible: menu.count > 1 - - Component.onCompleted: { - currentIndex = sessionModel.lastIndex - } - checkable: true - checked: menu.opened - onToggled: { - if (checked) { - menu.popup(root, 0, 0) - } else { - menu.dismiss() - } - } - - signal sessionChanged() - - PlasmaComponents.Menu { - Kirigami.Theme.colorSet: Kirigami.Theme.Window - Kirigami.Theme.inherit: false - - id: menu - Instantiator { - id: instantiator - model: sessionModel - onObjectAdded: (index, object) => menu.insertItem(index, object) - onObjectRemoved: (index, object) => menu.removeItem(object) - delegate: PlasmaComponents.MenuItem { - text: model.name - onTriggered: { - root.currentIndex = model.index - sessionChanged() - } - } - } - } -} diff --git a/x11-themes/redcore-theme-sddm/files/redcore/faces/.face.icon b/x11-themes/redcore-theme-sddm/files/redcore/faces/.face.icon deleted file mode 100644 index ecee9917..00000000 --- a/x11-themes/redcore-theme-sddm/files/redcore/faces/.face.icon +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/x11-themes/redcore-theme-sddm/files/redcore/fonts/SegMDL2.ttf b/x11-themes/redcore-theme-sddm/files/redcore/fonts/SegMDL2.ttf new file mode 100644 index 00000000..36820287 Binary files /dev/null and b/x11-themes/redcore-theme-sddm/files/redcore/fonts/SegMDL2.ttf differ diff --git a/x11-themes/redcore-theme-sddm/files/redcore/fonts/SegoeBoot-Semilight.woff b/x11-themes/redcore-theme-sddm/files/redcore/fonts/SegoeBoot-Semilight.woff new file mode 100644 index 00000000..b20e2f0a Binary files /dev/null and b/x11-themes/redcore-theme-sddm/files/redcore/fonts/SegoeBoot-Semilight.woff differ diff --git a/x11-themes/redcore-theme-sddm/files/redcore/fonts/segoeui.ttf b/x11-themes/redcore-theme-sddm/files/redcore/fonts/segoeui.ttf new file mode 100644 index 00000000..43b56877 Binary files /dev/null and b/x11-themes/redcore-theme-sddm/files/redcore/fonts/segoeui.ttf differ diff --git a/x11-themes/redcore-theme-sddm/files/redcore/fonts/segoeuil.ttf b/x11-themes/redcore-theme-sddm/files/redcore/fonts/segoeuil.ttf new file mode 100644 index 00000000..254d3b06 Binary files /dev/null and b/x11-themes/redcore-theme-sddm/files/redcore/fonts/segoeuil.ttf differ diff --git a/x11-themes/redcore-theme-sddm/files/redcore/metadata.desktop b/x11-themes/redcore-theme-sddm/files/redcore/metadata.desktop index 11188a8f..6321fed6 100644 --- a/x11-themes/redcore-theme-sddm/files/redcore/metadata.desktop +++ b/x11-themes/redcore-theme-sddm/files/redcore/metadata.desktop @@ -1,17 +1,15 @@ [SddmGreeterTheme] -Name=Redcore-Breeze -Description=Redcore-Breeze -Author=KDE Visual Design Group -Copyright=(c) 2014, David Edmundson -License=CC-BY-SA +Name=Redcore-Sddm-Theme +Description=Redcore-Sddm-Theme +Author=Redcore Linux Project +License=MIT Type=sddm-theme -Version=0.1 -Website=https://github.com/sddm/sddm -Screenshot=background.png +Version=1 +Website=https://redcorelinux.org +Screenshot=preview.png MainScript=Main.qml ConfigFile=theme.conf -TranslationsDirectory=translations -Email=plasma-devel@kde.org -Theme-Id=redcore-breeze +Email=contact@redcorelinux.org +Theme-Id=redcore-sddm Theme-API=2.0 QtVersion=6 diff --git a/x11-themes/redcore-theme-sddm/files/redcore/preview.png b/x11-themes/redcore-theme-sddm/files/redcore/preview.png new file mode 100644 index 00000000..196752c8 Binary files /dev/null and b/x11-themes/redcore-theme-sddm/files/redcore/preview.png differ diff --git a/x11-themes/redcore-theme-sddm/files/redcore/redcore-weblink.svg b/x11-themes/redcore-theme-sddm/files/redcore/redcore-weblink.svg deleted file mode 100644 index 7fa6a290..00000000 --- a/x11-themes/redcore-theme-sddm/files/redcore/redcore-weblink.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/x11-themes/redcore-theme-sddm/files/redcore/theme.conf b/x11-themes/redcore-theme-sddm/files/redcore/theme.conf index 1dc1948a..cf850b88 100644 --- a/x11-themes/redcore-theme-sddm/files/redcore/theme.conf +++ b/x11-themes/redcore-theme-sddm/files/redcore/theme.conf @@ -1,8 +1,6 @@ [General] -showlogo=hidden -logo=redcore-weblink.svg -type=image -color=#520A0A -fontSize=10 + +PinMode="off" background=background.png -needsFullUserModel=false +color="#520A0A" + diff --git a/x11-themes/redcore-theme-sddm/files/redcore/user-192.png b/x11-themes/redcore-theme-sddm/files/redcore/user-192.png new file mode 100644 index 00000000..4f985e15 Binary files /dev/null and b/x11-themes/redcore-theme-sddm/files/redcore/user-192.png differ diff --git a/x11-themes/redcore-theme-sddm/redcore-theme-sddm-1.314.1337-r1.ebuild b/x11-themes/redcore-theme-sddm/redcore-theme-sddm-1.314.1337-r1.ebuild deleted file mode 100644 index 9a657795..00000000 --- a/x11-themes/redcore-theme-sddm/redcore-theme-sddm-1.314.1337-r1.ebuild +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=7 - -DESCRIPTION="Redcore Linux SDDM Theme" -HOMEPAGE="" -SRC_URI="" - -LICENSE="CC-BY-SA" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="" - -S="${FILESDIR}" - -src_install() { - dodir usr/share/sddm/themes - insinto usr/share/sddm/themes - doins -r ${S}/* -} diff --git a/x11-themes/redcore-theme-sddm/redcore-theme-sddm-1.314.1337-r2.ebuild b/x11-themes/redcore-theme-sddm/redcore-theme-sddm-1.314.1337-r2.ebuild new file mode 100644 index 00000000..9a657795 --- /dev/null +++ b/x11-themes/redcore-theme-sddm/redcore-theme-sddm-1.314.1337-r2.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=7 + +DESCRIPTION="Redcore Linux SDDM Theme" +HOMEPAGE="" +SRC_URI="" + +LICENSE="CC-BY-SA" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +S="${FILESDIR}" + +src_install() { + dodir usr/share/sddm/themes + insinto usr/share/sddm/themes + doins -r ${S}/* +} -- cgit v1.2.3