Compare commits
18 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 98996b49e0 | |||
|
|
9acbf5717d | ||
| 126c9da9e3 | |||
| d412b338bc | |||
|
|
589fef11c0 | ||
| 763b8f4e01 | |||
| 1ddbc490a5 | |||
| a5dd7d2d63 | |||
| fb649ce9cd | |||
| 5c7b0f62a3 | |||
| 3506526e3b | |||
| 152e2f6eac | |||
| dd74f2de31 | |||
| 10103295e5 | |||
| 1450e287a6 | |||
| 71652903f1 | |||
| 251f6469c7 | |||
| acf5625719 |
17 changed files with 308 additions and 139 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1 +1 @@
|
|||
slice/theme.conf.user
|
||||
theme.conf.user
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
import QtQuick 2.7
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import SddmComponents 2.0
|
||||
|
||||
import "slice"
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: root
|
||||
color: colors.background
|
||||
property variant geometry: screenModel.geometry(screenModel.primary)
|
||||
//property bool virtualkeyboard: bool(config.virtualkeyboard)
|
||||
|
||||
state: "stateUsers"
|
||||
states:
|
||||
|
|
@ -198,12 +201,24 @@ Rectangle
|
|||
id: pageUsers
|
||||
width: areaMain.width
|
||||
height: areaMain.height
|
||||
y: inputPanel.visible && inputPanel.y != areaMain.height + areaBottom.height ? -150 : 0
|
||||
|
||||
Behavior on x { NumberAnimation { duration: 150 } }
|
||||
Behavior on y { NumberAnimation { duration: 150 } }
|
||||
|
||||
onLockNav: areaTop.enabled = false
|
||||
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
|
||||
|
|
@ -257,6 +272,12 @@ Rectangle
|
|||
y: areaBottom.height - height - 5
|
||||
|
||||
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
|
||||
}
|
||||
|
|
@ -350,14 +371,14 @@ Rectangle
|
|||
switch (root.state)
|
||||
{
|
||||
case "statePower":
|
||||
if (wheel.pixelDelta.y < 0)
|
||||
if (wheel.angleDelta.y < 0)
|
||||
pagePower.scroll_up()
|
||||
else
|
||||
pagePower.scroll_down()
|
||||
break
|
||||
|
||||
case "stateSessions":
|
||||
if (wheel.pixelDelta.y < 0)
|
||||
if (wheel.angleDelta.y < 0)
|
||||
pageSessions.scroll_up()
|
||||
else
|
||||
pageSessions.scroll_down()
|
||||
|
|
@ -366,7 +387,7 @@ Rectangle
|
|||
case "stateUsers":
|
||||
if (!pageUsers.hasLoginShown)
|
||||
{
|
||||
if (wheel.pixelDelta.y < 0)
|
||||
if (wheel.angleDelta.y < 0)
|
||||
pageUsers.scroll_up()
|
||||
else
|
||||
pageUsers.scroll_down()
|
||||
|
|
@ -376,7 +397,7 @@ Rectangle
|
|||
}
|
||||
}
|
||||
|
||||
Keys.onTabPressed: {
|
||||
function nextScreen() {
|
||||
switch(root.state)
|
||||
{
|
||||
case "statePower":
|
||||
|
|
@ -392,7 +413,8 @@ Rectangle
|
|||
break;
|
||||
}
|
||||
}
|
||||
Keys.onBacktabPressed: {
|
||||
|
||||
function previousScreen() {
|
||||
switch(root.state)
|
||||
{
|
||||
case "statePower":
|
||||
|
|
@ -408,5 +430,10 @@ Rectangle
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onTabPressed: nextScreen()
|
||||
Keys.onBacktabPressed: previousScreen()
|
||||
Keys.onLeftPressed: previousScreen()
|
||||
Keys.onRightPressed: nextScreen()
|
||||
}
|
||||
|
||||
23
README.md
23
README.md
|
|
@ -4,42 +4,47 @@ Simple dark SDDM theme with many customization options.
|
|||
|
||||
[](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
|
||||
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`
|
||||
4. `cp -r sddm-slice/slice /usr/share/sddm/themes/slice`
|
||||
5. Open `/etc/sddm.conf` and put `Current=slice` in `[Theme]` section
|
||||
3. `git clone https://github.com/EricKotato/sddm-slice.git`
|
||||
4. `cp -r sddm-slice /usr/share/sddm/themes/sddm-slice`
|
||||
5. Open `/etc/sddm.conf` and put `Current=sddm-slice` in `[Theme]` section
|
||||
|
||||
## 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
|
||||
|
||||
* `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`.
|
||||
* `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
|
||||
|
||||
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_main` - main color. Defaults to `#dddddd`.
|
||||
* `color_dimmed` - dimmed main color. Defaults to `#888888`.
|
||||
* `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
|
||||
|
||||
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`.
|
||||
|
||||
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
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,12 @@
|
|||
Name=Slice
|
||||
Description=Simple SDDM theme.
|
||||
Author=RadRussianRus
|
||||
Copyright=(c) 2018, RadRussianRus
|
||||
Copyright=(c) 2020, RadRussianRus
|
||||
License=CC-BY-SA
|
||||
Type=sddm-theme
|
||||
Website=https://github.com/RadRussianRus/slice-sddm
|
||||
Version=1.0
|
||||
Screenshot=screenshot.png
|
||||
Website=https://github.com/RadRussianRus/sddm-slice
|
||||
Version=1.5.1
|
||||
MainScript=Main.qml
|
||||
TranslationsDirectory=translations
|
||||
ConfigFile=theme.conf
|
||||
ConfigFile=theme.conf
|
||||
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
|
|
@ -157,6 +157,15 @@ Item
|
|||
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({
|
||||
family: config.font_placeholder ? config.font_placeholder : inputGroup.family,
|
||||
pointSize: config.font_placeholder_size ? Number(config.font_placeholder_size) : inputGroup.pointSize,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import QtQuick 2.7
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
Item
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
import QtQuick 2.7
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import SddmComponents 2.0
|
||||
|
||||
Item
|
||||
{
|
||||
id: itemRoot
|
||||
opacity: distance
|
||||
scale: distance
|
||||
opacity: computedDistance
|
||||
scale: computedDistance
|
||||
|
||||
property real distance: 1.0
|
||||
readonly property real computedDistance: Math.sin(Math.PI / 2 * distance)
|
||||
property string sessionName: ""
|
||||
property bool hover: false
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import QtQuick 2.7
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import SddmComponents 2.0
|
||||
|
||||
Item
|
||||
{
|
||||
id: itemRoot
|
||||
opacity: distance
|
||||
opacity: computedDistance
|
||||
width: parent.width
|
||||
height: userName == "" ? userLoginText.height + 14 : userNameText.height + userLoginText.height - 4
|
||||
|
||||
|
|
@ -15,11 +15,12 @@ Item
|
|||
transform: Scale
|
||||
{
|
||||
origin.x: itemRoot.height + 12
|
||||
xScale: distance
|
||||
yScale: distance
|
||||
xScale: computedDistance
|
||||
yScale: computedDistance
|
||||
}
|
||||
|
||||
property real distance: 1.0
|
||||
readonly property real computedDistance: Math.sin(Math.PI / 2 * distance)
|
||||
property string userName: ""
|
||||
property string userLogin: ""
|
||||
property string userAvatar: "icons/no_avatar.svg"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import QtQuick 2.7
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import SddmComponents 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ Item
|
|||
property int scrollRepeat: 0
|
||||
property string currentUserLogin: get_login(0)
|
||||
property bool hasLoginShown: true
|
||||
property bool manual: bool(config.manual)
|
||||
|
||||
signal lockNav()
|
||||
signal unlockNav()
|
||||
|
|
@ -67,8 +68,12 @@ Item
|
|||
|
||||
onFocusChanged:
|
||||
{
|
||||
if (focus && hasLoginShown)
|
||||
passwordField.forceActiveFocus()
|
||||
if (focus && hasLoginShown) {
|
||||
if (manual)
|
||||
loginField.forceActiveFocus()
|
||||
else
|
||||
passwordField.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
|
|
@ -191,6 +196,7 @@ Item
|
|||
userName: get_name(0)
|
||||
userLogin: get_login(0)
|
||||
userAvatar: get_avatar(0)
|
||||
visible: !manual
|
||||
}
|
||||
|
||||
LoopListUserItem
|
||||
|
|
@ -223,124 +229,179 @@ Item
|
|||
userAvatar: get_avatar(3)
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: passwordFieldBg
|
||||
y: middleItem.y + middleItem.height + 2
|
||||
Item {
|
||||
id: loginControls
|
||||
y: manual ? middleItem.y : middleItem.y + middleItem.height + 2
|
||||
width: parent.width
|
||||
height: Math.max(fonts.input.pointSize, fonts.placeholder.pointSize) + 20
|
||||
opacity: hasLoginShown ? 1 : 0
|
||||
color: colors.inputBg
|
||||
}
|
||||
|
||||
TextInput
|
||||
{
|
||||
id: passwordField
|
||||
x: 10
|
||||
y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y
|
||||
width: parent.width - 20
|
||||
opacity: hasLoginShown ? 1 : 0
|
||||
color: colors.inputText
|
||||
selectionColor: colors.inputSelectionBg
|
||||
selectedTextColor: colors.inputSelectionText
|
||||
Rectangle
|
||||
{
|
||||
id: loginFieldBg
|
||||
y: 0
|
||||
width: parent.width
|
||||
height: Math.max(fonts.input.pointSize, fonts.placeholder.pointSize) + 20
|
||||
opacity: hasLoginShown && manual ? 1 : 0
|
||||
color: colors.inputBg
|
||||
}
|
||||
|
||||
echoMode: TextInput.Password
|
||||
clip: true
|
||||
selectByMouse: true
|
||||
|
||||
font: fonts.input
|
||||
TextInput
|
||||
{
|
||||
id: loginField
|
||||
x: 10
|
||||
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
|
||||
{
|
||||
id: passwordFieldPlaceholder
|
||||
x: passwordField.x
|
||||
y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y
|
||||
width: passwordField.width
|
||||
opacity: hasLoginShown ? 1 : 0
|
||||
visible: passwordField.text.length <= 0
|
||||
Text
|
||||
{
|
||||
id: loginFieldPlaceholder
|
||||
x: loginField.x
|
||||
y: (loginFieldBg.height - height) / 2 + loginFieldBg.y
|
||||
width: loginField.width
|
||||
opacity: hasLoginShown && manual ? 1 : 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
|
||||
{
|
||||
id: progressBar
|
||||
y: passwordFieldBg.y + passwordFieldBg.height
|
||||
width: parent.width
|
||||
height: 2
|
||||
opacity: hasLoginShown ? 1 : 0
|
||||
color: colors.progressBar
|
||||
}
|
||||
Rectangle
|
||||
{
|
||||
id: passwordFieldBg
|
||||
y: manual ? loginFieldBg.y + loginFieldBg.height + 2 : 0
|
||||
width: parent.width
|
||||
height: Math.max(fonts.input.pointSize, fonts.placeholder.pointSize) + 20
|
||||
opacity: hasLoginShown ? 1 : 0
|
||||
color: colors.inputBg
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: progressBarBg
|
||||
y: progressBar.y
|
||||
width: parent.width
|
||||
height: 2
|
||||
opacity: 0
|
||||
color: colors.progressBarBg
|
||||
}
|
||||
TextInput
|
||||
{
|
||||
id: passwordField
|
||||
x: 10
|
||||
y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y
|
||||
width: parent.width - 20
|
||||
opacity: hasLoginShown ? 1 : 0
|
||||
color: colors.inputText
|
||||
selectionColor: colors.inputSelectionBg
|
||||
selectedTextColor: colors.inputSelectionText
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: progressBarSlider1
|
||||
x: 0
|
||||
y: progressBar.y
|
||||
width: parent.width / 5
|
||||
height: 2
|
||||
opacity: 0
|
||||
color: colors.progressBarSlider
|
||||
}
|
||||
echoMode: TextInput.Password
|
||||
clip: true
|
||||
selectByMouse: true
|
||||
|
||||
font: fonts.input
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: progressBarSlider2
|
||||
x: parent.width
|
||||
y: progressBar.y
|
||||
width: 0
|
||||
height: 2
|
||||
opacity: 0
|
||||
color: colors.progressBarSlider
|
||||
}
|
||||
Component.onCompleted: forceActiveFocus()
|
||||
Keys.onBacktabPressed: { if (manual) loginField.forceActiveFocus(); else event.accepted = false; }
|
||||
|
||||
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
|
||||
{
|
||||
id: buttonUserBack
|
||||
x: userListContainer.width - widthFull - buttonUserLogin.widthPartial - 3
|
||||
y: buttonUserLogin.y
|
||||
paddingTop: 2
|
||||
opacity: hasLoginShown ? 1 : 0
|
||||
text: localeText.password
|
||||
}
|
||||
|
||||
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
|
||||
|
|
@ -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: 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: passwordFieldPlaceholder; 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: 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: passwordFieldPlaceholder; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
|
||||
NumberAnimation { target: passwordFieldBg; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
|
||||
|
|
@ -538,7 +605,7 @@ Item
|
|||
id: loginEnterAnimation
|
||||
NumberAnimation { target: passwordField; property: "opacity"; 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: buttonUserBack; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
|
||||
NumberAnimation { target: buttonUserLogin; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
|
||||
|
|
@ -555,7 +622,7 @@ Item
|
|||
id: loginExitAnimation
|
||||
NumberAnimation { target: passwordField; property: "opacity"; to: 1; 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: buttonUserBack; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
|
||||
NumberAnimation { target: buttonUserLogin; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
|
||||
|
|
@ -621,10 +688,14 @@ Item
|
|||
loginEnterAnimation.start()
|
||||
if (debug.loginError)
|
||||
loginTimeoutTimer.start()
|
||||
else
|
||||
sddm.login(currentUserLogin, passwordField.text, selectedSessionIndex)
|
||||
else {
|
||||
if (manual)
|
||||
sddm.login(loginField.text, passwordField.text, selectedSessionIndex)
|
||||
else
|
||||
sddm.login(currentUserLogin, passwordField.text, selectedSessionIndex)
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (!manual)
|
||||
{
|
||||
topFarItem.hoverEnabled = false
|
||||
topMidItem.hoverEnabled = false
|
||||
|
|
@ -637,7 +708,7 @@ Item
|
|||
|
||||
function back_to_selection()
|
||||
{
|
||||
if (hasLoginShown)
|
||||
if (hasLoginShown && !manual)
|
||||
{
|
||||
topFarItem.hoverEnabled = true
|
||||
topMidItem.hoverEnabled = true
|
||||
|
|
@ -657,10 +728,30 @@ Item
|
|||
onTriggered: sddm.onLoginFailed()
|
||||
}
|
||||
|
||||
Keys.onUpPressed: scroll_down()
|
||||
Keys.onDownPressed: scroll_up()
|
||||
Keys.onEnterPressed: select_or_login()
|
||||
Keys.onReturnPressed: select_or_login()
|
||||
Keys.onUpPressed: {
|
||||
if (manual && hasLoginShown && passwordField.activeFocus) {
|
||||
loginField.forceActiveFocus()
|
||||
} 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()
|
||||
|
||||
}
|
||||
7
slice/VirtualKeyboard.qml
Normal file
7
slice/VirtualKeyboard.qml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.VirtualKeyboard 2.1
|
||||
|
||||
InputPanel {
|
||||
id: inputPanel
|
||||
width: parent.width
|
||||
}
|
||||
|
|
@ -6,4 +6,5 @@ parallax_bg_shift=20
|
|||
color_bg=#222222
|
||||
color_main=#dddddd
|
||||
color_dimmed=#888888
|
||||
color_contrast=#1f1f1f
|
||||
color_contrast=#1f1f1f
|
||||
manual=false
|
||||
BIN
translations/nl.qm
Normal file
BIN
translations/nl.qm
Normal file
Binary file not shown.
26
translations/nl.ts
Normal file
26
translations/nl.ts
Normal 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>
|
||||
Loading…
Add table
Reference in a new issue