diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/Background.qml b/Jolly SDDM Themes/Jolly-SDDM-6/Background.qml new file mode 100644 index 0000000..6721e57 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/Background.qml @@ -0,0 +1,56 @@ +/* + 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/Jolly SDDM Themes/Jolly-SDDM-6/Input.qml b/Jolly SDDM Themes/Jolly-SDDM-6/Input.qml new file mode 100644 index 0000000..91e55c6 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/Input.qml @@ -0,0 +1,16 @@ +import QtQuick 2.2 +import QtQuick.Layouts 1.2 +import QtQuick.Controls 2.4 + +TextField { + placeholderTextColor: config.color + palette.text: config.color + font.pointSize: config.fontSize + font.family: config.font + width: parent.width + background: Rectangle { + color: parent.focus ? "#5c5c88" : "#8282c1" + radius: 100 + opacity: 0.65 + } +} diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/Jolly-Nebula Wallpaper With Plasma Logo.jpg b/Jolly SDDM Themes/Jolly-SDDM-6/Jolly-Nebula Wallpaper With Plasma Logo.jpg new file mode 100644 index 0000000..fada12e Binary files /dev/null and b/Jolly SDDM Themes/Jolly-SDDM-6/Jolly-Nebula Wallpaper With Plasma Logo.jpg differ diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/KeyboardButton.qml b/Jolly SDDM Themes/Jolly-SDDM-6/KeyboardButton.qml new file mode 100644 index 0000000..6731c30 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/KeyboardButton.qml @@ -0,0 +1,61 @@ +/* + 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_lookandfeel_org.kde.lookandfeel", "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/Jolly SDDM Themes/Jolly-SDDM-6/Login.qml b/Jolly SDDM Themes/Jolly-SDDM-6/Login.qml new file mode 100644 index 0000000..8e88fa4 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/Login.qml @@ -0,0 +1,176 @@ +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 +import org.kde.plasma.plasma5support 2.0 as PlasmaCore + +SessionManagementScreen { + id: root + property Item mainPasswordBox: passwordBox + property bool showUsernamePrompt: !showUserList + property int usernameFontSize + property int fontSize: parseInt(config.fontSize) + property string usernameFontColor + property string lastUserName + property bool loginScreenUiVisible: false + property bool passwordFieldOutlined: config.PasswordFieldOutlined == "true" + property bool hidePasswordRevealIcon: config.HidePasswordRevealIcon == "false" + property int visibleBoundary: mapFromItem(loginButton, 0, 0).y + onHeightChanged: visibleBoundary = mapFromItem(loginButton, 0, 0).y + loginButton.height + Kirigami.Units.smallSpacing + + 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); + } + + Input { + id: userNameInput + Layout.fillWidth: true + Layout.preferredHeight: 30 + font.pointSize: fontSize + 1 + opacity: passwordFieldOutlined ? 1.0 : 0.75 + text: lastUserName + visible: showUsernamePrompt + focus: showUsernamePrompt && !lastUserName //if there's a username prompt it gets focus first, otherwise password does + placeholderText: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Username") + placeholderTextColor: passwordFieldOutlined ? "white" : "white" + color: "white" + //horizontalAlignment: TextInput.AlignHCenter + leftPadding: fontSize + rightPadding: leftPadding + } + + Input { + id: passwordBox + Layout.fillWidth: true + font.pointSize: fontSize + 1 + Layout.preferredHeight: 30 + opacity: passwordFieldOutlined ? 1.0 : 0.75 + font.family: config.Font || "Noto Sans" + placeholderText: config.PasswordFieldPlaceholderText == "Password" ? i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Password") : config.PasswordFieldPlaceholderText + focus: !showUsernamePrompt || lastUserName + echoMode: TextInput.Password + onAccepted: startLogin() + placeholderTextColor: passwordFieldOutlined ? "white" : "white" + passwordCharacter: config.PasswordFieldCharacter == "" ? "●" : config.PasswordFieldCharacter + color: "white" + //horizontalAlignment: TextInput.AlignHCenter + leftPadding: fontSize + rightPadding: leftPadding + + Keys.onEscapePressed: { + mainStack.currentItem.forceActiveFocus(); + } + + Keys.onPressed: { + if (event.key == Qt.Key_Left && !text) { + userList.decrementCurrentIndex(); + event.accepted = true + } + if (event.key == Qt.Key_Right && !text) { + userList.incrementCurrentIndex(); + event.accepted = true + } + } + + Keys.onReleased: { + if (loginButton.opacity == 0 && length > 0) { + showLoginButton.start() + } + if (loginButton.opacity > 0 && length == 0) { + hideLoginButton.start() + } + } + + Connections { + target: sddm + onLoginFailed: { + passwordBox.selectAll() + passwordBox.forceActiveFocus() + } + } + } + + Image { + id: loginButton + source: "assets/login.svg" + smooth: true + sourceSize: Qt.size(passwordBox.height, passwordBox.height) + anchors { + left: passwordBox.right + verticalCenter: passwordBox.verticalCenter + } + anchors.leftMargin: 8 + visible: opacity > 0 + opacity: 0 + MouseArea { + anchors.fill: parent + onClicked: startLogin(); + } + PropertyAnimation { + id: showLoginButton + target: loginButton + properties: "opacity" + to: 0.75 + duration: 100 + } + PropertyAnimation { + id: hideLoginButton + target: loginButton + properties: "opacity" + to: 0 + duration: 80 + } + } +} diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/Main.qml b/Jolly SDDM Themes/Jolly-SDDM-6/Main.qml new file mode 100644 index 0000000..1c72d7f --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/Main.qml @@ -0,0 +1,553 @@ +/* + 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.plasma5support 2.0 as P5Support +import org.kde.kirigami 2.20 as Kirigami + +import org.kde.breeze.components + +// TODO: Once SDDM 0.19 is released and we are setting the font size using the +// SDDM KCM's syncing feature, remove the `config.fontSize` overrides here and +// the fontSize properties in various components, because the theme's default +// font size will be correctly propagated to the login screen + +Item { + id: root + + // 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 + + P5Support.DataSource { + id: keystateSource + engine: "keystate" + connectedSources: "Caps Lock" + } + + 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 + } + } + } + + RejectPasswordAnimation { + id: rejectPasswordAnimation + target: mainStack + } + + MouseArea { + id: loginScreenRoot + anchors.fill: parent + + 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(); + } + } + onBlockUIChanged: { + if (blockUI) { + fadeoutTimer.running = false; + uiVisible = true; + } else { + fadeoutTimer.restart(); + } + } + + Keys.onPressed: event => { + uiVisible = true; + event.accepted = false; + } + + //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; + } + } + } + WallpaperFader { + visible: false + 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 + } + } + } + + 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 + } + + QQC2.StackView { + id: mainStack + anchors { + left: parent.left + right: parent.right + } + 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() + } + + 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 + } + + if (userListModel.count === 0 ) { + return false + } + + if (userListModel.hasOwnProperty("containsAllUsers") && !userListModel.containsAllUsers) { + return false + } + + return userListModel.count <= userListModel.disableAvatarsThreshold + } + + notificationMessage: { + const parts = []; + if (keystateSource.data["Caps Lock"]["Locked"]) { + parts.push(i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Caps Lock is on")); + } + if (root.notificationMessage) { + parts.push(root.notificationMessage); + } + return parts.join(" • "); + } + + actionItemsVisible: !inputPanel.keyboardActive + actionItems: [ + ActionButton { + iconSource: "/usr/share/sddm/themes/Jolly-SDDM-6/assets/system-suspend.svg" + text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Suspend to RAM", "Sleep") + fontSize: parseInt(config.fontSize) + 1 + onClicked: sddm.suspend() + enabled: sddm.canSuspend + }, + ActionButton { + iconSource: "/usr/share/sddm/themes/Jolly-SDDM-6/assets/system-reboot.svg" + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Restart") + fontSize: parseInt(config.fontSize) + 1 + onClicked: sddm.reboot() + enabled: sddm.canReboot + }, + ActionButton { + iconSource: "/usr/share/sddm/themes/Jolly-SDDM-6/assets/system-shutdown.svg" + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Shut Down") + fontSize: parseInt(config.fontSize) + 1 + onClicked: sddm.powerOff() + enabled: sddm.canPowerOff + }, + ActionButton { + iconSource: "/usr/share/sddm/themes/Jolly-SDDM-6/assets/system-user-prompt.svg" + text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "For switching to a username and password prompt", "Other…") + fontSize: parseInt(config.fontSize) + 1 + onClicked: mainStack.push(userPromptComponent) + enabled: true + visible: !userListComponent.showUsernamePrompt + }] + + onLoginRequest: { + root.notificationMessage = "" + sddm.login(username, password, sessionButton.currentIndex) + } + } + + Behavior on opacity { + OpacityAnimator { + duration: Kirigami.Units.longDuration + } + } + + readonly property real zoomFactor: 1.5 + + 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 + } + } + + popExit: Transition { + ScaleAnimator { + from: 1 + to: 1 / mainStack.zoomFactor + duration: Kirigami.Units.veryLongDuration + easing.type: Easing.OutCubic + } + OpacityAnimator { + from: 1 + to: 0 + duration: Kirigami.Units.veryLongDuration + easing.type: Easing.OutCubic + } + } + + pushEnter: Transition { + ScaleAnimator { + from: 1 / 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 + } + } + + 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 + } + } + } + + VirtualKeyboardLoader { + id: inputPanel + + z: 1 + + screenRoot: root + mainStack: mainStack + mainBlock: userListComponent + passwordField: userListComponent.mainPasswordBox + } + + Component { + id: userPromptComponent + Login { + showUsernamePrompt: true + notificationMessage: root.notificationMessage + //loginScreenUiVisible: loginScreenRoot.uiVisible + fontSize: parseInt(config.fontSize) + 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_lookandfeel_org.kde.lookandfeel", "Type in Username and Password")); + setProperty(0, "icon", Qt.resolvedUrl("faces/.face.icon")) + } + } + + onLoginRequest: { + root.notificationMessage = "" + sddm.login(username, password, sessionButton.currentIndex) + } + + actionItemsVisible: !inputPanel.keyboardActive + actionItems: [ + ActionButton { + iconSource: "/usr/share/sddm/themes/Jolly-SDDM-6/assets/system-suspend.svg" + text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Suspend to RAM", "Sleep") + fontSize: parseInt(config.fontSize) + 1 + onClicked: sddm.suspend() + enabled: sddm.canSuspend + }, + ActionButton { + iconSource: "/usr/share/sddm/themes/Jolly-SDDM-6/assets/system-reboot.svg" + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Restart") + fontSize: parseInt(config.fontSize) + 1 + onClicked: sddm.reboot() + enabled: sddm.canReboot + }, + ActionButton { + iconSource: "/usr/share/sddm/themes/Jolly-SDDM-6/assets/system-shutdown.svg" + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Shut Down") + fontSize: parseInt(config.fontSize) + 1 + onClicked: sddm.powerOff() + enabled: sddm.canPowerOff + }, + ActionButton { + iconSource: "/usr/share/sddm/themes/Jolly-SDDM-6/assets/system-switch-user.svg" + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "List Users") + fontSize: parseInt(config.fontSize) + 1 + onClicked: mainStack.pop() + } + ] + } + } + + 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 + } + } + } + + 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 + } + } + } + + // 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 + anchors { + bottom: parent.bottom + left: parent.left + right: parent.right + margins: Kirigami.Units.smallSpacing + } + spacing: Kirigami.Units.smallSpacing + + Behavior on opacity { + OpacityAnimator { + duration: Kirigami.Units.longDuration + } + } + + PlasmaComponents3.ToolButton { + id: virtualKeyboardButton + + text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to show/hide virtual keyboard", "Virtual Keyboard") + font.pointSize: config.fontSize + 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() + } + visible: false + + Layout.fillHeight: true + containmentMask: Item { + parent: virtualKeyboardButton + anchors.fill: parent + anchors.leftMargin: -footer.anchors.margins + anchors.bottomMargin: -footer.anchors.margins + } + } + + KeyboardButton { + id: keyboardButton + + font.pointSize: config.fontSize + + 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 + } + } + + SessionButton { + id: sessionButton + + font.pointSize: config.fontSize + + onSessionChanged: { + // Otherwise the password field loses focus and virtual keyboard + // keystrokes get eaten + userListComponent.mainPasswordBox.forceActiveFocus(); + } + + 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 + } + } + + Item { + Layout.fillWidth: true + } + + Battery { + fontSize: config.fontSize + } + } + } + + Connections { + target: sddm + function onLoginFailed() { + notificationMessage = i18nd("plasma_lookandfeel_org.kde.lookandfeel", "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 + } + } + + onNotificationMessageChanged: { + if (notificationMessage) { + notificationResetTimer.start(); + } + } + + Timer { + id: notificationResetTimer + interval: 3000 + onTriggered: notificationMessage = "" + } +} diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/SessionButton.qml b/Jolly SDDM Themes/Jolly-SDDM-6/SessionButton.qml new file mode 100644 index 0000000..dceecd7 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/SessionButton.qml @@ -0,0 +1,55 @@ +/* + 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_lookandfeel_org.kde.lookandfeel", "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/Jolly SDDM Themes/Jolly-SDDM-6/assets/login.svg b/Jolly SDDM Themes/Jolly-SDDM-6/assets/login.svg new file mode 100644 index 0000000..71edcd4 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/assets/login.svg @@ -0,0 +1,83 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-reboot.svg b/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-reboot.svg new file mode 100644 index 0000000..79ab1cd --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-reboot.svg @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-shutdown.svg b/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-shutdown.svg new file mode 100644 index 0000000..bda8fa3 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-shutdown.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-suspend.svg b/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-suspend.svg new file mode 100644 index 0000000..b6ba7a0 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-suspend.svg @@ -0,0 +1,91 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-switch-user.svg b/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-switch-user.svg new file mode 100644 index 0000000..484f74b --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-switch-user.svg @@ -0,0 +1,90 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-user-prompt.svg b/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-user-prompt.svg new file mode 100644 index 0000000..f0e9094 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/assets/system-user-prompt.svg @@ -0,0 +1,107 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/default-logo.svg b/Jolly SDDM Themes/Jolly-SDDM-6/default-logo.svg new file mode 100644 index 0000000..722113d --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/default-logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/metadata.desktop b/Jolly SDDM Themes/Jolly-SDDM-6/metadata.desktop new file mode 100644 index 0000000..9929342 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/metadata.desktop @@ -0,0 +1,16 @@ +[SddmGreeterTheme] +Name=Jolly-SDDM-6 +Description=Jolly-SDDM Theme For Plasma 6 +Author=l4k1 +License=GPLv3 +Type=sddm-theme +Version=1.0 +Website= +Screenshot=preview.png +MainScript=Main.qml +ConfigFile=theme.conf +TranslationsDirectory=translations +Email=l4k1987@gmail.com +Theme-Id=Jolly-SDDM-6 +Theme-API=2.0 +QtVersion=6 diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/preview.png b/Jolly SDDM Themes/Jolly-SDDM-6/preview.png new file mode 100644 index 0000000..1fecd10 Binary files /dev/null and b/Jolly SDDM Themes/Jolly-SDDM-6/preview.png differ diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/theme.conf b/Jolly SDDM Themes/Jolly-SDDM-6/theme.conf new file mode 100644 index 0000000..7f0463b --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/theme.conf @@ -0,0 +1,6 @@ +[General] +type=image +color=#1f1d36 +fontSize=10 +background=Jolly-Nebula Wallpaper With Plasma Logo.jpg + diff --git a/Jolly SDDM Themes/Jolly-SDDM-6/theme.conf.user b/Jolly SDDM Themes/Jolly-SDDM-6/theme.conf.user new file mode 100644 index 0000000..68c6642 --- /dev/null +++ b/Jolly SDDM Themes/Jolly-SDDM-6/theme.conf.user @@ -0,0 +1,2 @@ +[General] +type=image