Compare commits

..

18 commits
1.4 ... master

Author SHA1 Message Date
98996b49e0
Merge pull request #16 from KamaleiZestri/master
Qt5 -> Qt6 Compatability
2024-12-04 19:25:47 +03:00
Kamalei Zestri
9acbf5717d Qt6 compat 2024-12-03 05:06:41 -06:00
126c9da9e3 Fixed links 2024-11-28 14:00:45 +03:00
d412b338bc
Merge pull request #12 from Vistaus/master 2023-07-02 12:36:52 +03:00
Heimen Stoffels
589fef11c0
Added Dutch translation 2023-01-11 22:45:56 +01:00
763b8f4e01
Fixed incorrect repo link 2021-11-06 12:29:15 +03:00
1ddbc490a5 Version 1.5.1 2020-11-21 18:52:52 +03:00
a5dd7d2d63 Disable virtual keyboard
Closes #6.
Also some preparations for proper virtual keyboard support.
2020-11-21 18:50:41 +03:00
fb649ce9cd Slight reorganize and updated README
Should fix sddm-kcm installs.
2020-11-19 23:42:57 +03:00
5c7b0f62a3 Version 1.5 2019-07-01 00:52:41 +03:00
3506526e3b Manual user login mode 2019-06-30 21:05:28 +03:00
152e2f6eac Switch keyboard layout on left click 2019-06-30 19:04:35 +03:00
dd74f2de31 Recomputing scale and opacity for list items to look more like wheel 2019-06-30 17:29:28 +03:00
10103295e5 Arrow keys navigation between screens
Was suggested by hughdahand on OpenDesktop. Had no plans to implement it initally, but since it can improve usablity, I decided to give it a try.
2019-06-30 15:15:08 +03:00
1450e287a6 Fixed mouse scrolling 2019-06-30 14:55:39 +03:00
71652903f1 Updated metadata.desktop: changed version tag 2018-09-23 00:20:17 +03:00
251f6469c7 Updated metadata.desktop: added screenshot preview 2018-09-23 00:18:29 +03:00
acf5625719 Added theme preview screenshot 2018-09-23 00:12:52 +03:00
17 changed files with 308 additions and 139 deletions

2
.gitignore vendored
View file

@ -1 +1 @@
slice/theme.conf.user theme.conf.user

View file

@ -1,12 +1,15 @@
import QtQuick 2.7 import QtQuick 2.7
import QtGraphicalEffects 1.0 import Qt5Compat.GraphicalEffects
import SddmComponents 2.0 import SddmComponents 2.0
import "slice"
Rectangle Rectangle
{ {
id: root id: root
color: colors.background color: colors.background
property variant geometry: screenModel.geometry(screenModel.primary) property variant geometry: screenModel.geometry(screenModel.primary)
//property bool virtualkeyboard: bool(config.virtualkeyboard)
state: "stateUsers" state: "stateUsers"
states: states:
@ -198,12 +201,24 @@ Rectangle
id: pageUsers id: pageUsers
width: areaMain.width width: areaMain.width
height: areaMain.height height: areaMain.height
y: inputPanel.visible && inputPanel.y != areaMain.height + areaBottom.height ? -150 : 0
Behavior on x { NumberAnimation { duration: 150 } } Behavior on x { NumberAnimation { duration: 150 } }
Behavior on y { NumberAnimation { duration: 150 } }
onLockNav: areaTop.enabled = false onLockNav: areaTop.enabled = false
onUnlockNav: areaTop.enabled = true onUnlockNav: areaTop.enabled = true
} }
Loader {
id: inputPanel
source: "slice/VirtualKeyboard.qml"
width: areaMain.width
y: areaMain.height - 350 - areaBottom.height
Behavior on y { NumberAnimation { duration: 150 } }
//visible: virtualkeyboard
visible: false
}
} }
Item Item
@ -257,6 +272,12 @@ Rectangle
y: areaBottom.height - height - 5 y: areaBottom.height - height - 5
text: keyboard.layouts[keyboard.currentLayout].longName text: keyboard.layouts[keyboard.currentLayout].longName
onClicked: {
var newId = keyboard.currentLayout+1;
if (newId >= keyboard.layouts.length)
newId = 0;
keyboard.currentLayout = newId;
}
font: fonts.slicesBottomLeft font: fonts.slicesBottomLeft
} }
@ -350,14 +371,14 @@ Rectangle
switch (root.state) switch (root.state)
{ {
case "statePower": case "statePower":
if (wheel.pixelDelta.y < 0) if (wheel.angleDelta.y < 0)
pagePower.scroll_up() pagePower.scroll_up()
else else
pagePower.scroll_down() pagePower.scroll_down()
break break
case "stateSessions": case "stateSessions":
if (wheel.pixelDelta.y < 0) if (wheel.angleDelta.y < 0)
pageSessions.scroll_up() pageSessions.scroll_up()
else else
pageSessions.scroll_down() pageSessions.scroll_down()
@ -366,7 +387,7 @@ Rectangle
case "stateUsers": case "stateUsers":
if (!pageUsers.hasLoginShown) if (!pageUsers.hasLoginShown)
{ {
if (wheel.pixelDelta.y < 0) if (wheel.angleDelta.y < 0)
pageUsers.scroll_up() pageUsers.scroll_up()
else else
pageUsers.scroll_down() pageUsers.scroll_down()
@ -376,7 +397,7 @@ Rectangle
} }
} }
Keys.onTabPressed: { function nextScreen() {
switch(root.state) switch(root.state)
{ {
case "statePower": case "statePower":
@ -392,7 +413,8 @@ Rectangle
break; break;
} }
} }
Keys.onBacktabPressed: {
function previousScreen() {
switch(root.state) switch(root.state)
{ {
case "statePower": case "statePower":
@ -408,5 +430,10 @@ Rectangle
break; break;
} }
} }
Keys.onTabPressed: nextScreen()
Keys.onBacktabPressed: previousScreen()
Keys.onLeftPressed: previousScreen()
Keys.onRightPressed: nextScreen()
} }

