diff options
Diffstat (limited to 'usr/share/sddm')
62 files changed, 3697 insertions, 0 deletions
diff --git a/usr/share/sddm/themes/archcraft/Assets/Hibernate.svgz b/usr/share/sddm/themes/archcraft/Assets/Hibernate.svgz Binary files differnew file mode 100644 index 00000000..c6aab4d0 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Assets/Hibernate.svgz diff --git a/usr/share/sddm/themes/archcraft/Assets/Reboot.svgz b/usr/share/sddm/themes/archcraft/Assets/Reboot.svgz Binary files differnew file mode 100644 index 00000000..1958f78d --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Assets/Reboot.svgz diff --git a/usr/share/sddm/themes/archcraft/Assets/Shutdown.svgz b/usr/share/sddm/themes/archcraft/Assets/Shutdown.svgz Binary files differnew file mode 100644 index 00000000..48456751 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Assets/Shutdown.svgz diff --git a/usr/share/sddm/themes/archcraft/Assets/Suspend.svgz b/usr/share/sddm/themes/archcraft/Assets/Suspend.svgz Binary files differnew file mode 100644 index 00000000..dd230f77 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Assets/Suspend.svgz diff --git a/usr/share/sddm/themes/archcraft/Assets/User.svgz b/usr/share/sddm/themes/archcraft/Assets/User.svgz Binary files differnew file mode 100644 index 00000000..e8bbdbf1 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Assets/User.svgz diff --git a/usr/share/sddm/themes/archcraft/Backgrounds/bg-0.jpg b/usr/share/sddm/themes/archcraft/Backgrounds/bg-0.jpg Binary files differnew file mode 100644 index 00000000..9160ef15 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Backgrounds/bg-0.jpg diff --git a/usr/share/sddm/themes/archcraft/Backgrounds/bg-1.png b/usr/share/sddm/themes/archcraft/Backgrounds/bg-1.png Binary files differnew file mode 100644 index 00000000..83b910d9 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Backgrounds/bg-1.png diff --git a/usr/share/sddm/themes/archcraft/Backgrounds/bg-2.png b/usr/share/sddm/themes/archcraft/Backgrounds/bg-2.png Binary files differnew file mode 100644 index 00000000..ef897ffe --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Backgrounds/bg-2.png diff --git a/usr/share/sddm/themes/archcraft/Backgrounds/bg-3.png b/usr/share/sddm/themes/archcraft/Backgrounds/bg-3.png Binary files differnew file mode 100644 index 00000000..ac580ce8 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Backgrounds/bg-3.png diff --git a/usr/share/sddm/themes/archcraft/Backgrounds/bg-4.png b/usr/share/sddm/themes/archcraft/Backgrounds/bg-4.png Binary files differnew file mode 100644 index 00000000..d00237f4 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Backgrounds/bg-4.png diff --git a/usr/share/sddm/themes/archcraft/Components/Clock.qml b/usr/share/sddm/themes/archcraft/Components/Clock.qml new file mode 100644 index 00000000..e809efc1 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Components/Clock.qml @@ -0,0 +1,76 @@ +// +// This file is part of SDDM Sugar Candy. +// A theme for the Simple Display Desktop Manager. +// +// Copyright (C) 2018–2020 Marian Arlt +// +// SDDM Sugar Candy is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or any later version. +// +// You are required to preserve this and any additional legal notices, either +// contained in this file or in other files that you received along with +// SDDM Sugar Candy that refer to the author(s) in accordance with +// sections §4, §5 and specifically §7b of the GNU General Public License. +// +// SDDM Sugar Candy is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/> +// + +import QtQuick 2.11 +import QtQuick.Controls 2.4 + +Column { + id: clock + spacing: 0 + width: parent.width / 2 + + Label { + anchors.horizontalCenter: parent.horizontalCenter + font.pointSize: config.HeaderText !=="" ? root.font.pointSize * 3 : 0 + color: root.palette.text + renderType: Text.QtRendering + text: config.HeaderText + } + + Label { + id: timeLabel + anchors.horizontalCenter: parent.horizontalCenter + font.pointSize: root.font.pointSize * 3 + color: root.palette.text + renderType: Text.QtRendering + function updateTime() { + text = new Date().toLocaleTimeString(Qt.locale(config.Locale), config.HourFormat == "long" ? Locale.LongFormat : config.HourFormat !== "" ? config.HourFormat : Locale.ShortFormat) + } + } + + Label { + id: dateLabel + anchors.horizontalCenter: parent.horizontalCenter + color: root.palette.text + renderType: Text.QtRendering + function updateTime() { + text = new Date().toLocaleDateString(Qt.locale(config.Locale), config.DateFormat == "short" ? Locale.ShortFormat : config.DateFormat !== "" ? config.DateFormat : Locale.LongFormat) + } + } + + Timer { + interval: 1000 + repeat: true + running: true + onTriggered: { + dateLabel.updateTime() + timeLabel.updateTime() + } + } + + Component.onCompleted: { + dateLabel.updateTime() + timeLabel.updateTime() + } +} diff --git a/usr/share/sddm/themes/archcraft/Components/Input.qml b/usr/share/sddm/themes/archcraft/Components/Input.qml new file mode 100644 index 00000000..6dace924 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Components/Input.qml @@ -0,0 +1,576 @@ +// +// This file is part of SDDM Sugar Candy. +// A theme for the Simple Display Desktop Manager. +// +// Copyright (C) 2018–2020 Marian Arlt +// +// SDDM Sugar Candy is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or any later version. +// +// You are required to preserve this and any additional legal notices, either +// contained in this file or in other files that you received along with +// SDDM Sugar Candy that refer to the author(s) in accordance with +// sections §4, §5 and specifically §7b of the GNU General Public License. +// +// SDDM Sugar Candy is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/> +// + +import QtQuick 2.11 +import QtQuick.Layouts 1.11 +import QtQuick.Controls 2.4 +import QtGraphicalEffects 1.0 + +Column { + id: inputContainer + Layout.fillWidth: true + + property Control exposeSession: sessionSelect.exposeSession + property bool failed + + Item { + id: usernameField + + height: root.font.pointSize * 4.5 + width: parent.width / 2 + anchors.horizontalCenter: parent.horizontalCenter + + ComboBox { + + id: selectUser + + width: parent.height + height: parent.height + anchors.left: parent.left + + property var popkey: config.ForceRightToLeft == "true" ? Qt.Key_Right : Qt.Key_Left + Keys.onPressed: { + if (event.key == Qt.Key_Down && !popup.opened) + username.forceActiveFocus(); + if ((event.key == Qt.Key_Up || event.key == popkey) && !popup.opened) + popup.open(); + } + KeyNavigation.down: username + KeyNavigation.right: username + z: 2 + + model: userModel + currentIndex: model.lastIndex + textRole: "name" + hoverEnabled: true + onActivated: { + username.text = currentText + } + + delegate: ItemDelegate { + width: parent.width + anchors.horizontalCenter: parent.horizontalCenter + contentItem: Text { + text: model.name + font.pointSize: root.font.pointSize * 0.8 + font.capitalization: Font.Capitalize + color: selectUser.highlightedIndex === index ? root.palette.highlight.hslLightness >= 0.7 ? "#444" : "white" : root.palette.window.hslLightness >= 0.8 ? root.palette.highlight.hslLightness >= 0.8 ? "#444" : root.palette.highlight : "white" + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } + highlighted: parent.highlightedIndex === index + background: Rectangle { + color: selectUser.highlightedIndex === index ? root.palette.highlight : "transparent" + } + } + + indicator: Button { + id: usernameIcon + width: selectUser.height * 0.8 + height: parent.height + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: selectUser.height * 0.125 + icon.height: parent.height * 0.25 + icon.width: parent.height * 0.25 + enabled: false + icon.color: root.palette.text + icon.source: Qt.resolvedUrl("../Assets/User.svgz") + } + + background: Rectangle { + color: "transparent" + border.color: "transparent" + } + + popup: Popup { + y: parent.height - username.height / 3 + x: config.ForceRightToLeft == "true" ? -loginButton.width + selectUser.width : 0 + rightMargin: config.ForceRightToLeft == "true" ? root.padding + usernameField.width / 2 : undefined + width: usernameField.width + implicitHeight: contentItem.implicitHeight + padding: 10 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + 20 + model: selectUser.popup.visible ? selectUser.delegateModel : null + currentIndex: selectUser.highlightedIndex + ScrollIndicator.vertical: ScrollIndicator { } + } + + background: Rectangle { + radius: config.RoundCorners / 2 + color: root.palette.window + layer.enabled: true + layer.effect: DropShadow { + transparentBorder: true + horizontalOffset: 0 + verticalOffset: 10 * config.InterfaceShadowSize + radius: 20 * config.InterfaceShadowSize + samples: 41 * config.InterfaceShadowSize + cached: true + color: Qt.hsla(0,0,0,config.InterfaceShadowOpacity) + } + } + + enter: Transition { + NumberAnimation { property: "opacity"; from: 0; to: 1 } + } + } + + states: [ + State { + name: "pressed" + when: selectUser.down + PropertyChanges { + target: usernameIcon + icon.color: Qt.lighter(root.palette.highlight, 1.1) + } + }, + State { + name: "hovered" + when: selectUser.hovered + PropertyChanges { + target: usernameIcon + icon.color: Qt.lighter(root.palette.highlight, 1.2) + } + }, + State { + name: "focused" + when: selectUser.activeFocus + PropertyChanges { + target: usernameIcon + icon.color: root.palette.highlight + } + } + ] + + transitions: [ + Transition { + PropertyAnimation { + properties: "color, border.color, icon.color" + duration: 150 + } + } + ] + + } + + TextField { + id: username + text: config.ForceLastUser == "true" ? selectUser.currentText : null + font.capitalization: config.AllowBadUsernames == "false" ? Font.Capitalize : Font.MixedCase + anchors.centerIn: parent + height: root.font.pointSize * 3 + width: parent.width + placeholderText: config.TranslatePlaceholderUsername || textConstants.userName + selectByMouse: true + horizontalAlignment: TextInput.AlignHCenter + renderType: Text.QtRendering + onFocusChanged:{ + if(focus) + selectAll() + } + background: Rectangle { + color: "transparent" + border.color: root.palette.text + border.width: parent.activeFocus ? 2 : 1 + radius: config.RoundCorners || 0 + } + onAccepted: loginButton.clicked() + KeyNavigation.down: password + z: 1 + + states: [ + State { + name: "focused" + when: username.activeFocus + PropertyChanges { + target: username.background + border.color: root.palette.highlight + } + PropertyChanges { + target: username + color: root.palette.highlight + } + } + ] + } + + } + + Item { + id: passwordField + height: root.font.pointSize * 4.5 + width: parent.width / 2 + anchors.horizontalCenter: parent.horizontalCenter + + TextField { + id: password + anchors.centerIn: parent + height: root.font.pointSize * 3 + width: parent.width + focus: config.ForcePasswordFocus == "true" ? true : false + selectByMouse: true + echoMode: revealSecret.checked ? TextInput.Normal : TextInput.Password + placeholderText: config.TranslatePlaceholderPassword || textConstants.password + horizontalAlignment: TextInput.AlignHCenter + passwordCharacter: "•" + passwordMaskDelay: config.ForceHideCompletePassword == "true" ? undefined : 1000 + renderType: Text.QtRendering + background: Rectangle { + color: "transparent" + border.color: root.palette.text + border.width: parent.activeFocus ? 2 : 1 + radius: config.RoundCorners || 0 + } + onAccepted: loginButton.clicked() + KeyNavigation.down: revealSecret + } + + states: [ + State { + name: "focused" + when: password.activeFocus + PropertyChanges { + target: password.background + border.color: root.palette.highlight + } + PropertyChanges { + target: password + color: root.palette.highlight + } + } + ] + + transitions: [ + Transition { + PropertyAnimation { + properties: "color, border.color" + duration: 150 + } + } + ] + } + + Item { + id: secretCheckBox + height: root.font.pointSize * 7 + width: parent.width / 2 + anchors.horizontalCenter: parent.horizontalCenter + + CheckBox { + id: revealSecret + width: parent.width + hoverEnabled: true + + indicator: Rectangle { + id: indicator + anchors.left: parent.left + anchors.top: parent.top + anchors.topMargin: 3 + anchors.leftMargin: 4 + implicitHeight: root.font.pointSize + implicitWidth: root.font.pointSize + color: "transparent" + border.color: root.palette.text + border.width: parent.activeFocus ? 2 : 1 + Rectangle { + id: dot + anchors.centerIn: parent + implicitHeight: parent.width - 6 + implicitWidth: parent.width - 6 + color: root.palette.text + opacity: revealSecret.checked ? 1 : 0 + } + } + + contentItem: Text { + id: indicatorLabel + text: config.TranslateShowPassword || "Show Password" + anchors.verticalCenter: indicator.verticalCenter + horizontalAlignment: Text.AlignLeft + anchors.left: indicator.right + anchors.leftMargin: indicator.width / 2 + font.pointSize: root.font.pointSize * 0.8 + color: root.palette.text + } + + Keys.onReturnPressed: toggle() + Keys.onEnterPressed: toggle() + KeyNavigation.down: loginButton + + background: Rectangle { + color: "transparent" + border.width: parent.activeFocus ? 1 : 0 + border.color: parent.activeFocus ? root.palette.text : "transparent" + height: parent.activeFocus ? 2 : 0 + width: (indicator.width + indicatorLabel.contentWidth + indicatorLabel.anchors.leftMargin + 2) + anchors.top: indicatorLabel.bottom + anchors.left: parent.left + anchors.leftMargin: 3 + anchors.topMargin: 8 + } + } + + states: [ + State { + name: "pressed" + when: revealSecret.down + PropertyChanges { + target: revealSecret.contentItem + color: Qt.darker(root.palette.highlight, 1.1) + } + PropertyChanges { + target: dot + color: Qt.darker(root.palette.highlight, 1.1) + } + PropertyChanges { + target: indicator + border.color: Qt.darker(root.palette.highlight, 1.1) + } + PropertyChanges { + target: revealSecret.background + border.color: Qt.darker(root.palette.highlight, 1.1) + } + }, + State { + name: "hovered" + when: revealSecret.hovered + PropertyChanges { + target: indicatorLabel + color: Qt.lighter(root.palette.highlight, 1.1) + } + PropertyChanges { + target: indicator + border.color: Qt.lighter(root.palette.highlight, 1.1) + } + PropertyChanges { + target: dot + color: Qt.lighter(root.palette.highlight, 1.1) + } + PropertyChanges { + target: revealSecret.background + border.color: Qt.lighter(root.palette.highlight, 1.1) + } + }, + State { + name: "focused" + when: revealSecret.activeFocus + PropertyChanges { + target: indicatorLabel + color: root.palette.highlight + } + PropertyChanges { + target: indicator + border.color: root.palette.highlight + } + PropertyChanges { + target: dot + color: root.palette.highlight + } + PropertyChanges { + target: revealSecret.background + border.color: root.palette.highlight + } + } + ] + + transitions: [ + Transition { + PropertyAnimation { + properties: "color, border.color, opacity" + duration: 150 + } + } + ] + + } + + Item { + height: root.font.pointSize * 2.3 + width: parent.width / 2 + anchors.horizontalCenter: parent.horizontalCenter + Label { + id: errorMessage + width: parent.width + text: failed ? config.TranslateLoginFailedWarning || textConstants.loginFailed + "!" : keyboard.capsLock ? config.TranslateCapslockWarning || textConstants.capslockWarning : null + horizontalAlignment: Text.AlignHCenter + font.pointSize: root.font.pointSize * 0.8 + font.italic: true + color: root.palette.text + opacity: 0 + states: [ + State { + name: "fail" + when: failed + PropertyChanges { + target: errorMessage + opacity: 1 + } + }, + State { + name: "capslock" + when: keyboard.capsLock + PropertyChanges { + target: errorMessage + opacity: 1 + } + } + ] + transitions: [ + Transition { + PropertyAnimation { + properties: "opacity" + duration: 100 + } + } + ] + } + } + + Item { + id: login + height: root.font.pointSize * 3 + width: parent.width / 2 + anchors.horizontalCenter: parent.horizontalCenter + + Button { + id: loginButton + anchors.horizontalCenter: parent.horizontalCenter + text: config.TranslateLogin || textConstants.login + height: root.font.pointSize * 3 + implicitWidth: parent.width + enabled: config.AllowEmptyPassword == "true" || username.text != "" && password.text != "" ? true : false + hoverEnabled: true + + contentItem: Text { + text: parent.text + color: config.OverrideLoginButtonTextColor != "" ? config.OverrideLoginButtonTextColor : root.palette.highlight.hslLightness >= 0.7 ? "#444" : "white" + font.pointSize: root.font.pointSize + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + opacity: 0.5 + } + + background: Rectangle { + id: buttonBackground + color: "white" + opacity: 0.2 + radius: config.RoundCorners || 0 + } + + states: [ + State { + name: "pressed" + when: loginButton.down + PropertyChanges { + target: buttonBackground + color: Qt.darker(root.palette.highlight, 1.1) + opacity: 1 + } + PropertyChanges { + target: loginButton.contentItem + } + }, + State { + name: "hovered" + when: loginButton.hovered + PropertyChanges { + target: buttonBackground + color: Qt.lighter(root.palette.highlight, 1.15) + opacity: 1 + } + PropertyChanges { + target: loginButton.contentItem + opacity: 1 + } + }, + State { + name: "focused" + when: loginButton.activeFocus + PropertyChanges { + target: buttonBackground + color: Qt.lighter(root.palette.highlight, 1.2) + opacity: 1 + } + PropertyChanges { + target: loginButton.contentItem + opacity: 1 + } + }, + State { + name: "enabled" + when: loginButton.enabled + PropertyChanges { + target: buttonBackground; + color: root.palette.highlight; + opacity: 1 + } + PropertyChanges { + target: loginButton.contentItem; + opacity: 1 + } + } + ] + + transitions: [ + Transition { + PropertyAnimation { + properties: "opacity, color"; + duration: 300 + } + } + ] + + onClicked: config.AllowBadUsernames == "false" ? sddm.login(username.text.toLowerCase(), password.text, sessionSelect.selectedSession) : sddm.login(username.text, password.text, sessionSelect.selectedSession) + Keys.onReturnPressed: clicked() + Keys.onEnterPressed: clicked() + KeyNavigation.down: sessionSelect.exposeSession + } + } + + SessionButton { + id: sessionSelect + textConstantSession: textConstants.session + loginButtonWidth: loginButton.background.width + } + + Connections { + target: sddm + onLoginSucceeded: {} + onLoginFailed: { + failed = true + resetError.running ? resetError.stop() && resetError.start() : resetError.start() + } + } + + Timer { + id: resetError + interval: 2000 + onTriggered: failed = false + running: false + } +} diff --git a/usr/share/sddm/themes/archcraft/Components/LoginForm.qml b/usr/share/sddm/themes/archcraft/Components/LoginForm.qml new file mode 100644 index 00000000..70212564 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Components/LoginForm.qml @@ -0,0 +1,63 @@ +// +// This file is part of SDDM Sugar Candy. +// A theme for the Simple Display Desktop Manager. +// +// Copyright (C) 2018–2020 Marian Arlt +// +// SDDM Sugar Candy is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or any later version. +// +// You are required to preserve this and any additional legal notices, either +// contained in this file or in other files that you received along with +// SDDM Sugar Candy that refer to the author(s) in accordance with +// sections §4, §5 and specifically §7b of the GNU General Public License. +// +// SDDM Sugar Candy is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/> +// + +import QtQuick 2.11 +import QtQuick.Layouts 1.11 +import SddmComponents 2.0 as SDDM + +ColumnLayout { + id: formContainer + SDDM.TextConstants { id: textConstants } + + property int p: config.ScreenPadding + property string a: config.FormPosition + property alias systemButtonVisibility: systemButtons.visible + property alias clockVisibility: clock.visible + property bool virtualKeyboardActive + + Clock { + id: clock + Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom + Layout.preferredHeight: root.height / 4 + Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0 + } + + Input { + id: input + Layout.alignment: Qt.AlignVCenter + Layout.preferredHeight: root.height / 10 + Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0 + Layout.topMargin: virtualKeyboardActive ? -height * 1.5 : 0 + } + + SystemButtons { + id: systemButtons + Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom + Layout.preferredHeight: root.height / 4 + Layout.maximumHeight: root.height / 4 + Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0 + exposedSession: input.exposeSession + } + +} diff --git a/usr/share/sddm/themes/archcraft/Components/SessionButton.qml b/usr/share/sddm/themes/archcraft/Components/SessionButton.qml new file mode 100644 index 00000000..945f9251 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Components/SessionButton.qml @@ -0,0 +1,194 @@ +// +// This file is part of SDDM Sugar Candy. +// A theme for the Simple Display Desktop Manager. +// +// Copyright (C) 2018–2020 Marian Arlt +// +// SDDM Sugar Candy is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or any later version. +// +// You are required to preserve this and any additional legal notices, either +// contained in this file or in other files that you received along with +// SDDM Sugar Candy that refer to the author(s) in accordance with +// sections §4, §5 and specifically §7b of the GNU General Public License. +// +// SDDM Sugar Candy is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/> +// + +import QtQuick 2.11 +import QtQuick.Controls 2.4 +import QtGraphicalEffects 1.0 + +Item { + id: sessionButton + height: root.font.pointSize + width: parent.width / 2 + anchors.horizontalCenter: parent.horizontalCenter + + property var selectedSession: selectSession.currentIndex + property string textConstantSession + property int loginButtonWidth + property Control exposeSession: selectSession + + ComboBox { + id: selectSession + + hoverEnabled: true + anchors.left: parent.left + Keys.onPressed: { + if (event.key == Qt.Key_Up && loginButton.state != "enabled" && !popup.opened) + revealSecret.focus = true, + revealSecret.state = "focused", + currentIndex = currentIndex + 1; + if (event.key == Qt.Key_Up && loginButton.state == "enabled" && !popup.opened) + loginButton.focus = true, + loginButton.state = "focused", + currentIndex = currentIndex + 1; + if (event.key == Qt.Key_Down && !popup.opened) + systemButtons.children[0].focus = true, + systemButtons.children[0].state = "focused", + currentIndex = currentIndex - 1; + if ((event.key == Qt.Key_Left || event.key == Qt.Key_Right) && !popup.opened) + popup.open(); + } + + model: sessionModel + currentIndex: model.lastIndex + textRole: "name" + + delegate: ItemDelegate { + width: parent.width + anchors.horizontalCenter: parent.horizontalCenter + contentItem: Text { + text: model.name + font.pointSize: root.font.pointSize * 0.8 + color: selectSession.highlightedIndex === index ? root.palette.highlight.hslLightness >= 0.7 ? "#444444" : "white" : root.palette.window.hslLightness >= 0.8 ? root.palette.highlight.hslLightness >= 0.8 ? "#444444" : root.palette.highlight : "white" + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } + highlighted: parent.highlightedIndex === index + background: Rectangle { + color: selectSession.highlightedIndex === index ? root.palette.highlight : "transparent" + } + } + + indicator { + visible: false + } + + contentItem: Text { + id: displayedItem + text: (config.TranslateSession || (textConstantSession + ":")) + " " + selectSession.currentText + color: root.palette.text + verticalAlignment: Text.AlignVCenter + anchors.left: parent.left + anchors.leftMargin: 3 + font.pointSize: root.font.pointSize * 0.8 + Keys.onReleased: parent.popup.open() + } + + background: Rectangle { + color: "transparent" + border.width: parent.visualFocus ? 1 : 0 + border.color: "transparent" + height: parent.visualFocus ? 2 : 0 + width: displayedItem.implicitWidth + anchors.top: parent.bottom + anchors.left: parent.left + anchors.leftMargin: 3 + } + + popup: Popup { + id: popupHandler + y: parent.height - 1 + x: config.ForceRightToLeft == "true" ? -loginButtonWidth + displayedItem.width : 0 + width: sessionButton.width + implicitHeight: contentItem.implicitHeight + padding: 10 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + 20 + model: selectSession.popup.visible ? selectSession.delegateModel : null + currentIndex: selectSession.highlightedIndex + ScrollIndicator.vertical: ScrollIndicator { } + } + + background: Rectangle { + radius: config.RoundCorners / 2 + color: config.BackgroundColor + layer.enabled: true + layer.effect: DropShadow { + transparentBorder: true + horizontalOffset: 0 + verticalOffset: 0 + radius: 20 * config.InterfaceShadowSize + samples: 41 * config.InterfaceShadowSize + cached: true + color: Qt.hsla(0,0,0,config.InterfaceShadowOpacity) + } + } + + enter: Transition { + NumberAnimation { property: "opacity"; from: 0; to: 1 } + } + } + + states: [ + State { + name: "pressed" + when: selectSession.down + PropertyChanges { + target: displayedItem + color: Qt.darker(root.palette.highlight, 1.1) + } + PropertyChanges { + target: selectSession.background + border.color: Qt.darker(root.palette.highlight, 1.1) + } + }, + State { + name: "hovered" + when: selectSession.hovered + PropertyChanges { + target: displayedItem + color: Qt.lighter(root.palette.highlight, 1.1) + } + PropertyChanges { + target: selectSession.background + border.color: Qt.lighter(root.palette.highlight, 1.1) + } + }, + State { + name: "focused" + when: selectSession.visualFocus + PropertyChanges { + target: displayedItem + color: root.palette.highlight + } + PropertyChanges { + target: selectSession.background + border.color: root.palette.highlight + } + } + ] + + transitions: [ + Transition { + PropertyAnimation { + properties: "color, border.color" + duration: 150 + } + } + ] + + } + +} diff --git a/usr/share/sddm/themes/archcraft/Components/SystemButtons.qml b/usr/share/sddm/themes/archcraft/Components/SystemButtons.qml new file mode 100644 index 00000000..511470d7 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Components/SystemButtons.qml @@ -0,0 +1,124 @@ +// +// This file is part of SDDM Sugar Candy. +// A theme for the Simple Display Desktop Manager. +// +// Copyright (C) 2018–2020 Marian Arlt +// +// SDDM Sugar Candy is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or any later version. +// +// You are required to preserve this and any additional legal notices, either +// contained in this file or in other files that you received along with +// SDDM Sugar Candy that refer to the author(s) in accordance with +// sections §4, §5 and specifically §7b of the GNU General Public License. +// +// SDDM Sugar Candy is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/> +// + +import QtQuick 2.11 +import QtQuick.Layouts 1.11 +import QtQuick.Controls 2.4 + +RowLayout { + + spacing: root.font.pointSize + + property var suspend: ["Suspend", config.TranslateSuspend || textConstants.suspend, sddm.canSuspend] + property var hibernate: ["Hibernate", config.TranslateHibernate || textConstants.hibernate, sddm.canHibernate] + property var reboot: ["Reboot", config.TranslateReboot || textConstants.reboot, sddm.canReboot] + property var shutdown: ["Shutdown", config.TranslateShutdown || textConstants.shutdown, sddm.canPowerOff] + + property Control exposedSession + + Repeater { + + id: systemButtons + model: [suspend, hibernate, reboot, shutdown] + + RoundButton { + text: modelData[1] + font.pointSize: root.font.pointSize * 0.8 + Layout.alignment: Qt.AlignHCenter + icon.source: modelData ? Qt.resolvedUrl("../Assets/" + modelData[0] + ".svgz") : "" + icon.height: 2 * Math.round((root.font.pointSize * 3) / 2) + icon.width: 2 * Math.round((root.font.pointSize * 3) / 2) + display: AbstractButton.TextUnderIcon + visible: config.ForceHideSystemButtons != "true" && modelData[2] + hoverEnabled: true + palette.buttonText: root.palette.text + background: Rectangle { + height: 2 + color: "transparent" + width: parent.width + border.width: parent.activeFocus ? 1 : 0 + border.color: "transparent" + anchors.top: parent.bottom + } + Keys.onReturnPressed: clicked() + onClicked: { + parent.forceActiveFocus() + index == 0 ? sddm.suspend() : index == 1 ? sddm.hibernate() : index == 2 ? sddm.reboot() : sddm.powerOff() + } + KeyNavigation.up: exposedSession + KeyNavigation.left: parent.children[index-1] + + states: [ + State { + name: "pressed" + when: parent.children[index].down + PropertyChanges { + target: parent.children[index] + palette.buttonText: Qt.darker(root.palette.highlight, 1.1) + } + PropertyChanges { + target: parent.children[index].background + border.color: Qt.darker(root.palette.highlight, 1.1) + } + }, + State { + name: "hovered" + when: parent.children[index].hovered + PropertyChanges { + target: parent.children[index] + palette.buttonText: Qt.lighter(root.palette.highlight, 1.1) + } + PropertyChanges { + target: parent.children[index].background + border.color: Qt.lighter(root.palette.highlight, 1.1) + } + }, + State { + name: "focused" + when: parent.children[index].activeFocus + PropertyChanges { + target: parent.children[index] + palette.buttonText: root.palette.highlight + } + PropertyChanges { + target: parent.children[index].background + border.color: root.palette.highlight + } + } + ] + + transitions: [ + Transition { + PropertyAnimation { + properties: "palette.buttonText, border.color" + duration: 150 + } + } + ] + + } + + } + +} diff --git a/usr/share/sddm/themes/archcraft/Components/UserList.qml b/usr/share/sddm/themes/archcraft/Components/UserList.qml new file mode 100644 index 00000000..c6844be9 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Components/UserList.qml @@ -0,0 +1,202 @@ +// +// This file is part of SDDM Sugar Candy. +// A theme for the Simple Display Desktop Manager. +// +// Copyright (C) 2018–2020 Marian Arlt +// +// SDDM Sugar Candy is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or any later version. +// +// You are required to preserve this and any additional legal notices, either +// contained in this file or in other files that you received along with +// SDDM Sugar Candy that refer to the author(s) in accordance with +// sections §4, §5 and specifically §7b of the GNU General Public License. +// +// SDDM Sugar Candy is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/> +// + +import QtQuick 2.11 +import QtQuick.Controls 2.4 +import QtGraphicalEffects 1.0 + +Item { + id: usernameField + + height: root.font.pointSize * 4.5 + width: parent.width / 2 + anchors.horizontalCenter: parent.horizontalCenter + + property var selectedUser: selectUser.currentIndex + property alias user: username.text + + ComboBox { + + id: selectUser + + width: parent.height + height: parent.height + anchors.left: parent.left + z: 2 + + model: userModel + currentIndex: model.lastIndex + textRole: "name" + hoverEnabled: true + onActivated: { + username.text = currentText + } + + delegate: ItemDelegate { + width: parent.width + anchors.horizontalCenter: parent.horizontalCenter + contentItem: Text { + text: model.name + font.pointSize: root.font.pointSize * 0.8 + font.capitalization: Font.Capitalize + color: selectUser.highlightedIndex === index ? "white" : root.palette.window.hslLightness >= 0.8 ? root.palette.highlight : "white" + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } + highlighted: parent.highlightedIndex === index + background: Rectangle { + color: selectUser.highlightedIndex === index ? root.palette.highlight : "transparent" + } + } + + indicator: Button { + id: usernameIcon + width: selectUser.height * 0.8 + height: parent.height + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: selectUser.height * 0.125 + icon.height: parent.height * 0.25 + icon.width: parent.height * 0.25 + enabled: false + icon.color: root.palette.text + icon.source: Qt.resolvedUrl("../Assets/User.svgz") + } + + background: Rectangle { + color: "transparent" + border.color: "transparent" + } + + popup: Popup { + y: parent.height - username.height / 3 + rightMargin: config.ForceRightToLeft == "true" ? usernameField.width / 2 : undefined + width: usernameField.width + implicitHeight: contentItem.implicitHeight + padding: 10 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + 20 + model: selectUser.popup.visible ? selectUser.delegateModel : null + currentIndex: selectUser.highlightedIndex + ScrollIndicator.vertical: ScrollIndicator { } + } + + background: Rectangle { + radius: 10 + color: root.palette.window + layer.enabled: true + layer.effect: DropShadow { + transparentBorder: true + horizontalOffset: 0 + verticalOffset: 0 + radius: 100 + samples: 201 + cached: true + color: "#88000000" + } + } + + enter: Transition { + NumberAnimation { property: "opacity"; from: 0; to: 1 } + } + } + + states: [ + State { + name: "pressed" + when: selectUser.down + PropertyChanges { + target: usernameIcon + icon.color: Qt.lighter(root.palette.highlight, 1.1) + } + }, + State { + name: "hovered" + when: selectUser.hovered + PropertyChanges { + target: usernameIcon + icon.color: Qt.lighter(root.palette.highlight, 1.2) + } + }, + State { + name: "focused" + when: selectUser.visualFocus + PropertyChanges { + target: usernameIcon + icon.color: root.palette.highlight + } + } + ] + + transitions: [ + Transition { + PropertyAnimation { + properties: "color, border.color, icon.color" + duration: 150 + } + } + ] + + } + + TextField { + id: username + text: config.ForceLastUser == "true" ? selectUser.currentText : null + font.capitalization: Font.Capitalize + anchors.centerIn: parent + height: root.font.pointSize * 3 + width: parent.width + placeholderText: config.TranslateUsernamePlaceholder || textConstants.userName + selectByMouse: true + horizontalAlignment: TextInput.AlignHCenter + renderType: Text.QtRendering + background: Rectangle { + color: "transparent" + border.color: root.palette.text + border.width: parent.activeFocus ? 2 : 1 + radius: config.RoundCorners || 0 + } + Keys.onReturnPressed: loginButton.clicked() + KeyNavigation.down: password + z: 1 + + states: [ + State { + name: "focused" + when: username.activeFocus + PropertyChanges { + target: username.background + border.color: root.palette.highlight + } + PropertyChanges { + target: username + color: root.palette.highlight + } + } + ] + } + +} diff --git a/usr/share/sddm/themes/archcraft/Components/VirtualKeyboard.qml b/usr/share/sddm/themes/archcraft/Components/VirtualKeyboard.qml new file mode 100644 index 00000000..77b6ea67 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/Components/VirtualKeyboard.qml @@ -0,0 +1,33 @@ +// +// This file is part of SDDM Sugar Candy. +// A theme for the Simple Display Desktop Manager. +// +// Copyright (C) 2018–2020 Marian Arlt +// +// SDDM Sugar Candy is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or any later version. +// +// You are required to preserve this and any additional legal notices, either +// contained in this file or in other files that you received along with +// SDDM Sugar Candy that refer to the author(s) in accordance with +// sections §4, §5 and specifically §7b of the GNU General Public License. +// +// SDDM Sugar Candy is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/> +// + +import QtQuick 2.11 +import QtQuick.VirtualKeyboard 2.3 + +InputPanel { + id: virtualKeyboard + property bool activated: false + active: activated && Qt.inputMethod.visible + visible: active +} diff --git a/usr/share/sddm/themes/archcraft/main.qml b/usr/share/sddm/themes/archcraft/main.qml new file mode 100644 index 00000000..06a132f6 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/main.qml @@ -0,0 +1,274 @@ +// +// This file is part of SDDM Sugar Candy. +// A theme for the Simple Display Desktop Manager. +// +// Copyright (C) 2018–2020 Marian Arlt +// +// SDDM Sugar Candy is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or any later version. +// +// You are required to preserve this and any additional legal notices, either +// contained in this file or in other files that you received along with +// SDDM Sugar Candy that refer to the author(s) in accordance with +// sections §4, §5 and specifically §7b of the GNU General Public License. +// +// SDDM Sugar Candy is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/> +// + +import QtQuick 2.11 +import QtQuick.Layouts 1.11 +import QtQuick.Controls 2.4 +import QtGraphicalEffects 1.0 +import "Components" + +Pane { + id: root + + height: config.ScreenHeight || Screen.height + width: config.ScreenWidth || Screen.ScreenWidth + + LayoutMirroring.enabled: config.ForceRightToLeft == "true" ? true : Qt.application.layoutDirection === Qt.RightToLeft + LayoutMirroring.childrenInherit: true + + padding: config.ScreenPadding + palette.button: "transparent" + palette.highlight: config.AccentColor + palette.text: config.MainColor + palette.buttonText: config.MainColor + palette.window: config.BackgroundColor + + font.family: config.Font + font.pointSize: config.FontSize !== "" ? config.FontSize : parseInt(height / 80) + focus: true + + property bool leftleft: config.HaveFormBackground == "true" && + config.PartialBlur == "false" && + config.FormPosition == "left" && + config.BackgroundImageHAlignment == "left" + + property bool leftcenter: config.HaveFormBackground == "true" && + config.PartialBlur == "false" && + config.FormPosition == "left" && + config.BackgroundImageHAlignment == "center" + + property bool rightright: config.HaveFormBackground == "true" && + config.PartialBlur == "false" && + config.FormPosition == "right" && + config.BackgroundImageHAlignment == "right" + + property bool rightcenter: config.HaveFormBackground == "true" && + config.PartialBlur == "false" && + config.FormPosition == "right" && + config.BackgroundImageHAlignment == "center" + + Item { + id: sizeHelper + + anchors.fill: parent + height: parent.height + width: parent.width + + Rectangle { + id: tintLayer + anchors.fill: parent + width: parent.width + height: parent.height + color: "black" + opacity: config.DimBackgroundImage + z: 1 + } + + Rectangle { + id: formBackground + anchors.fill: form + anchors.centerIn: form + color: root.palette.window + visible: config.HaveFormBackground == "true" ? true : false + opacity: config.PartialBlur == "true" ? 0.3 : 1 + z: 1 + } + + LoginForm { + id: form + + height: virtualKeyboard.state == "visible" ? parent.height - virtualKeyboard.implicitHeight : parent.height + width: parent.width / 2.5 + anchors.horizontalCenter: config.FormPosition == "center" ? parent.horizontalCenter : undefined + anchors.left: config.FormPosition == "left" ? parent.left : undefined + anchors.right: config.FormPosition == "right" ? parent.right : undefined + virtualKeyboardActive: virtualKeyboard.state == "visible" ? true : false + z: 1 + } + + Button { + id: vkb + onClicked: virtualKeyboard.switchState() + visible: virtualKeyboard.status == Loader.Ready && config.ForceHideVirtualKeyboardButton == "false" + anchors.bottom: parent.bottom + anchors.bottomMargin: implicitHeight + anchors.horizontalCenter: form.horizontalCenter + z: 1 + contentItem: Text { + text: config.TranslateVirtualKeyboardButton || "Virtual Keyboard" + color: parent.visualFocus ? palette.highlight : palette.text + font.pointSize: root.font.pointSize * 0.8 + } + background: Rectangle { + id: vkbbg + color: "transparent" + } + } + + Loader { + id: virtualKeyboard + source: "Components/VirtualKeyboard.qml" + state: "hidden" + property bool keyboardActive: item ? item.active : false + onKeyboardActiveChanged: keyboardActive ? state = "visible" : state = "hidden" + width: parent.width + z: 1 + function switchState() { state = state == "hidden" ? "visible" : "hidden" } + states: [ + State { + name: "visible" + PropertyChanges { + target: form + systemButtonVisibility: false + clockVisibility: false + } + PropertyChanges { + target: virtualKeyboard + y: root.height - virtualKeyboard.height + opacity: 1 + } + }, + State { + name: "hidden" + PropertyChanges { + target: virtualKeyboard + y: root.height - root.height/4 + opacity: 0 + } + } + ] + transitions: [ + Transition { + from: "hidden" + to: "visible" + SequentialAnimation { + ScriptAction { + script: { + virtualKeyboard.item.activated = true; + Qt.inputMethod.show(); + } + } + ParallelAnimation { + NumberAnimation { + target: virtualKeyboard + property: "y" + duration: 100 + easing.type: Easing.OutQuad + } + OpacityAnimator { + target: virtualKeyboard + duration: 100 + easing.type: Easing.OutQuad + } + } + } + }, + Transition { + from: "visible" + to: "hidden" + SequentialAnimation { + ParallelAnimation { + NumberAnimation { + target: virtualKeyboard + property: "y" + duration: 100 + easing.type: Easing.InQuad + } + OpacityAnimator { + target: virtualKeyboard + duration: 100 + easing.type: Easing.InQuad + } + } + ScriptAction { + script: { + Qt.inputMethod.hide(); + } + } + } + } + ] + } + + Image { + id: backgroundImage + + height: parent.height + width: config.HaveFormBackground == "true" && config.FormPosition != "center" && config.PartialBlur != "true" ? parent.width - formBackground.width : parent.width + anchors.left: leftleft || + leftcenter ? + formBackground.right : undefined + + anchors.right: rightright || + rightcenter ? + formBackground.left : undefined + + horizontalAlignment: config.BackgroundImageHAlignment == "left" ? + Image.AlignLeft : + config.BackgroundImageHAlignment == "right" ? + Image.AlignRight : Image.AlignHCenter + + verticalAlignment: config.BackgroundImageVAlignment == "top" ? + Image.AlignTop : + config.BackgroundImageVAlignment == "bottom" ? + Image.AlignBottom : Image.AlignVCenter + + source: config.background || config.Background + fillMode: config.ScaleImageCropped == "true" ? Image.PreserveAspectCrop : Image.PreserveAspectFit + asynchronous: true + cache: true + clip: true + mipmap: true + } + + MouseArea { + anchors.fill: backgroundImage + onClicked: parent.forceActiveFocus() + } + + ShaderEffectSource { + id: blurMask + + sourceItem: backgroundImage + width: form.width + height: parent.height + anchors.centerIn: form + sourceRect: Qt.rect(x,y,width,height) + visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false + } + + GaussianBlur { + id: blur + + height: parent.height + width: config.FullBlur == "true" ? parent.width : form.width + source: config.FullBlur == "true" ? backgroundImage : blurMask + radius: config.BlurRadius + samples: config.BlurRadius * 2 + 1 + cached: true + anchors.centerIn: config.FullBlur == "true" ? parent : form + visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false + } + } +} diff --git a/usr/share/sddm/themes/archcraft/metadata.desktop b/usr/share/sddm/themes/archcraft/metadata.desktop new file mode 100644 index 00000000..114e726b --- /dev/null +++ b/usr/share/sddm/themes/archcraft/metadata.desktop @@ -0,0 +1,15 @@ +[SddmGreeterTheme] +Name=Archcraft +Description=Default sddm greeter theme for Archcraft +Version=1.0 +Theme-Id=archcraft +Theme-API=2.11 +Author=Aditya Shakya +Email=adi1090x@gmail.com +Copyright=Copyright (C) 2021 Aditya Shakya +License=GPL-3.0-or-later +Type=sddm-theme +Screenshot=preview.png +MainScript=main.qml +ConfigFile=theme.conf +TranslationsDirectory=translations diff --git a/usr/share/sddm/themes/archcraft/preview.png b/usr/share/sddm/themes/archcraft/preview.png Binary files differnew file mode 100644 index 00000000..1db6f994 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/preview.png diff --git a/usr/share/sddm/themes/archcraft/theme.conf b/usr/share/sddm/themes/archcraft/theme.conf new file mode 100644 index 00000000..7c110f53 --- /dev/null +++ b/usr/share/sddm/themes/archcraft/theme.conf @@ -0,0 +1,72 @@ +[General] + +## Background +Background="Backgrounds/bg-1.png" +DimBackgroundImage="0.0" +ScaleImageCropped="true" +ScreenWidth="1920" +ScreenHeight="1080" + +#------------------------------ + +## Blur +FullBlur="false" +PartialBlur="false" +BlurRadius="100" + +## Design +HaveFormBackground="false" +FormPosition="center" +BackgroundImageHAlignment="center" +BackgroundImageVAlignment="center" + +MainColor="#D8D8D8" +AccentColor="#62AEEF" +BackgroundColor="#1E2128" + +OverrideLoginButtonTextColor="" + +InterfaceShadowSize="5" +InterfaceShadowOpacity="0.25" + +RoundCorners="20" +ScreenPadding="0" + +Font="Iosevka" +FontSize="" + +#------------------------------ + +## Interface Behavior + +ForceRightToLeft="false" +ForceLastUser="true" +ForcePasswordFocus="true" +ForceHideCompletePassword="false" +ForceHideVirtualKeyboardButton="false" +ForceHideSystemButtons="false" +AllowEmptyPassword="false" +AllowBadUsernames="false" + +#------------------------------ + +## Locale Settings +Locale="" +HourFormat="HH:mm" +DateFormat="dddd, MMMM d" + +## Translations +HeaderText="Welcome!" + +TranslatePlaceholderUsername="" +TranslatePlaceholderPassword="" +TranslateShowPassword="" +TranslateLogin="" +TranslateLoginFailedWarning="" +TranslateCapslockWarning="" +TranslateSession="" +TranslateSuspend="" +TranslateHibernate="" +TranslateReboot="" +TranslateShutdown="" +TranslateVirtualKeyboardButton="" diff --git a/usr/share/sddm/themes/elarun/Main.qml b/usr/share/sddm/themes/elarun/Main.qml new file mode 100644 index 00000000..e559b741 --- /dev/null +++ b/usr/share/sddm/themes/elarun/Main.qml @@ -0,0 +1,297 @@ +/*************************************************************************** +* Copyright (c) 2013 Reza Fatahilah Shah <rshah0385@kireihana.com> +* Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci@gmail.com> +* +* Permission is hereby granted, free of charge, to any person +* obtaining a copy of this software and associated documentation +* files (the "Software"), to deal in the Software without restriction, +* including without limitation the rights to use, copy, modify, merge, +* publish, distribute, sublicense, and/or sell copies of the Software, +* and to permit persons to whom the Software is furnished to do so, +* subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +* OR OTHER DEALINGS IN THE SOFTWARE. +* +***************************************************************************/ + +import QtQuick 2.0 +import SddmComponents 2.0 + +Rectangle { + width: 640 + height: 480 + + LayoutMirroring.enabled: Qt.locale().textDirection == Qt.RightToLeft + LayoutMirroring.childrenInherit: true + + property int sessionIndex: session.index + + TextConstants { id: textConstants } + + Connections { + target: sddm + onLoginSucceeded: { + } + onInformationMessage: { + } + onLoginFailed: { + pw_entry.text = "" + } + } + + Background { + anchors.fill: parent + source: config.background + fillMode: Image.PreserveAspectCrop + onStatusChanged: { + if (status == Image.Error && source != config.defaultBackground) { + source = config.defaultBackground + } + } + } + + Rectangle { + anchors.fill: parent + color: "transparent" + //visible: primaryScreen + + Rectangle { + width: 416; height: 262 + color: "#00000000" + + anchors.centerIn: parent + + Image { + anchors.fill: parent + source: "images/rectangle.png" + } + + Image { + anchors.fill: parent + source: "images/rectangle_overlay.png" + opacity: 0.1 + } + + Item { + anchors.margins: 20 + anchors.fill: parent + + Text { + height: 50 + anchors.top: parent.top + anchors.left: parent.left; anchors.right: parent.right + + color: "#0b678c" + opacity: 0.75 + + text: sddm.hostName + + font.bold: true + font.pixelSize: 18 + } + + Column { + anchors.centerIn: parent + + Row { + Image { source: "images/user_icon.png" } + + TextBox { + id: user_entry + + width: 150; height: 30 + anchors.verticalCenter: parent.verticalCenter; + + text: userModel.lastUser + + font.pixelSize: 14 + + KeyNavigation.backtab: layoutBox; KeyNavigation.tab: pw_entry + } + } + + Row { + + Image { source: "images/lock.png" } + + PasswordBox { + id: pw_entry + width: 150; height: 30 + anchors.verticalCenter: parent.verticalCenter; + + tooltipBG: "CornflowerBlue" + + font.pixelSize: 14 + + KeyNavigation.backtab: user_entry; KeyNavigation.tab: login_button + + Keys.onPressed: { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(user_entry.text, pw_entry.text, sessionIndex) + event.accepted = true + } + } + } + } + } + + ImageButton { + id: login_button + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + anchors.margins: 20 + + source: "images/login_normal.png" + + onClicked: sddm.login(user_entry.text, pw_entry.text, sessionIndex) + + KeyNavigation.backtab: pw_entry; KeyNavigation.tab: session + } + + Item { + height: 20 + anchors.bottom: parent.bottom + anchors.left: parent.left; anchors.right: parent.right + + Row { + id: buttonRow + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + + spacing: 8 + + ImageButton { + id: system_button + source: "images/system_shutdown.png" + onClicked: sddm.powerOff() + + KeyNavigation.backtab: session; KeyNavigation.tab: reboot_button + } + + ImageButton { + id: reboot_button + source: "images/system_reboot.png" + onClicked: sddm.reboot() + + KeyNavigation.backtab: system_button; KeyNavigation.tab: suspend_button + } + + ImageButton { + id: suspend_button + source: "images/system_suspend.png" + visible: sddm.canSuspend + onClicked: sddm.suspend() + + KeyNavigation.backtab: reboot_button; KeyNavigation.tab: hibernate_button + } + + ImageButton { + id: hibernate_button + source: "images/system_hibernate.png" + visible: sddm.canHibernate + onClicked: sddm.hibernate() + + KeyNavigation.backtab: suspend_button; KeyNavigation.tab: session + } + } + + Timer { + id: time + interval: 100 + running: true + repeat: true + + onTriggered: { + dateTime.text = Qt.formatDateTime(new Date(), "dddd, dd MMMM yyyy HH:mm AP") + } + } + + Text { + id: dateTime + anchors.right: parent.right + anchors.bottom: parent.bottom + horizontalAlignment: Text.AlignRight + + color: "#0b678c" + font.bold: true + font.pixelSize: 12 + } + } + } + } + } + + Rectangle { + id: actionBar + anchors.top: parent.top; + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width; height: 40 + + Row { + anchors.left: parent.left + anchors.margins: 5 + height: parent.height + spacing: 5 + + Text { + height: parent.height + anchors.verticalCenter: parent.verticalCenter + + text: textConstants.session + font.pixelSize: 14 + verticalAlignment: Text.AlignVCenter + } + + ComboBox { + id: session + width: 245 + anchors.verticalCenter: parent.verticalCenter + + arrowIcon: "angle-down.png" + + model: sessionModel + index: sessionModel.lastIndex + + font.pixelSize: 14 + + KeyNavigation.backtab: hibernate_button; KeyNavigation.tab: layoutBox + } + + Text { + height: parent.height + anchors.verticalCenter: parent.verticalCenter + + text: textConstants.layout + font.pixelSize: 14 + verticalAlignment: Text.AlignVCenter + } + + LayoutBox { + id: layoutBox + width: 90 + anchors.verticalCenter: parent.verticalCenter + font.pixelSize: 14 + + arrowIcon: "angle-down.png" + + KeyNavigation.backtab: session; KeyNavigation.tab: user_entry + } + } + } + + Component.onCompleted: { + if (user_entry.text === "") + user_entry.focus = true + else + pw_entry.focus = true + } +} diff --git a/usr/share/sddm/themes/elarun/README b/usr/share/sddm/themes/elarun/README new file mode 100644 index 00000000..c4f99eb0 --- /dev/null +++ b/usr/share/sddm/themes/elarun/README @@ -0,0 +1,13 @@ +This theme is based on the KDM Elarun theme, ported to SDDM theme. +Thanks to these people for their great works. +Not all functionality from original theme are ported. + +Background images: +Author=Nuno Pinheiro +Email=nuno@oxygen-icons.org +License=LGPLv3 + +Original KDM theme: +Author=Roman Shtylman & Nuno Pinheiro +Copyright=GPL 2010 Roman Shtylman | nuno@oxygen-icons.org, 2012 Nuno Pineheiro +License=GPL diff --git a/usr/share/sddm/themes/elarun/angle-down.png b/usr/share/sddm/themes/elarun/angle-down.png Binary files differnew file mode 100644 index 00000000..4e9aeb02 --- /dev/null +++ b/usr/share/sddm/themes/elarun/angle-down.png diff --git a/usr/share/sddm/themes/elarun/elarun.jpg b/usr/share/sddm/themes/elarun/elarun.jpg Binary files differnew file mode 100644 index 00000000..e36109f3 --- /dev/null +++ b/usr/share/sddm/themes/elarun/elarun.jpg diff --git a/usr/share/sddm/themes/elarun/images/background.png b/usr/share/sddm/themes/elarun/images/background.png Binary files differnew file mode 100644 index 00000000..b840d416 --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/background.png diff --git a/usr/share/sddm/themes/elarun/images/lock.png b/usr/share/sddm/themes/elarun/images/lock.png Binary files differnew file mode 100644 index 00000000..6bc00267 --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/lock.png diff --git a/usr/share/sddm/themes/elarun/images/login_active.png b/usr/share/sddm/themes/elarun/images/login_active.png Binary files differnew file mode 100644 index 00000000..4a39bbdc --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/login_active.png diff --git a/usr/share/sddm/themes/elarun/images/login_normal.png b/usr/share/sddm/themes/elarun/images/login_normal.png Binary files differnew file mode 100644 index 00000000..38812187 --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/login_normal.png diff --git a/usr/share/sddm/themes/elarun/images/rectangle.png b/usr/share/sddm/themes/elarun/images/rectangle.png Binary files differnew file mode 100644 index 00000000..791b26c9 --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/rectangle.png diff --git a/usr/share/sddm/themes/elarun/images/rectangle_overlay.png b/usr/share/sddm/themes/elarun/images/rectangle_overlay.png Binary files differnew file mode 100644 index 00000000..7d63c6f6 --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/rectangle_overlay.png diff --git a/usr/share/sddm/themes/elarun/images/session_normal.png b/usr/share/sddm/themes/elarun/images/session_normal.png Binary files differnew file mode 100644 index 00000000..6f2703b5 --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/session_normal.png diff --git a/usr/share/sddm/themes/elarun/images/system_hibernate.png b/usr/share/sddm/themes/elarun/images/system_hibernate.png Binary files differnew file mode 100644 index 00000000..5214b19b --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/system_hibernate.png diff --git a/usr/share/sddm/themes/elarun/images/system_reboot.png b/usr/share/sddm/themes/elarun/images/system_reboot.png Binary files differnew file mode 100644 index 00000000..c98425b9 --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/system_reboot.png diff --git a/usr/share/sddm/themes/elarun/images/system_shutdown.png b/usr/share/sddm/themes/elarun/images/system_shutdown.png Binary files differnew file mode 100644 index 00000000..73ab68e3 --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/system_shutdown.png diff --git a/usr/share/sddm/themes/elarun/images/system_suspend.png b/usr/share/sddm/themes/elarun/images/system_suspend.png Binary files differnew file mode 100644 index 00000000..a46129fb --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/system_suspend.png diff --git a/usr/share/sddm/themes/elarun/images/system_switch_user.png b/usr/share/sddm/themes/elarun/images/system_switch_user.png Binary files differnew file mode 100644 index 00000000..b60eb04e --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/system_switch_user.png diff --git a/usr/share/sddm/themes/elarun/images/user_icon.png b/usr/share/sddm/themes/elarun/images/user_icon.png Binary files differnew file mode 100644 index 00000000..1198368d --- /dev/null +++ b/usr/share/sddm/themes/elarun/images/user_icon.png diff --git a/usr/share/sddm/themes/elarun/metadata.desktop b/usr/share/sddm/themes/elarun/metadata.desktop new file mode 100644 index 00000000..50455880 --- /dev/null +++ b/usr/share/sddm/themes/elarun/metadata.desktop @@ -0,0 +1,49 @@ +[SddmGreeterTheme] +Name=Elarun +Name[ca]=Elarun +Name[da]=Elarun +Name[de]=Elarun +Name[el]=Elarun +Name[es]=Elarun +Name[et]=Elarun +Name[fi]=Elarun +Name[ga]=Elarun +Name[gl]=Elarun +Name[hu]=Elarun +Name[ia]=Elarun +Name[kk]=Еларун +Name[ko]=Elarun +Name[mr]=एलारन +Name[nb]=Elarun +Name[nl]=Elarun +Name[pl]=Elarun +Name[pt]=Elarun +Name[pt_BR]=Elarun +Name[ro]=Elarun +Name[ru]=Эларан +Name[sk]=Elarun +Name[sl]=Elarun +Name[sr]=Еларун +Name[sr@ijekavian]=Еларун +Name[sr@ijekavianlatin]=Elarun +Name[sr@latin]=Elarun +Name[sv]=Elarun +Name[uk]=Еларан +Name[x-test]=xxElarunxx +Name[zh_CN]=Elarun +Name[zh_TW]=Elarun + +Description=Elarun KDM theme ported to SDDM. \nThe original theme is based on work of Roman Shtylman & Nuno Pinheiro +Type=sddm-theme +Author=Reza Fatahilah Shah +Copyright=(c) 2013, Reza Fatahilah Shah +Screenshot=elarun.jpg +License=GPL +Version=0.1 +MainScript=Main.qml +ConfigFile=theme.conf +TranslationsDirectory=translations +Theme-Id=elarun +Theme-API=2.0 +Website=https://github.com/sddm/sddm + diff --git a/usr/share/sddm/themes/elarun/theme.conf b/usr/share/sddm/themes/elarun/theme.conf new file mode 100644 index 00000000..5acb6ab0 --- /dev/null +++ b/usr/share/sddm/themes/elarun/theme.conf @@ -0,0 +1,2 @@ +[General] +background=images/background.png diff --git a/usr/share/sddm/themes/maldives/LICENSE b/usr/share/sddm/themes/maldives/LICENSE new file mode 100644 index 00000000..6b679353 --- /dev/null +++ b/usr/share/sddm/themes/maldives/LICENSE @@ -0,0 +1,337 @@ +Creative Commons Legal Code + +Attribution-ShareAlike 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL + SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT + RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" + BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION + PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE +COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY +COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS +AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE +BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE +CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE +IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + a. "Adaptation" means a work based upon the Work, or upon the Work and other + pre-existing works, such as a translation, adaptation, derivative work, + arrangement of music or other alterations of a literary or artistic work, + or phonogram or performance and includes cinematographic adaptations or any + other form in which the Work may be recast, transformed, or adapted + including in any form recognizably derived from the original, except that a + work that constitutes a Collection will not be considered an Adaptation for + the purpose of this License. For the avoidance of doubt, where the Work is + a musical work, performance or phonogram, the synchronization of the Work + in timed-relation with a moving image ("synching") will be considered an + Adaptation for the purpose of this License. + b. "Collection" means a collection of literary or artistic works, such as + encyclopedias and anthologies, or performances, phonograms or broadcasts, + or other works or subject matter other than works listed in Section 1(f) + below, which, by reason of the selection and arrangement of their contents, + constitute intellectual creations, in which the Work is included in its + entirety in unmodified form along with one or more other contributions, + each constituting separate and independent works in themselves, which + together are assembled into a collective whole. A work that constitutes a + Collection will not be considered an Adaptation (as defined below) for the + purposes of this License. + c. "Creative Commons Compatible License" means a license that is listed at + http://creativecommons.org/compatiblelicenses that has been approved by + Creative Commons as being essentially equivalent to this License, + including, at a minimum, because that license: (i) contains terms that have + the same purpose, meaning and effect as the License Elements of this + License; and, (ii) explicitly permits the relicensing of adaptations of + works made available under that license under this License or a Creative + Commons jurisdiction license with the same License Elements as this + License. + d. "Distribute" means to make available to the public the original and copies + of the Work or Adaptation, as appropriate, through sale or other transfer + of ownership. + e. "License Elements" means the following high-level license attributes as + selected by Licensor and indicated in the title of this License: + Attribution, ShareAlike. + f. "Licensor" means the individual, individuals, entity or entities that offer + (s) the Work under the terms of this License. + g. "Original Author" means, in the case of a literary or artistic work, the + individual, individuals, entity or entities who created the Work or if no + individual or entity can be identified, the publisher; and in addition (i) + in the case of a performance the actors, singers, musicians, dancers, and + other persons who act, sing, deliver, declaim, play in, interpret or + otherwise perform literary or artistic works or expressions of folklore; + (ii) in the case of a phonogram the producer being the person or legal + entity who first fixes the sounds of a performance or other sounds; and, + (iii) in the case of broadcasts, the organization that transmits the + broadcast. + h. "Work" means the literary and/or artistic work offered under the terms of + this License including without limitation any production in the literary, + scientific and artistic domain, whatever may be the mode or form of its + expression including digital form, such as a book, pamphlet and other + writing; a lecture, address, sermon or other work of the same nature; a + dramatic or dramatico-musical work; a choreographic work or entertainment + in dumb show; a musical composition with or without words; a + cinematographic work to which are assimilated works expressed by a process + analogous to cinematography; a work of drawing, painting, architecture, + sculpture, engraving or lithography; a photographic work to which are + assimilated works expressed by a process analogous to photography; a work + of applied art; an illustration, map, plan, sketch or three-dimensional + work relative to geography, topography, architecture or science; a + performance; a broadcast; a phonogram; a compilation of data to the extent + it is protected as a copyrightable work; or a work performed by a variety + or circus performer to the extent it is not otherwise considered a literary + or artistic work. + i. "You" means an individual or entity exercising rights under this License + who has not previously violated the terms of this License with respect to + the Work, or who has received express permission from the Licensor to + exercise rights under this License despite a previous violation. + j. "Publicly Perform" means to perform public recitations of the Work and to + communicate to the public those public recitations, by any means or + process, including by wire or wireless means or public digital + performances; to make available to the public Works in such a way that + members of the public may access these Works from a place and at a place + individually chosen by them; to perform the Work to the public by any means + or process and the communication to the public of the performances of the + Work, including by public digital performance; to broadcast and rebroadcast + the Work by any means including signs, sounds or images. + k. "Reproduce" means to make copies of the Work by any means including without + limitation by sound or visual recordings and the right of fixation and + reproducing fixations of the Work, including storage of a protected + performance or phonogram in digital form or other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, +or restrict any uses free from copyright or rights arising from limitations or +exceptions that are provided for in connection with the copyright protection +under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor +hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the +duration of the applicable copyright) license to exercise the rights in the +Work as stated below: + + a. to Reproduce the Work, to incorporate the Work into one or more + Collections, and to Reproduce the Work as incorporated in the Collections; + b. to create and Reproduce Adaptations provided that any such Adaptation, + including any translation in any medium, takes reasonable steps to clearly + label, demarcate or otherwise identify that changes were made to the + original Work. For example, a translation could be marked "The original + work was translated from English to Spanish," or a modification could + indicate "The original work has been modified."; + c. to Distribute and Publicly Perform the Work including as incorporated in + Collections; and, + d. to Distribute and Publicly Perform Adaptations. + e. For the avoidance of doubt: + + i. Non-waivable Compulsory License Schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme cannot be waived, the Licensor reserves the + exclusive right to collect such royalties for any exercise by You of + the rights granted under this License; + ii. Waivable Compulsory License Schemes. In those jurisdictions in which + the right to collect royalties through any statutory or compulsory + licensing scheme can be waived, the Licensor waives the exclusive right + to collect such royalties for any exercise by You of the rights granted + under this License; and, + iii. Voluntary License Schemes. The Licensor waives the right to collect + royalties, whether individually or, in the event that the Licensor is a + member of a collecting society that administers voluntary licensing + schemes, via that society, from any exercise by You of the rights + granted under this License. + +The above rights may be exercised in all media and formats whether now known or +hereafter devised. The above rights include the right to make such +modifications as are technically necessary to exercise the rights in other +media and formats. Subject to Section 8(f), all rights not expressly granted by +Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made +subject to and limited by the following restrictions: + + a. You may Distribute or Publicly Perform the Work only under the terms of + this License. You must include a copy of, or the Uniform Resource + Identifier (URI) for, this License with every copy of the Work You + Distribute or Publicly Perform. You may not offer or impose any terms on + the Work that restrict the terms of this License or the ability of the + recipient of the Work to exercise the rights granted to that recipient + under the terms of the License. You may not sublicense the Work. You must + keep intact all notices that refer to this License and to the disclaimer of + warranties with every copy of the Work You Distribute or Publicly Perform. + When You Distribute or Publicly Perform the Work, You may not impose any + effective technological measures on the Work that restrict the ability of a + recipient of the Work from You to exercise the rights granted to that + recipient under the terms of the License. This Section 4(a) applies to the + Work as incorporated in a Collection, but this does not require the + Collection apart from the Work itself to be made subject to the terms of + this License. If You create a Collection, upon notice from any Licensor You + must, to the extent practicable, remove from the Collection any credit as + required by Section 4(c), as requested. If You create an Adaptation, upon + notice from any Licensor You must, to the extent practicable, remove from + the Adaptation any credit as required by Section 4(c), as requested. + b. You may Distribute or Publicly Perform an Adaptation only under the terms + of: (i) this License; (ii) a later version of this License with the same + License Elements as this License; (iii) a Creative Commons jurisdiction + license (either this or a later license version) that contains the same + License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); + (iv) a Creative Commons Compatible License. If you license the Adaptation + under one of the licenses mentioned in (iv), you must comply with the terms + of that license. If you license the Adaptation under the terms of any of + the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), + you must comply with the terms of the Applicable License generally and the + following provisions: (I) You must include a copy of, or the URI for, the + Applicable License with every copy of each Adaptation You Distribute or + Publicly Perform; (II) You may not offer or impose any terms on the + Adaptation that restrict the terms of the Applicable License or the ability + of the recipient of the Adaptation to exercise the rights granted to that + recipient under the terms of the Applicable License; (III) You must keep + intact all notices that refer to the Applicable License and to the + disclaimer of warranties with every copy of the Work as included in the + Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or + Publicly Perform the Adaptation, You may not impose any effective + technological measures on the Adaptation that restrict the ability of a + recipient of the Adaptation from You to exercise the rights granted to that + recipient under the terms of the Applicable License. This Section 4(b) + applies to the Adaptation as incorporated in a Collection, but this does + not require the Collection apart from the Adaptation itself to be made + subject to the terms of the Applicable License. + c. If You Distribute, or Publicly Perform the Work or any Adaptations or + Collections, You must, unless a request has been made pursuant to Section 4 + (a), keep intact all copyright notices for the Work and provide, reasonable + to the medium or means You are utilizing: (i) the name of the Original + Author (or pseudonym, if applicable) if supplied, and/or if the Original + Author and/or Licensor designate another party or parties (e.g., a sponsor + institute, publishing entity, journal) for attribution ("Attribution + Parties") in Licensor's copyright notice, terms of service or by other + reasonable means, the name of such party or parties; (ii) the title of the + Work if supplied; (iii) to the extent reasonably practicable, the URI, if + any, that Licensor specifies to be associated with the Work, unless such + URI does not refer to the copyright notice or licensing information for the + Work; and (iv) , consistent with Ssection 3(b), in the case of an + Adaptation, a credit identifying the use of the Work in the Adaptation + (e.g., "French translation of the Work by Original Author," or "Screenplay + based on original Work by Original Author"). The credit required by this + Section 4(c) may be implemented in any reasonable manner; provided, + however, that in the case of a Adaptation or Collection, at a minimum such + credit will appear, if a credit for all contributing authors of the + Adaptation or Collection appears, then as part of these credits and in a + manner at least as prominent as the credits for the other contributing + authors. For the avoidance of doubt, You may only use the credit required + by this Section for the purpose of attribution in the manner set out above + and, by exercising Your rights under this License, You may not implicitly + or explicitly assert or imply any connection with, sponsorship or + endorsement by the Original Author, Licensor and/or Attribution Parties, as + appropriate, of You or Your use of the Work, without the separate, express + prior written permission of the Original Author, Licensor and/or + Attribution Parties. + d. Except as otherwise agreed in writing by the Licensor or as may be + otherwise permitted by applicable law, if You Reproduce, Distribute or + Publicly Perform the Work either by itself or as part of any Adaptations or + Collections, You must not distort, mutilate, modify or take other + derogatory action in relation to the Work which would be prejudicial to the + Original Author's honor or reputation. Licensor agrees that in those + jurisdictions (e.g. Japan), in which any exercise of the right granted in + Section 3(b) of this License (the right to make Adaptations) would be + deemed to be a distortion, mutilation, modification or other derogatory + action prejudicial to the Original Author's honor and reputation, the + Licensor will waive or not assert, as appropriate, this Section, to the + fullest extent permitted by the applicable national law, to enable You to + reasonably exercise Your right under Section 3(b) of this License (right to + make Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS +THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND +CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, +WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A +PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, +ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. +SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH +EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN +NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, +INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS +LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + a. This License and the rights granted hereunder will terminate automatically + upon any breach by You of the terms of this License. Individuals or + entities who have received Adaptations or Collections from You under this + License, however, will not have their licenses terminated provided such + individuals or entities remain in full compliance with those licenses. + Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + b. Subject to the above terms and conditions, the license granted here is + perpetual (for the duration of the applicable copyright in the Work). + Notwithstanding the above, Licensor reserves the right to release the Work + under different license terms or to stop distributing the Work at any time; + provided, however that any such election will not serve to withdraw this + License (or any other license that has been, or is required to be, granted + under the terms of this License), and this License will continue in full + force and effect unless terminated as stated above. + +8. Miscellaneous + + a. Each time You Distribute or Publicly Perform the Work or a Collection, the + Licensor offers to the recipient a license to the Work on the same terms + and conditions as the license granted to You under this License. + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers + to the recipient a license to the original Work on the same terms and + conditions as the license granted to You under this License. + c. If any provision of this License is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of the + remainder of the terms of this License, and without further action by the + parties to this agreement, such provision shall be reformed to the minimum + extent necessary to make such provision valid and enforceable. + d. No term or provision of this License shall be deemed waived and no breach + consented to unless such waiver or consent shall be in writing and signed + by the party to be charged with such waiver or consent. + e. This License constitutes the entire agreement between the parties with + respect to the Work licensed here. There are no understandings, agreements + or representations with respect to the Work not specified here. Licensor + shall not be bound by any additional provisions that may appear in any + communication from You. This License may not be modified without the mutual + written agreement of the Licensor and You. + f. The rights granted under, and the subject matter referenced, in this + License were drafted utilizing the terminology of the Berne Convention for + the Protection of Literary and Artistic Works (as amended on September 28, + 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the + WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright + Convention (as revised on July 24, 1971). These rights and subject matter + take effect in the relevant jurisdiction in which the License terms are + sought to be enforced according to the corresponding provisions of the + implementation of those treaty provisions in the applicable national law. + If the standard suite of rights granted under applicable copyright law + includes additional rights not granted under this License, such additional + rights are deemed to be included in the License; this License is not + intended to restrict the license of any rights under applicable law. + + Creative Commons Notice + + Creative Commons is not a party to this License, and makes no warranty + whatsoever in connection with the Work. Creative Commons will not be liable + to You or any party on any legal theory for any damages whatsoever, + including without limitation any general, special, incidental or + consequential damages arising in connection to this license. + Notwithstanding the foregoing two (2) sentences, if Creative Commons has + expressly identified itself as the Licensor hereunder, it shall have all + rights and obligations of Licensor. + + Except for the limited purpose of indicating to the public that the Work is + licensed under the CCPL, Creative Commons does not authorize the use by + either party of the trademark "Creative Commons" or any related trademark + or logo of Creative Commons without the prior written consent of Creative + Commons. Any permitted use will be in compliance with Creative Commons' + then-current trademark usage guidelines, as may be published on its website + or otherwise made available upon request from time to time. For the + avoidance of doubt, this trademark restriction does not form part of the + License. + + Creative Commons may be contacted at https://creativecommons.org/. diff --git a/usr/share/sddm/themes/maldives/Main.qml b/usr/share/sddm/themes/maldives/Main.qml new file mode 100644 index 00000000..4fac9f3c --- /dev/null +++ b/usr/share/sddm/themes/maldives/Main.qml @@ -0,0 +1,281 @@ +/*************************************************************************** +* Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci@gmail.com> +* +* Permission is hereby granted, free of charge, to any person +* obtaining a copy of this software and associated documentation +* files (the "Software"), to deal in the Software without restriction, +* including without limitation the rights to use, copy, modify, merge, +* publish, distribute, sublicense, and/or sell copies of the Software, +* and to permit persons to whom the Software is furnished to do so, +* subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +* OR OTHER DEALINGS IN THE SOFTWARE. +* +***************************************************************************/ + +import QtQuick 2.0 +import SddmComponents 2.0 + +Rectangle { + id: container + width: 640 + height: 480 + + LayoutMirroring.enabled: Qt.locale().textDirection == Qt.RightToLeft + LayoutMirroring.childrenInherit: true + + property int sessionIndex: session.index + + TextConstants { id: textConstants } + + Connections { + target: sddm + + onLoginSucceeded: { + errorMessage.color = "steelblue" + errorMessage.text = textConstants.loginSucceeded + } + + onLoginFailed: { + password.text = "" + errorMessage.color = "red" + errorMessage.text = textConstants.loginFailed + } + onInformationMessage: { + errorMessage.color = "red" + errorMessage.text = message + } + } + + Background { + anchors.fill: parent + source: config.background + fillMode: Image.PreserveAspectCrop + onStatusChanged: { + if (status == Image.Error && source != config.defaultBackground) { + source = config.defaultBackground + } + } + } + + Rectangle { + anchors.fill: parent + color: "transparent" + //visible: primaryScreen + + Clock { + id: clock + anchors.margins: 5 + anchors.top: parent.top; anchors.right: parent.right + + color: "white" + timeFont.family: "Oxygen" + } + + Image { + id: rectangle + anchors.centerIn: parent + width: Math.max(320, mainColumn.implicitWidth + 50) + height: Math.max(320, mainColumn.implicitHeight + 50) + + source: "rectangle.png" + + Column { + id: mainColumn + anchors.centerIn: parent + spacing: 12 + Text { + anchors.horizontalCenter: parent.horizontalCenter + color: "black" + verticalAlignment: Text.AlignVCenter + height: text.implicitHeight + width: parent.width + text: textConstants.welcomeText.arg(sddm.hostName) + wrapMode: Text.WordWrap + font.pixelSize: 24 + elide: Text.ElideRight + horizontalAlignment: Text.AlignHCenter + } + + Column { + width: parent.width + spacing: 4 + Text { + id: lblName + width: parent.width + text: textConstants.userName + font.bold: true + font.pixelSize: 12 + } + + TextBox { + id: name + width: parent.width; height: 30 + text: userModel.lastUser + font.pixelSize: 14 + + KeyNavigation.backtab: rebootButton; KeyNavigation.tab: password + + Keys.onPressed: { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(name.text, password.text, sessionIndex) + event.accepted = true + } + } + } + } + + Column { + width: parent.width + spacing : 4 + Text { + id: lblPassword + width: parent.width + text: textConstants.password + font.bold: true + font.pixelSize: 12 + } + + PasswordBox { + id: password + width: parent.width; height: 30 + font.pixelSize: 14 + + KeyNavigation.backtab: name; KeyNavigation.tab: session + + Keys.onPressed: { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(name.text, password.text, sessionIndex) + event.accepted = true + } + } + } + } + + Row { + spacing: 4 + width: parent.width / 2 + z: 100 + + Column { + z: 100 + width: parent.width * 1.3 + spacing : 4 + anchors.bottom: parent.bottom + + Text { + id: lblSession + width: parent.width + text: textConstants.session + wrapMode: TextEdit.WordWrap + font.bold: true + font.pixelSize: 12 + } + + ComboBox { + id: session + width: parent.width; height: 30 + font.pixelSize: 14 + + arrowIcon: "angle-down.png" + + model: sessionModel + index: sessionModel.lastIndex + + KeyNavigation.backtab: password; KeyNavigation.tab: layoutBox + } + } + + Column { + z: 101 + width: parent.width * 0.7 + spacing : 4 + anchors.bottom: parent.bottom + + Text { + id: lblLayout + width: parent.width + text: textConstants.layout + wrapMode: TextEdit.WordWrap + font.bold: true + font.pixelSize: 12 + } + + LayoutBox { + id: layoutBox + width: parent.width; height: 30 + font.pixelSize: 14 + + arrowIcon: "angle-down.png" + + KeyNavigation.backtab: session; KeyNavigation.tab: loginButton + } + } + } + + Column { + width: parent.width + Text { + id: errorMessage + anchors.horizontalCenter: parent.horizontalCenter + text: textConstants.prompt + font.pixelSize: 10 + } + } + + Row { + spacing: 4 + anchors.horizontalCenter: parent.horizontalCenter + property int btnWidth: Math.max(loginButton.implicitWidth, + shutdownButton.implicitWidth, + rebootButton.implicitWidth, 80) + 8 + Button { + id: loginButton + text: textConstants.login + width: parent.btnWidth + + onClicked: sddm.login(name.text, password.text, sessionIndex) + + KeyNavigation.backtab: layoutBox; KeyNavigation.tab: shutdownButton + } + + Button { + id: shutdownButton + text: textConstants.shutdown + width: parent.btnWidth + + onClicked: sddm.powerOff() + + KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton + } + + Button { + id: rebootButton + text: textConstants.reboot + width: parent.btnWidth + + onClicked: sddm.reboot() + + KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name + } + } + } + } + } + + Component.onCompleted: { + if (name.text == "") + name.focus = true + else + password.focus = true + } +} diff --git a/usr/share/sddm/themes/maldives/README b/usr/share/sddm/themes/maldives/README new file mode 100644 index 00000000..60048471 --- /dev/null +++ b/usr/share/sddm/themes/maldives/README @@ -0,0 +1,29 @@ +This theme is part of the Simple Desktop Display Manager distribution. This theme is based QtQuick2. + +chevron icons are extracted from Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome. + +rectangle.png is from KDM ariya theme. + +The wallpaper was taken from here: + http://interfacelift.com/wallpaper/details/3170/baros_maldives.html +It was made by Dan Grady. + +GeosansLight font is downloaded from here: + http://www.dafont.com/geo-sans-light.font +It was made by Manfred Klein, http://manfred-klein.ina-mar.com/. + +QML files contain license headers. + +warning.png is public domain: http://rationalwiki.org/wiki/File:Warning_icon_orange.svg + +~~~ + +background.png + +Nalaguriadhoo (Sun Island) view towards the South onto the waterbungalows + +Copyright (C) 2012 Dr. Peter Schmidt + +Source: https://commons.wikimedia.org/wiki/File:Nalaguraidhoo_Wasserbungalows.JPG +License: Creative Commons Attribution-Share Alike 3.0 Unported +License-URL: https://creativecommons.org/licenses/by-sa/3.0/deed.en diff --git a/usr/share/sddm/themes/maldives/angle-down.png b/usr/share/sddm/themes/maldives/angle-down.png Binary files differnew file mode 100644 index 00000000..4e9aeb02 --- /dev/null +++ b/usr/share/sddm/themes/maldives/angle-down.png diff --git a/usr/share/sddm/themes/maldives/background.jpg b/usr/share/sddm/themes/maldives/background.jpg Binary files differnew file mode 100644 index 00000000..985458d8 --- /dev/null +++ b/usr/share/sddm/themes/maldives/background.jpg diff --git a/usr/share/sddm/themes/maldives/maldives.jpg b/usr/share/sddm/themes/maldives/maldives.jpg Binary files differnew file mode 100644 index 00000000..0e83e072 --- /dev/null +++ b/usr/share/sddm/themes/maldives/maldives.jpg diff --git a/usr/share/sddm/themes/maldives/metadata.desktop b/usr/share/sddm/themes/maldives/metadata.desktop new file mode 100644 index 00000000..acd0fa47 --- /dev/null +++ b/usr/share/sddm/themes/maldives/metadata.desktop @@ -0,0 +1,16 @@ +[SddmGreeterTheme] +Name=Maldives +Description=Maldives Theme +Author=Abdurrahman AVCI +Copyright=(c) 2013, Abdurrahman AVCI +License=CC-BY-SA +Type=sddm-theme +Version=0.1 +Website=https://github.com/sddm/sddm +Screenshot=maldives.jpg +MainScript=Main.qml +ConfigFile=theme.conf +TranslationsDirectory=translations +Email=abdurrahmanavci@gmail.com +Theme-Id=maldives +Theme-API=2.0 diff --git a/usr/share/sddm/themes/maldives/rectangle.png b/usr/share/sddm/themes/maldives/rectangle.png Binary files differnew file mode 100644 index 00000000..791b26c9 --- /dev/null +++ b/usr/share/sddm/themes/maldives/rectangle.png diff --git a/usr/share/sddm/themes/maldives/theme.conf b/usr/share/sddm/themes/maldives/theme.conf new file mode 100644 index 00000000..17e0c26b --- /dev/null +++ b/usr/share/sddm/themes/maldives/theme.conf @@ -0,0 +1,2 @@ +[General] +background=background.jpg diff --git a/usr/share/sddm/themes/maya/LICENSE b/usr/share/sddm/themes/maya/LICENSE new file mode 100644 index 00000000..fa9ccc57 --- /dev/null +++ b/usr/share/sddm/themes/maya/LICENSE @@ -0,0 +1,16 @@ + maya +---------------------------------------------------------------------- + +This theme follow the licencing policy of SDDM. + +1) All QML files are available under terms of the MIT License. + +2) The material design icons from https://design.google.com/icons/ + have been used in the theme. + These icon are available under the Creative Common Attribution 4.0 + International License (CC-BY 4.0). + +3) Open Sans Condensed font downloaded from Font Squirrel is available + under the Apache License version 2.0. + (https://www.fontsquirrel.com/license/open-sans-condensed) +---------------------------------------------------------------------- diff --git a/usr/share/sddm/themes/maya/Main.qml b/usr/share/sddm/themes/maya/Main.qml new file mode 100644 index 00000000..d8e470b3 --- /dev/null +++ b/usr/share/sddm/themes/maya/Main.qml @@ -0,0 +1,684 @@ +// +// [maya] main.qml +// +// Main script for the SDDM theme +// +// (c) 2016 Sanjeev Premi (spremi@ymail.com) +// +// SPDX-License-Identifier: MIT +// (https://spdx.org/licenses/MIT.html) +// + + +import QtQuick 2.0 +import SddmComponents 2.0 + +import "./components" + +Rectangle { + id : maya_root + + property color primaryShade : config.primaryShade ? config.primaryShade : "#303F9F" + property color primaryLight : config.primaryLight ? config.primaryLight : "#7986CB" + property color primaryDark : config.primaryDark ? config.primaryDark : "#1A237E" + + property color primaryHue1 : config.primaryHue1 ? config.primaryHue1 : "#5965B2" + property color primaryHue2 : config.primaryHue2 ? config.primaryHue2 : "#303F9F" + property color primaryHue3 : config.primaryHue3 ? config.primaryHue3 : "#2C3998" + + property color accentShade : config.accentShade ? config.accentShade : "#FF4081" + property color accentLight : config.accentLight ? config.accentLight : "#FF80AB" + + property color accentHue1 : config.accentHue1 ? config.accentHue1 : "#FF669A" + property color accentHue2 : config.accentHue2 ? config.accentHue2 : "#FF4081" + property color accentHue3 : config.accentHue3 ? config.accentHue3 : "#E73677" + + property color normalText : config.normalText ? config.normalText : "#ffffff" + + property color successText : config.successText ? config.successText : "#43a047" + property color failureText : config.failureText ? config.failureText : "#e53935" + property color warningText : config.warningText ? config.warningText : "#ff8f00" + + property color rebootColor : config.rebootColor ? config.rebootColor : "#fb8c00" + property color powerColor : config.powerColor ? config.powerColor : "#ff1744" + + readonly property color defaultBg : primaryShade ? primaryShade : "#1e88e5" + + // + // Indicates one unit of measure (in pixels) + // + readonly property int spUnit: 64 + + // + // Symmetric (equal) padding on all sides + // + readonly property int padSym : (spUnit / 8) + + // + // Asymmetric padding in horizontal & vertical directions + // + readonly property int padAsymH : (spUnit / 2) + readonly property int padAsymV : (spUnit / 8) + + // + // Font sizes + // + readonly property int spFontNormal : 24 + readonly property int spFontSmall : 16 + + + LayoutMirroring.enabled: Qt.locale().textDirection == Qt.RightToLeft + LayoutMirroring.childrenInherit: true + + TextConstants { id: textConstants } + + Connections { + target: sddm + + onLoginSucceeded: { + prompt_bg.color = successText + prompt_txt.text = textConstants.loginSucceeded + + maya_busy.visible = false; + maya_busy_anim.stop() + + anim_success.start() + } + onLoginFailed: { + prompt_bg.color = failureText + prompt_txt.text = textConstants.loginFailed + + maya_busy.visible = false; + maya_busy_anim.stop() + + anim_failure.start() + } + onInformationMessage: { + prompt_bg.color = failureText + prompt_txt.text = message + + maya_busy.visible = false; + maya_busy_anim.stop() + + anim_failure.start() + } + } + + + signal tryLogin() + + onTryLogin : { + maya_busy.visible = true; + maya_busy_anim.start() + + sddm.login(maya_username.text, maya_password.text, maya_session.index); + } + + + FontLoader { + id: opensans_cond_light + source: "fonts/OpenSans_CondLight.ttf" + } + + Repeater { + model: screenModel + + Item { + Rectangle { + x : geometry.x + y : geometry.y + width : geometry.width + height : geometry.height + color : defaultBg + } + } + } + + // + // Status bar on top + // + Rectangle { + x : 0 + y : 0 + width : parent.width + height : spUnit + + color : primaryDark + + Row { + x : (parent.width / 2) + padAsymH + y : padAsymV + width : ((parent.width / 2) - (padAsymH * 2)) + height : (parent.height - (padAsymV * 2)) + + spacing : padAsymH + + layoutDirection : Qt.RightToLeft + + // + // Current date & time + // + SpClock { + height : parent.height + + tColor : normalText + + tFont.family : opensans_cond_light.name + tFont.pixelSize : spFontNormal + } + } + } + + + // + // Header + // + Rectangle { + x : 0 + y : spUnit + width : parent.width + height : spUnit + + color : primaryShade + + Row { + x : padAsymH + y : padAsymV + width : (parent.width - (padAsymH * 2)) + height : (parent.height - (padAsymV * 2)) + + // + // Welcome Text + // + Text { + id : maya_welcome + + width : parent.width + height : parent.height + + text : textConstants.welcomeText.arg(sddm.hostName) + color : normalText + + font.family : opensans_cond_light.name + font.pixelSize : spFontNormal + + fontSizeMode : Text.VerticalFit + horizontalAlignment : Text.AlignLeft + verticalAlignment : Text.AlignVCenter + } + } + } + + // + // Toolbar + // + Rectangle { + x : 0 + y : (spUnit * 2) + width : parent.width + height : spUnit + + color : primaryShade + + Row { + x : (parent.width / 2) + padAsymH + y : padAsymV + width : ((parent.width / 2) - (padAsymH * 2)) + height : (parent.height - (padAsymV * 2)) + + spacing : padAsymH + + layoutDirection : Qt.RightToLeft + + // + // Layout selection + // + LayoutBox { + id : maya_layout + + width : spUnit * 2 + height : parent.height + + color : primaryHue1 + borderColor : primaryHue3 + focusColor : accentLight + hoverColor : accentHue2 + textColor : normalText + menuColor : primaryHue1 + + font.family : opensans_cond_light.name + font.pixelSize : spFontNormal + + arrowIcon: "images/ic_arrow_drop_down_white_24px.svg" + arrowColor: primaryHue3 + + KeyNavigation.tab : maya_username + KeyNavigation.backtab : maya_session + } + + Text { + height : parent.height + + text : textConstants.layout + + color : normalText + + font.family : opensans_cond_light.name + font.pixelSize : spFontNormal + + horizontalAlignment : Text.AlignLeft + verticalAlignment : Text.AlignVCenter + } + + // + // Session selection + // + ComboBox { + id : maya_session + + model : sessionModel + index : sessionModel.lastIndex + + width : spUnit * 3 + height : parent.height + + color : primaryHue1 + borderColor : primaryHue3 + focusColor : accentLight + hoverColor : accentHue2 + textColor : normalText + menuColor : primaryHue1 + + font.family : opensans_cond_light.name + font.pixelSize : spFontNormal + + arrowIcon: "images/ic_arrow_drop_down_white_24px.svg" + arrowColor: primaryHue3 + + KeyNavigation.tab : maya_layout + KeyNavigation.backtab : maya_shutdown + } + + Text { + height : parent.height + + text : textConstants.session + + color : normalText + + font.family : opensans_cond_light.name + font.pixelSize : spFontNormal + + horizontalAlignment : Text.AlignLeft + verticalAlignment : Text.AlignVCenter + } + } + } + + // + // Footer + // + Rectangle { + x : 0 + y : (parent.height - spUnit) + width : parent.width + height : spUnit + + color : primaryHue3 + + Row { + x : padAsymH; + y : padAsymV; + + width : (parent.width - (padAsymH * 2)) + height : (parent.height - (padAsymV * 2)) + + spacing: padAsymH + + layoutDirection : Qt.RightToLeft + + // + // Shutdown button + // + SpButton { + id : maya_shutdown + + height : parent.height + width : (spUnit * 4) + + font.family : opensans_cond_light.name + + label : textConstants.shutdown + labelColor : normalText + + icon : "images/ic_power_settings_new_white_24px.svg" + iconColor : accentShade + + hoverIconColor : powerColor + hoverLabelColor : accentShade + + KeyNavigation.tab : maya_session + KeyNavigation.backtab : maya_reboot + + onClicked: sddm.powerOff() + } + + // + // Reboot button + // + SpButton { + id : maya_reboot + + height : parent.height + width : (spUnit * 4) + + font.family : opensans_cond_light.name + + label : textConstants.reboot + labelColor : normalText + + icon : "images/ic_refresh_white_24px.svg" + iconColor : accentLight + + hoverIconColor : rebootColor + hoverLabelColor : accentShade + + KeyNavigation.tab : maya_shutdown + KeyNavigation.backtab : maya_login + + onClicked: sddm.reboot() + } + } + } + + // + // Login container + // + Rectangle { + x : (parent.width - (6 * spUnit)) / 2 + y : (parent.height - (5 * spUnit)) / 2 + width : (6 * spUnit) + height : (5 * spUnit) + + color : primaryHue3 + + Row { + x : padSym + y : padSym + width : (parent.width - (padSym * 2)) + height : (spUnit - (padSym * 2)) + + Text { + width : parent.width + height : parent.height + + text : textConstants.userName + color : accentLight + + font.family : opensans_cond_light.name + font.pixelSize : spFontSmall + + horizontalAlignment : Text.AlignLeft + verticalAlignment : Text.AlignBottom + } + } + + Row { + x : padSym + y : spUnit + padSym + width : (parent.width - (padSym * 2)) + height : (spUnit - (padSym * 2)) + + TextBox { + id : maya_username + + width : parent.width + height : parent.height + + color : primaryHue1 + borderColor : primaryDark + focusColor : accentShade + hoverColor : accentLight + textColor : normalText + + font.family : opensans_cond_light.name + font.pixelSize : spFontSmall + + KeyNavigation.tab : maya_password + KeyNavigation.backtab : maya_layout + } + } + + Row { + x : padSym + y : (2 * spUnit) + padSym + width : (parent.width - (padSym * 2)) + height : (spUnit - (padSym * 2)) + + Text { + width : parent.width + height : parent.height + + text : textConstants.password + color : accentLight + + font.family : opensans_cond_light.name + font.pixelSize : spFontSmall + + horizontalAlignment : Text.AlignLeft + verticalAlignment : Text.AlignBottom + } + } + + Row { + x : padSym + y : (3 * spUnit) + padSym + width : (parent.width - (padSym * 2)) + height : (spUnit - (padSym * 2)) + + PasswordBox { + id : maya_password + + width : parent.width + height : parent.height + + color : primaryHue1 + borderColor : primaryDark + focusColor : accentShade + hoverColor : accentLight + textColor : normalText + + image : "images/ic_warning_white_24px.svg" + + tooltipEnabled : true + tooltipText : textConstants.capslockWarning + tooltipFG : normalText + tooltipBG : primaryHue3 + + font.family : opensans_cond_light.name + font.pixelSize : spFontNormal + + KeyNavigation.tab : maya_login + KeyNavigation.backtab : maya_username + + Keys.onPressed: { + if ((event.key === Qt.Key_Return) || (event.key === Qt.Key_Enter)) { + maya_root.tryLogin() + + event.accepted = true; + } + } + } + } + + Row { + x : padSym + y : (4 * spUnit) + padSym + width : (parent.width - (padSym * 2)) + height : (spUnit - (padSym * 2)) + + Button { + id : maya_login + + width : parent.width + height : parent.height + + text : textConstants.login + + color : primaryDark + textColor : normalText + + borderColor : primaryHue1 + + pressedColor : accentLight + activeColor : accentShade + + font.family : opensans_cond_light.name + font.pixelSize : spFontNormal + font.weight : Font.DemiBold + + KeyNavigation.tab : maya_reboot + KeyNavigation.backtab : maya_layout + + onClicked: maya_root.tryLogin() + + Keys.onPressed: { + if ((event.key === Qt.Key_Return) || (event.key === Qt.Key_Enter)) { + maya_root.tryLogin() + + event.accepted = true; + } + } + } + } + } + + // + // Busy animation (just above footer) + // + Rectangle { + id : maya_busy + + x : (parent.width - (6 * spUnit)) / 2 + y : (parent.height - (1.5 * spUnit)) + width : (6 * spUnit) + height : (spUnit / 4) + + visible : false + + color : "transparent" + + border.color : accentHue1 + border.width : 1 + + Rectangle { + id : maya_busy_indicator + + x : 0 + y : 0 + width : (spUnit / 4) + height : parent.height + + color : accentHue3 + } + + SequentialAnimation { + id : maya_busy_anim + + running : false + loops : Animation.Infinite + + NumberAnimation { + target : maya_busy_indicator + property : "x" + from : 0 + to : (6 * spUnit) - (spUnit / 4) + duration : 2500 + } + + NumberAnimation { + target : maya_busy_indicator + property : "x" + to : 0 + duration : 2500 + } + } + } + + // + // Prompt container + // + Rectangle { + id : prompt_bg + + x : (parent.width / 4) + y : (parent.height - (3 * spUnit)) + width : (parent.width / 2) + height : spUnit + + color : "transparent" + + Text { + id : prompt_txt + + x : padSym + y : padSym + width : (parent.width - (padSym * 2)) + height : (parent.height - (padSym * 2)) + + color : normalText + + text : textConstants.prompt + + font.pixelSize : spFontNormal + + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + } + + SequentialAnimation on color { + id : anim_success + running : false + + ColorAnimation { + from: "transparent" + to: successText + duration: 250 + } + } + + SequentialAnimation on color { + id : anim_failure + running : false + + ColorAnimation { + from: "transparent" + to: failureText + duration: 250 + } + + PauseAnimation { + duration: 500 + } + + ColorAnimation { + from: failureText + to: "transparent" + duration: 500 + } + + onStopped: { + maya_password.text = "" + prompt_txt.text = textConstants.prompt + } + } + } + + + Component.onCompleted: { + if (maya_username.text === "") + maya_username.focus = true + else + maya_password.focus = true + } +} diff --git a/usr/share/sddm/themes/maya/README b/usr/share/sddm/themes/maya/README new file mode 100644 index 00000000..1ee5821d --- /dev/null +++ b/usr/share/sddm/themes/maya/README @@ -0,0 +1,31 @@ +1. INTRODUCTION + + In Hindi, 'maya' refers to 'material wealth'. + + This is a simple 'material' inspired SDDM theme. + + +2. BACKGROUND + + While contributing new translations, I tried testing them on + my working Linux machine. But only few strings appeared to be + translated. + + Took some time, to discover that SDDM theme on my desktop was + not using strings from SDDM. Few other themes I tried, weren't + using all the strings. + + Necessity to test translations was the driving force behind + this theme. The 'material' inspiration helps in keeping focus + on original intent. + + +3. ACKNOWLEDGEMENTS + + 1. The basic theme and colors are material inspired. + + 2. Material Icons have been used from: + https://design.google.com/icons/ + + 3. Open Sans Condensed font from Font Squirrel. + https://www.fontsquirrel.com/ diff --git a/usr/share/sddm/themes/maya/components/SpButton.qml b/usr/share/sddm/themes/maya/components/SpButton.qml new file mode 100644 index 00000000..65c2577b --- /dev/null +++ b/usr/share/sddm/themes/maya/components/SpButton.qml @@ -0,0 +1,206 @@ +// +// [maya] components/SpButton.qml +// +// Implements custom action button with label +// +// (c) 2016 Sanjeev Premi (spremi@ymail.com) +// +// SPDX-License-Identifier: MIT +// (https://spdx.org/licenses/MIT.html) +// + + +import QtQuick 2.0 + +Item { + id : sp_button + + property bool enabled : true + + property alias icon : sp_button_icon.source + property alias label : sp_button_label.text + property alias font : sp_button_label.font + + property color iconColor : "#aaaaaa" + property color labelColor : "#424242" + + property color hoverIconColor : "#cccccc" + property color hoverLabelColor : "#808080" + + property color pressIconColor : "#dcdcdc" + property color pressLabelColor : "#a0a0a0" + + property color disableColor : "#888888" + + signal pressed() + signal released() + signal clicked() + + Row { + x : 4 + y : 4 + + spacing : 8 + + Rectangle { + id : sp_button_bg + + width : 40 + height : 40 + + radius : 20 + + color : iconColor + + Image { + id : sp_button_icon + + width : 40 + height : 40 + + source : "./blank.svg" + + fillMode : Image.Pad + horizontalAlignment : Image.AlignHCenter + verticalAlignment : Image.AlignVCenter + } + } + + Text { + id : sp_button_label + + height : 40 + + text : "" + color : labelColor + + font.pixelSize : 24 + font.weight : Font.DemiBold + + fontSizeMode : Text.VerticalFit + horizontalAlignment : Text.AlignRight + verticalAlignment : Text.AlignVCenter + } + } + + + // + // States and associated visual attributes + // + states: [ + State { + name : "disabled" + when : (sp_button.enabled === false) + + PropertyChanges { + target : sp_button_bg + color : disableColor + } + + PropertyChanges { + target : sp_button_label + color : disableColor + } + + }, + State { + name : "hover" + + PropertyChanges { + target : sp_button_label + color : hoverLabelColor + } + + PropertyChanges { + target : sp_button_bg + color : hoverIconColor + } + }, + State { + name : "pressed" + + PropertyChanges { + target : sp_button_label + color : hoverLabelColor + } + + PropertyChanges { + target : sp_button_bg + color : pressIconColor + } + } + ] + + // + // Behavior on state transitions + // + transitions: [ + Transition { + from : "" + to : "hover" + + ColorAnimation { + duration: 250 + } + }, + Transition { + from : "" + to : "pressed" + + ColorAnimation { + duration: 25 + } + }, + Transition { + from : "disabled" + to : "enabled" + + ColorAnimation { + duration: 50 + } + }, + Transition { + from : "enabled" + to : "disabled" + + ColorAnimation { + duration: 50 + } + } + ] + + // + // Area to react to mouse actions + // + MouseArea { + anchors.fill : sp_button + + hoverEnabled : true + cursorShape : Qt.PointingHandCursor + acceptedButtons : Qt.LeftButton + + onEntered : { + sp_button.state = "hover" + } + + onExited : { + sp_button.state = "" + } + + onPressed : { + sp_button.state = "pressed" + } + + onClicked : { + sp_button.clicked() + } + + onReleased : { + if (containsMouse) { + sp_button.state = "hover" + } else { + sp_button.state = "" + } + } + } +} diff --git a/usr/share/sddm/themes/maya/components/SpClock.qml b/usr/share/sddm/themes/maya/components/SpClock.qml new file mode 100644 index 00000000..e660976b --- /dev/null +++ b/usr/share/sddm/themes/maya/components/SpClock.qml @@ -0,0 +1,49 @@ +// +// [maya] components/SpClock.qml +// +// Implements custom clock component +// +// (c) 2016 Sanjeev Premi (spremi@ymail.com) +// +// SPDX-License-Identifier: MIT +// (https://spdx.org/licenses/MIT.html) +// + + +import QtQuick 2.0 + + +Item { + id : sp_clock + + property date value : new Date() + + property color tColor : "white" + property alias tFont : sp_clock_text.font + + implicitWidth : sp_clock_text.implicitWidth + implicitHeight : sp_clock_text.implicitHeight + + + Timer { + interval : 100 + running : true + repeat : true; + onTriggered : sp_clock.value = new Date() + } + + Text { + id : sp_clock_text + + text : Qt.formatDateTime(sp_clock.value, "dddd, dd MMMM yyyy HH:mm AP") + + color : sp_clock.tColor + + font.pixelSize : 24 + + fontSizeMode : Text.VerticalFit + + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + } +} diff --git a/usr/share/sddm/themes/maya/fonts/OpenSans_CondLight.ttf b/usr/share/sddm/themes/maya/fonts/OpenSans_CondLight.ttf Binary files differnew file mode 100644 index 00000000..97c355b9 --- /dev/null +++ b/usr/share/sddm/themes/maya/fonts/OpenSans_CondLight.ttf diff --git a/usr/share/sddm/themes/maya/images/ic_arrow_drop_down_white_24px.svg b/usr/share/sddm/themes/maya/images/ic_arrow_drop_down_white_24px.svg new file mode 100644 index 00000000..f377a439 --- /dev/null +++ b/usr/share/sddm/themes/maya/images/ic_arrow_drop_down_white_24px.svg @@ -0,0 +1,4 @@ +<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> + <path d="M7 10l5 5 5-5z"/> + <path d="M0 0h24v24H0z" fill="none"/> +</svg>
\ No newline at end of file diff --git a/usr/share/sddm/themes/maya/images/ic_power_settings_new_white_24px.svg b/usr/share/sddm/themes/maya/images/ic_power_settings_new_white_24px.svg new file mode 100644 index 00000000..5a2e5fd4 --- /dev/null +++ b/usr/share/sddm/themes/maya/images/ic_power_settings_new_white_24px.svg @@ -0,0 +1,4 @@ +<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> + <path d="M0 0h24v24H0z" fill="none"/> + <path d="M13 3h-2v10h2V3zm4.83 2.17l-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83z"/> +</svg>
\ No newline at end of file diff --git a/usr/share/sddm/themes/maya/images/ic_refresh_white_24px.svg b/usr/share/sddm/themes/maya/images/ic_refresh_white_24px.svg new file mode 100644 index 00000000..7a8d303e --- /dev/null +++ b/usr/share/sddm/themes/maya/images/ic_refresh_white_24px.svg @@ -0,0 +1,4 @@ +<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> + <path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/> + <path d="M0 0h24v24H0z" fill="none"/> +</svg>
\ No newline at end of file diff --git a/usr/share/sddm/themes/maya/images/ic_warning_white_24px.svg b/usr/share/sddm/themes/maya/images/ic_warning_white_24px.svg new file mode 100644 index 00000000..d27ad142 --- /dev/null +++ b/usr/share/sddm/themes/maya/images/ic_warning_white_24px.svg @@ -0,0 +1,4 @@ +<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> + <path d="M0 0h24v24H0z" fill="none"/> + <path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/> +</svg>
\ No newline at end of file diff --git a/usr/share/sddm/themes/maya/metadata.desktop b/usr/share/sddm/themes/maya/metadata.desktop new file mode 100644 index 00000000..0c2ab262 --- /dev/null +++ b/usr/share/sddm/themes/maya/metadata.desktop @@ -0,0 +1,16 @@ +[SddmGreeterTheme] +Name=maya +Description=Simple Material inspired theme +Author=Sanjeev Premi +Copyright=(c) 2016, Sanjeev Premi +License=CC-BY-SA +Type=sddm-theme +Version=0.1 +Website=https://github.com/spremi +Screenshot=screenshots/hi_IN.png +MainScript=Main.qml +ConfigFile=theme.conf +TranslationsDirectory=translations +Email=spremi@ymail.com +Theme-Id=maya +Theme-API=2.0 diff --git a/usr/share/sddm/themes/maya/screenshots/hi_IN.png b/usr/share/sddm/themes/maya/screenshots/hi_IN.png Binary files differnew file mode 100644 index 00000000..7fe1362c --- /dev/null +++ b/usr/share/sddm/themes/maya/screenshots/hi_IN.png diff --git a/usr/share/sddm/themes/maya/theme.conf b/usr/share/sddm/themes/maya/theme.conf new file mode 100644 index 00000000..e228fe21 --- /dev/null +++ b/usr/share/sddm/themes/maya/theme.conf @@ -0,0 +1,24 @@ +[General] +primaryShade= +primaryLight= +primaryDark= + +primaryHue1= +primaryHue2= +primaryHue3= + +accentShade= +accentLight= + +accentHue1= +accentHue2= +accentHue3= + +normalText= + +successText= +failureText= +warningText= + +rebootColor= +powerColor= |