View file

@ -4,42 +4,47 @@ Simple dark SDDM theme with many customization options.
[![Theme preview (YouTube)](https://user-images.githubusercontent.com/2903496/45325970-142dd700-b55b-11e8-8396-dc6aba6282e5.png)](https://youtu.be/X6lXkBwo--s) [![Theme preview (YouTube)](https://user-images.githubusercontent.com/2903496/45325970-142dd700-b55b-11e8-8396-dc6aba6282e5.png)](https://youtu.be/X6lXkBwo--s)
## Installing ## Install from KDE system settings
If you're using KDE, you can install theme from `System Settings > Startup and Shutdown > Login Screen (SDDM)`. You can download this repo as zip and install with `Install From File...`, or you can find it in `Get New Login Screens...` window.
## Manual install
1. Install `Qt Graphical Effects` QML module 1. Install `Qt Graphical Effects` QML module
2. Install Roboto font (optional, you can change to other font, [see below](#font-scheme)) 2. Install Roboto font (optional, you can change to other font, [see below](#font-scheme))
3. `git clone https://github.com/RadRussianRus/sddm-slice.git` 3. `git clone https://github.com/EricKotato/sddm-slice.git`
4. `cp -r sddm-slice/slice /usr/share/sddm/themes/slice` 4. `cp -r sddm-slice /usr/share/sddm/themes/sddm-slice`
5. Open `/etc/sddm.conf` and put `Current=slice` in `[Theme]` section 5. Open `/etc/sddm.conf` and put `Current=sddm-slice` in `[Theme]` section
## Configuration ## Configuration
Create file `theme.conf.user` in theme folder. See `slice/theme.conf` for reference. Also sample configs can be found [in wiki](https://github.com/RadRussianRus/sddm-slice/wiki#sample-configs). Create file `theme.conf.user` in theme folder. See `theme.conf` for reference. Also sample configs can be found [in wiki](https://github.com/EricKotato/sddm-slice/wiki#sample-configs).
### Base options ### Base options
* `background` - path to background image. If not set, falls back to `color_bg`. Not set by default. * `background` - path to background image. If not set, falls back to `color_bg`. Not set by default.
* `bg_mode` - background image fill mode. Can be either `aspect`, `fill`, `tile` or `none`. Defaults to `aspect`. * `bg_mode` - background image fill mode. Can be either `aspect`, `fill`, `tile` or `none`. Defaults to `aspect`.
* `parallax_bg_shift` - shifting of parallax background on tab change in pixels. `0` disables parallax motion. Negative values will scroll background in opposite direction. Default is `20`. * `parallax_bg_shift` - shifting of parallax background on tab change in pixels. `0` disables parallax motion. Negative values will scroll background in opposite direction. Default is `20`.
* `manual` - enables manual login mode and disables user selection. You can use "0/1", "true/false" and "yes/no" on this option. Disabled by default.
### Color scheme ### Color scheme
There are many color options. In fact, too many. So now they are grouped by layers in [color scheme](https://github.com/RadRussianRus/sddm-slice/wiki/Color-Scheme). Most of them are optional, only mandatory options are from [layer 1](https://github.com/RadRussianRus/sddm-slice/wiki/Color-Scheme-Layer-1): There are many color options. In fact, too many. So now they are grouped by layers in [color scheme](https://github.com/EricKotato/sddm-slice/wiki/Color-Scheme). Most of them are optional, only mandatory options are from [layer 1](https://github.com/EricKotato/sddm-slice/wiki/Color-Scheme-Layer-1):
* `color_bg` - background color. Defaults to `#222222`. * `color_bg` - background color. Defaults to `#222222`.
* `color_main` - main color. Defaults to `#dddddd`. * `color_main` - main color. Defaults to `#dddddd`.
* `color_dimmed` - dimmed main color. Defaults to `#888888`. * `color_dimmed` - dimmed main color. Defaults to `#888888`.
* `color_contrast` - color that contrasting to both main and dimmed. Defaults to `#1f1f1f`. * `color_contrast` - color that contrasting to both main and dimmed. Defaults to `#1f1f1f`.
Info about other layers can be found on wiki: [layer 2](https://github.com/RadRussianRus/sddm-slice/wiki/Color-Scheme-Layer-2), [layer 3](https://github.com/RadRussianRus/sddm-slice/wiki/Color-Scheme-Layer-3). Info about other layers can be found on wiki: [layer 2](https://github.com/EricKotato/sddm-slice/wiki/Color-Scheme-Layer-2), [layer 3](https://github.com/EricKotato/sddm-slice/wiki/Color-Scheme-Layer-3).
### Font scheme ### Font scheme
There are also many font options, so there is now [font scheme](https://github.com/RadRussianRus/sddm-slice/wiki/Font-Scheme) too. Most of them are optional, only mandatory option is from [layer 1](https://github.com/RadRussianRus/sddm-slice/wiki/Font-Scheme-Layer-1): There are also many font options, so there is now [font scheme](https://github.com/EricKotato/sddm-slice/wiki/Font-Scheme) too. Most of them are optional, only mandatory option is from [layer 1](https://github.com/EricKotato/sddm-slice/wiki/Font-Scheme-Layer-1):
* `font` - overall font. Defaults to `Roboto`. * `font` - overall font. Defaults to `Roboto`.
Info about other layers can be found on wiki: [layer 2](https://github.com/RadRussianRus/sddm-slice/wiki/Font-Scheme-Layer-2), [layer 3](https://github.com/RadRussianRus/sddm-slice/wiki/Font-Scheme-Layer-3). Info about other layers can be found on wiki: [layer 2](https://github.com/EricKotato/sddm-slice/wiki/Font-Scheme-Layer-2), [layer 3](https://github.com/EricKotato/sddm-slice/wiki/Font-Scheme-Layer-3).
### Debug mode options ### Debug mode options

View file

@ -2,11 +2,12 @@
Name=Slice Name=Slice
Description=Simple SDDM theme. Description=Simple SDDM theme.
Author=RadRussianRus Author=RadRussianRus
Copyright=(c) 2018, RadRussianRus Copyright=(c) 2020, RadRussianRus
License=CC-BY-SA License=CC-BY-SA
Type=sddm-theme Type=sddm-theme
Website=https://github.com/RadRussianRus/slice-sddm Screenshot=screenshot.png
Version=1.0 Website=https://github.com/RadRussianRus/sddm-slice
Version=1.5.1
MainScript=Main.qml MainScript=Main.qml
TranslationsDirectory=translations TranslationsDirectory=translations
ConfigFile=theme.conf ConfigFile=theme.conf

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View file

@ -157,6 +157,15 @@ Item
capitalization: not_null(config.font_input_capitalize) ? cap(config.font_input_capitalize) : inputGroup.capitalization capitalization: not_null(config.font_input_capitalize) ? cap(config.font_input_capitalize) : inputGroup.capitalization
}); });
property font loginInput: Qt.font({
family: config.font_login_input ? config.font_login_input : inputGroup.family,
pointSize: config.font_login_input_size ? Number(config.font_login_input_size) : inputGroup.pointSize,
bold: not_null(config.font_login_input_bold) ? bool(config.font_login_input_bold) : true,
italic: not_null(config.font_login_input_italic) ? bool(config.font_login_input_italic) : inputGroup.italic,
underline: not_null(config.font_login_input_underline) ? bool(config.font_login_input_underline) : inputGroup.underline,
capitalization: not_null(config.font_login_input_capitalize) ? cap(config.font_login_input_capitalize) : inputGroup.capitalization
});
property font placeholder: Qt.font({ property font placeholder: Qt.font({
family: config.font_placeholder ? config.font_placeholder : inputGroup.family, family: config.font_placeholder ? config.font_placeholder : inputGroup.family,
pointSize: config.font_placeholder_size ? Number(config.font_placeholder_size) : inputGroup.pointSize, pointSize: config.font_placeholder_size ? Number(config.font_placeholder_size) : inputGroup.pointSize,

View file

@ -1,5 +1,5 @@
import QtQuick 2.7 import QtQuick 2.7
import QtGraphicalEffects 1.0 import Qt5Compat.GraphicalEffects
Item Item
{ {

View file

@ -1,14 +1,15 @@
import QtQuick 2.7 import QtQuick 2.7
import QtGraphicalEffects 1.0 import Qt5Compat.GraphicalEffects
import SddmComponents 2.0 import SddmComponents 2.0
Item Item
{ {
id: itemRoot id: itemRoot
opacity: distance opacity: computedDistance
scale: distance scale: computedDistance
property real distance: 1.0 property real distance: 1.0
readonly property real computedDistance: Math.sin(Math.PI / 2 * distance)
property string sessionName: "" property string sessionName: ""
property bool hover: false property bool hover: false

View file

@ -1,11 +1,11 @@
import QtQuick 2.7 import QtQuick 2.7
import QtGraphicalEffects 1.0 import Qt5Compat.GraphicalEffects
import SddmComponents 2.0 import SddmComponents 2.0
Item Item
{ {
id: itemRoot id: itemRoot
opacity: distance opacity: computedDistance
width: parent.width width: parent.width
height: userName == "" ? userLoginText.height + 14 : userNameText.height + userLoginText.height - 4 height: userName == "" ? userLoginText.height + 14 : userNameText.height + userLoginText.height - 4
@ -15,11 +15,12 @@ Item
transform: Scale transform: Scale
{ {
origin.x: itemRoot.height + 12 origin.x: itemRoot.height + 12
xScale: distance xScale: computedDistance
yScale: distance yScale: computedDistance
} }
property real distance: 1.0 property real distance: 1.0
readonly property real computedDistance: Math.sin(Math.PI / 2 * distance)
property string userName: "" property string userName: ""
property string userLogin: "" property string userLogin: ""
property string userAvatar: "icons/no_avatar.svg" property string userAvatar: "icons/no_avatar.svg"

View file

@ -1,5 +1,5 @@
import QtQuick 2.7 import QtQuick 2.7
import QtGraphicalEffects 1.0 import Qt5Compat.GraphicalEffects
import SddmComponents 2.0 import SddmComponents 2.0
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3

View file

@ -10,6 +10,7 @@ Item
property int scrollRepeat: 0 property int scrollRepeat: 0
property string currentUserLogin: get_login(0) property string currentUserLogin: get_login(0)
property bool hasLoginShown: true property bool hasLoginShown: true
property bool manual: bool(config.manual)
signal lockNav() signal lockNav()
signal unlockNav() signal unlockNav()
@ -67,8 +68,12 @@ Item
onFocusChanged: onFocusChanged:
{ {
if (focus && hasLoginShown) if (focus && hasLoginShown) {
passwordField.forceActiveFocus() if (manual)
loginField.forceActiveFocus()
else
passwordField.forceActiveFocus()
}
} }
Item Item
@ -191,6 +196,7 @@ Item
userName: get_name(0) userName: get_name(0)
userLogin: get_login(0) userLogin: get_login(0)
userAvatar: get_avatar(0) userAvatar: get_avatar(0)
visible: !manual
} }
LoopListUserItem LoopListUserItem
@ -223,124 +229,179 @@ Item
userAvatar: get_avatar(3) userAvatar: get_avatar(3)
} }
Rectangle Item {
{ id: loginControls
id: passwordFieldBg y: manual ? middleItem.y : middleItem.y + middleItem.height + 2
y: middleItem.y + middleItem.height + 2
width: parent.width width: parent.width
height: Math.max(fonts.input.pointSize, fonts.placeholder.pointSize) + 20
opacity: hasLoginShown ? 1 : 0
color: colors.inputBg
}
TextInput Rectangle
{ {
id: passwordField id: loginFieldBg
x: 10 y: 0
y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y width: parent.width
width: parent.width - 20 height: Math.max(fonts.input.pointSize, fonts.placeholder.pointSize) + 20
opacity: hasLoginShown ? 1 : 0 opacity: hasLoginShown && manual ? 1 : 0
color: colors.inputText color: colors.inputBg
selectionColor: colors.inputSelectionBg }
selectedTextColor: colors.inputSelectionText
echoMode: TextInput.Password TextInput
clip: true {
selectByMouse: true id: loginField
x: 10
font: fonts.input y: (loginFieldBg.height - height) / 2 + loginFieldBg.y
width: parent.width - 20
opacity: hasLoginShown && manual ? 1 : 0
color: colors.inputText
selectionColor: colors.inputSelectionBg
selectedTextColor: colors.inputSelectionText
Component.onCompleted: forceActiveFocus() clip: true
selectByMouse: true
font: fonts.loginInput
} Component.onCompleted: if (manual) forceActiveFocus()
Keys.onTabPressed: passwordField.forceActiveFocus()
}
Text Text
{ {
id: passwordFieldPlaceholder id: loginFieldPlaceholder
x: passwordField.x x: loginField.x
y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y y: (loginFieldBg.height - height) / 2 + loginFieldBg.y
width: passwordField.width width: loginField.width
opacity: hasLoginShown ? 1 : 0 opacity: hasLoginShown && manual ? 1 : 0
visible: passwordField.text.length <= 0 visible: loginField.text.length <= 0
color: colors.inputPlaceholderText color: colors.inputPlaceholderText
font: fonts.placeholder font: fonts.placeholder
text: localeText.password text: localeText.userName
} }
Rectangle Rectangle
{ {
id: progressBar id: passwordFieldBg
y: passwordFieldBg.y + passwordFieldBg.height y: manual ? loginFieldBg.y + loginFieldBg.height + 2 : 0
width: parent.width width: parent.width
height: 2 height: Math.max(fonts.input.pointSize, fonts.placeholder.pointSize) + 20
opacity: hasLoginShown ? 1 : 0 opacity: hasLoginShown ? 1 : 0
color: colors.progressBar color: colors.inputBg
} }
Rectangle TextInput
{ {
id: progressBarBg id: passwordField
y: progressBar.y x: 10
width: parent.width y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y
height: 2 width: parent.width - 20
opacity: 0 opacity: hasLoginShown ? 1 : 0
color: colors.progressBarBg color: colors.inputText
} selectionColor: colors.inputSelectionBg
selectedTextColor: colors.inputSelectionText
Rectangle echoMode: TextInput.Password
{ clip: true
id: progressBarSlider1 selectByMouse: true
x: 0
y: progressBar.y font: fonts.input
width: parent.width / 5
height: 2
opacity: 0
color: colors.progressBarSlider
}
Rectangle Component.onCompleted: forceActiveFocus()
{ Keys.onBacktabPressed: { if (manual) loginField.forceActiveFocus(); else event.accepted = false; }
id: progressBarSlider2
x: parent.width
y: progressBar.y
width: 0
height: 2
opacity: 0
color: colors.progressBarSlider
}
SlicedButton }
{
id: buttonUserLogin
x: userListContainer.width - widthFull
y: progressBar.y + progressBar.height + 2
paddingTop: 2
highlighted: true
opacity: hasLoginShown ? 1 : 0
text: localeText.login Text
{
id: passwordFieldPlaceholder
x: passwordField.x
y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y
width: passwordField.width
opacity: hasLoginShown ? 1 : 0
visible: passwordField.text.length <= 0
onClicked: select_or_login() color: colors.inputPlaceholderText
font: fonts.slicesLoginButtons font: fonts.placeholder
}
SlicedButton text: localeText.password
{ }
id: buttonUserBack
x: userListContainer.width - widthFull - buttonUserLogin.widthPartial - 3
y: buttonUserLogin.y
paddingTop: 2
opacity: hasLoginShown ? 1 : 0
text: qsTr("Back") Rectangle
{
id: progressBar
y: passwordFieldBg.y + passwordFieldBg.height
width: parent.width
height: 2
opacity: hasLoginShown ? 1 : 0
color: colors.progressBar
}
onClicked: back_to_selection() Rectangle
{
id: progressBarBg
y: progressBar.y
width: parent.width
height: 2
opacity: 0
color: colors.progressBarBg
}
Rectangle
{
id: progressBarSlider1
x: 0
y: progressBar.y
width: parent.width / 5
height: 2
opacity: 0
color: colors.progressBarSlider
}
Rectangle
{
id: progressBarSlider2
x: parent.width
y: progressBar.y
width: 0
height: 2
opacity: 0
color: colors.progressBarSlider
}
SlicedButton
{
id: buttonUserLogin
x: userListContainer.width - widthFull
y: progressBar.y + progressBar.height + 2
paddingTop: 2
highlighted: true
opacity: hasLoginShown ? 1 : 0
text: localeText.login
onClicked: select_or_login()
font: fonts.slicesLoginButtons
}
SlicedButton
{
id: buttonUserBack
x: userListContainer.width - widthFull - buttonUserLogin.widthPartial - 3
y: buttonUserLogin.y
paddingTop: 2
opacity: hasLoginShown ? 1 : 0
visible: !manual
text: qsTr("Back")
onClicked: back_to_selection()
font: fonts.slicesLoginButtons
}
font: fonts.slicesLoginButtons
} }
Rectangle Rectangle
@ -419,6 +480,9 @@ Item
NumberAnimation { target: middleItem; property: "y"; to: pageRoot.height / 2.3 - (middleItem.height / 2 + passwordFieldBg.height + progressBar.height + 2 + buttonUserLogin.height) / 2; duration: userListContainer.scrollDuration } NumberAnimation { target: middleItem; property: "y"; to: pageRoot.height / 2.3 - (middleItem.height / 2 + passwordFieldBg.height + progressBar.height + 2 + buttonUserLogin.height) / 2; duration: userListContainer.scrollDuration }
NumberAnimation { target: loginField; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
NumberAnimation { target: loginFieldPlaceholder; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
NumberAnimation { target: loginFieldBg; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordField; property: "opacity"; to: 1; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordField; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordFieldPlaceholder; property: "opacity"; to: 1; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordFieldPlaceholder; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordFieldBg; property: "opacity"; to: 1; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordFieldBg; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
@ -443,6 +507,9 @@ Item
NumberAnimation { target: middleItem; property: "y"; to: pageRoot.height / 2.3; duration: userListContainer.scrollDuration } NumberAnimation { target: middleItem; property: "y"; to: pageRoot.height / 2.3; duration: userListContainer.scrollDuration }
NumberAnimation { target: loginField; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
NumberAnimation { target: loginFieldPlaceholder; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
NumberAnimation { target: loginFieldBg; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordField; property: "opacity"; to: 0; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordField; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordFieldPlaceholder; property: "opacity"; to: 0; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordFieldPlaceholder; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordFieldBg; property: "opacity"; to: 0; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordFieldBg; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
@ -538,7 +605,7 @@ Item
id: loginEnterAnimation id: loginEnterAnimation
NumberAnimation { target: passwordField; property: "opacity"; to: 0; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordField; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordFieldBg; property: "height"; to: 0; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordFieldBg; property: "height"; to: 0; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordFieldBg; property: "y"; to: pageRoot.height / 2.3 - (middleItem.height / 2 + progressBar.height + 2) / 2; duration: userListContainer.scrollDuration } NumberAnimation { target: loginControls; property: "y"; to: pageRoot.height / 2.3 - (middleItem.height / 2 + progressBar.height + 2) / 2; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordFieldPlaceholder; property: "opacity"; to: 0; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordFieldPlaceholder; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
NumberAnimation { target: buttonUserBack; property: "opacity"; to: 0; duration: userListContainer.scrollDuration } NumberAnimation { target: buttonUserBack; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
NumberAnimation { target: buttonUserLogin; property: "opacity"; to: 0; duration: userListContainer.scrollDuration } NumberAnimation { target: buttonUserLogin; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
@ -555,7 +622,7 @@ Item
id: loginExitAnimation id: loginExitAnimation
NumberAnimation { target: passwordField; property: "opacity"; to: 1; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordField; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordFieldBg; property: "height"; to: 40; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordFieldBg; property: "height"; to: 40; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordFieldBg; property: "y"; to: pageRoot.height / 2.3 - (middleItem.height / 2 + passwordFieldBg.height + progressBar.height + 2 + buttonUserLogin.height) / 2; duration: userListContainer.scrollDuration } NumberAnimation { target: loginControls; property: "y"; to: pageRoot.height / 2.3 - (middleItem.height / 2 + passwordFieldBg.height + progressBar.height + 2 + buttonUserLogin.height) / 2; duration: userListContainer.scrollDuration }
NumberAnimation { target: passwordFieldPlaceholder; property: "opacity"; to: 1; duration: userListContainer.scrollDuration } NumberAnimation { target: passwordFieldPlaceholder; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
NumberAnimation { target: buttonUserBack; property: "opacity"; to: 1; duration: userListContainer.scrollDuration } NumberAnimation { target: buttonUserBack; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
NumberAnimation { target: buttonUserLogin; property: "opacity"; to: 1; duration: userListContainer.scrollDuration } NumberAnimation { target: buttonUserLogin; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
@ -621,10 +688,14 @@ Item
loginEnterAnimation.start() loginEnterAnimation.start()
if (debug.loginError) if (debug.loginError)
loginTimeoutTimer.start() loginTimeoutTimer.start()
else else {
sddm.login(currentUserLogin, passwordField.text, selectedSessionIndex) if (manual)
sddm.login(loginField.text, passwordField.text, selectedSessionIndex)
else
sddm.login(currentUserLogin, passwordField.text, selectedSessionIndex)
}
} }
else else if (!manual)
{ {
topFarItem.hoverEnabled = false topFarItem.hoverEnabled = false
topMidItem.hoverEnabled = false topMidItem.hoverEnabled = false
@ -637,7 +708,7 @@ Item
function back_to_selection() function back_to_selection()
{ {
if (hasLoginShown) if (hasLoginShown && !manual)
{ {
topFarItem.hoverEnabled = true topFarItem.hoverEnabled = true
topMidItem.hoverEnabled = true topMidItem.hoverEnabled = true
@ -657,10 +728,30 @@ Item
onTriggered: sddm.onLoginFailed() onTriggered: sddm.onLoginFailed()
} }
Keys.onUpPressed: scroll_down() Keys.onUpPressed: {
Keys.onDownPressed: scroll_up() if (manual && hasLoginShown && passwordField.activeFocus) {
Keys.onEnterPressed: select_or_login() loginField.forceActiveFocus()
Keys.onReturnPressed: select_or_login() } else
scroll_down()
}
Keys.onDownPressed: {
if (manual && hasLoginShown && loginField.activeFocus) {
passwordField.forceActiveFocus()
} else
scroll_up()
}
Keys.onEnterPressed: {
if (hasLoginShown && !passwordField.activeFocus)
passwordField.forceActiveFocus()
else
select_or_login()
}
Keys.onReturnPressed: {
if (hasLoginShown && !passwordField.activeFocus)
passwordField.forceActiveFocus()
else
select_or_login()
}
Keys.onEscapePressed: back_to_selection() Keys.onEscapePressed: back_to_selection()
} }

View file

@ -0,0 +1,7 @@
import QtQuick 2.7
import QtQuick.VirtualKeyboard 2.1
InputPanel {
id: inputPanel
width: parent.width
}

View file

@ -6,4 +6,5 @@ parallax_bg_shift=20
color_bg=#222222 color_bg=#222222
color_main=#dddddd color_main=#dddddd
color_dimmed=#888888 color_dimmed=#888888
color_contrast=#1f1f1f color_contrast=#1f1f1f
manual=false

BIN
translations/nl.qm Normal file

Binary file not shown.

26
translations/nl.ts Normal file
View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="nl">
<context>
<name>PagePower</name>
<message>
<source>Suspend</source>
<translation>Pauzestand</translation>
</message>
<message>
<source>Hibernate</source>
<translation>Slaapstand</translation>
</message>
<message>
<source>Hybrid Sleep</source>
<translation>Hybride slaapstand</translation>
</message>
</context>
<context>
<name>PageUsers</name>
<message>
<source>Back</source>
<translation>Terug</translation>
</message>
</context>
</TS>