Compare commits
No commits in common. "master" and "1.4" have entirely different histories.
17 changed files with 139 additions and 308 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1 +1 @@
|
||||||
theme.conf.user
|
slice/theme.conf.user
|
||||||
23
README.md
23
README.md
|
|
@ -4,47 +4,42 @@ Simple dark SDDM theme with many customization options.
|
||||||
|
|
||||||
[](https://youtu.be/X6lXkBwo--s)
|
[](https://youtu.be/X6lXkBwo--s)
|
||||||
|
|
||||||
## Install from KDE system settings
|
## Installing
|
||||||
|
|
||||||
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/EricKotato/sddm-slice.git`
|
3. `git clone https://github.com/RadRussianRus/sddm-slice.git`
|
||||||
4. `cp -r sddm-slice /usr/share/sddm/themes/sddm-slice`
|
4. `cp -r sddm-slice/slice /usr/share/sddm/themes/slice`
|
||||||
5. Open `/etc/sddm.conf` and put `Current=sddm-slice` in `[Theme]` section
|
5. Open `/etc/sddm.conf` and put `Current=slice` in `[Theme]` section
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
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).
|
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).
|
||||||
|
|
||||||
### 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/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):
|
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):
|
||||||
|
|
||||||
* `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/EricKotato/sddm-slice/wiki/Color-Scheme-Layer-2), [layer 3](https://github.com/EricKotato/sddm-slice/wiki/Color-Scheme-Layer-3).
|
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).
|
||||||
|
|
||||||
### Font scheme
|
### Font scheme
|
||||||
|
|
||||||
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):
|
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):
|
||||||
|
|
||||||
* `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/EricKotato/sddm-slice/wiki/Font-Scheme-Layer-2), [layer 3](https://github.com/EricKotato/sddm-slice/wiki/Font-Scheme-Layer-3).
|
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).
|
||||||
|
|
||||||
### Debug mode options
|
### Debug mode options
|
||||||
|
|
||||||
|
|
|
||||||
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
|
Before Width: | Height: | Size: 88 KiB |
|
|
@ -157,15 +157,6 @@ 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,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import Qt5Compat.GraphicalEffects
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import Qt5Compat.GraphicalEffects
|
import QtGraphicalEffects 1.0
|
||||||
import SddmComponents 2.0
|
import SddmComponents 2.0
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: itemRoot
|
id: itemRoot
|
||||||
opacity: computedDistance
|
opacity: distance
|
||||||
scale: computedDistance
|
scale: distance
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import Qt5Compat.GraphicalEffects
|
import QtGraphicalEffects 1.0
|
||||||
import SddmComponents 2.0
|
import SddmComponents 2.0
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: itemRoot
|
id: itemRoot
|
||||||
opacity: computedDistance
|
opacity: distance
|
||||||
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,12 +15,11 @@ Item
|
||||||
transform: Scale
|
transform: Scale
|
||||||
{
|
{
|
||||||
origin.x: itemRoot.height + 12
|
origin.x: itemRoot.height + 12
|
||||||
xScale: computedDistance
|
xScale: distance
|
||||||
yScale: computedDistance
|
yScale: distance
|
||||||
}
|
}
|
||||||
|
|
||||||
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"
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import Qt5Compat.GraphicalEffects
|
import QtGraphicalEffects 1.0
|
||||||
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:
|
||||||
|
|
@ -201,24 +198,12 @@ 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
|
||||||
|
|
@ -272,12 +257,6 @@ 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
|
||||||
}
|
}
|
||||||
|
|
@ -371,14 +350,14 @@ Rectangle
|
||||||
switch (root.state)
|
switch (root.state)
|
||||||
{
|
{
|
||||||
case "statePower":
|
case "statePower":
|
||||||
if (wheel.angleDelta.y < 0)
|
if (wheel.pixelDelta.y < 0)
|
||||||
pagePower.scroll_up()
|
pagePower.scroll_up()
|
||||||
else
|
else
|
||||||
pagePower.scroll_down()
|
pagePower.scroll_down()
|
||||||
break
|
break
|
||||||
|
|
||||||
case "stateSessions":
|
case "stateSessions":
|
||||||
if (wheel.angleDelta.y < 0)
|
if (wheel.pixelDelta.y < 0)
|
||||||
pageSessions.scroll_up()
|
pageSessions.scroll_up()
|
||||||
else
|
else
|
||||||
pageSessions.scroll_down()
|
pageSessions.scroll_down()
|
||||||
|
|
@ -387,7 +366,7 @@ Rectangle
|
||||||
case "stateUsers":
|
case "stateUsers":
|
||||||
if (!pageUsers.hasLoginShown)
|
if (!pageUsers.hasLoginShown)
|
||||||
{
|
{
|
||||||
if (wheel.angleDelta.y < 0)
|
if (wheel.pixelDelta.y < 0)
|
||||||
pageUsers.scroll_up()
|
pageUsers.scroll_up()
|
||||||
else
|
else
|
||||||
pageUsers.scroll_down()
|
pageUsers.scroll_down()
|
||||||
|
|
@ -397,7 +376,7 @@ Rectangle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function nextScreen() {
|
Keys.onTabPressed: {
|
||||||
switch(root.state)
|
switch(root.state)
|
||||||
{
|
{
|
||||||
case "statePower":
|
case "statePower":
|
||||||
|
|
@ -413,8 +392,7 @@ Rectangle
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Keys.onBacktabPressed: {
|
||||||
function previousScreen() {
|
|
||||||
switch(root.state)
|
switch(root.state)
|
||||||
{
|
{
|
||||||
case "statePower":
|
case "statePower":
|
||||||
|
|
@ -430,10 +408,5 @@ Rectangle
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onTabPressed: nextScreen()
|
|
||||||
Keys.onBacktabPressed: previousScreen()
|
|
||||||
Keys.onLeftPressed: previousScreen()
|
|
||||||
Keys.onRightPressed: nextScreen()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import Qt5Compat.GraphicalEffects
|
import QtGraphicalEffects 1.0
|
||||||
import SddmComponents 2.0
|
import SddmComponents 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ 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()
|
||||||
|
|
@ -68,12 +67,8 @@ Item
|
||||||
|
|
||||||
onFocusChanged:
|
onFocusChanged:
|
||||||
{
|
{
|
||||||
if (focus && hasLoginShown) {
|
if (focus && hasLoginShown)
|
||||||
if (manual)
|
passwordField.forceActiveFocus()
|
||||||
loginField.forceActiveFocus()
|
|
||||||
else
|
|
||||||
passwordField.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
|
|
@ -196,7 +191,6 @@ 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
|
||||||
|
|
@ -229,179 +223,124 @@ Item
|
||||||
userAvatar: get_avatar(3)
|
userAvatar: get_avatar(3)
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Rectangle
|
||||||
id: loginControls
|
{
|
||||||
y: manual ? middleItem.y : middleItem.y + middleItem.height + 2
|
id: passwordFieldBg
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle
|
TextInput
|
||||||
{
|
{
|
||||||
id: loginFieldBg
|
id: passwordField
|
||||||
y: 0
|
x: 10
|
||||||
width: parent.width
|
y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y
|
||||||
height: Math.max(fonts.input.pointSize, fonts.placeholder.pointSize) + 20
|
width: parent.width - 20
|
||||||
opacity: hasLoginShown && manual ? 1 : 0
|
opacity: hasLoginShown ? 1 : 0
|
||||||
color: colors.inputBg
|
color: colors.inputText
|
||||||
}
|
selectionColor: colors.inputSelectionBg
|
||||||
|
selectedTextColor: colors.inputSelectionText
|
||||||
|
|
||||||
TextInput
|
echoMode: TextInput.Password
|
||||||
{
|
clip: true
|
||||||
id: loginField
|
selectByMouse: true
|
||||||
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
|
|
||||||
|
|
||||||
clip: true
|
font: fonts.input
|
||||||
selectByMouse: true
|
|
||||||
|
|
||||||
font: fonts.loginInput
|
Component.onCompleted: forceActiveFocus()
|
||||||
|
|
||||||
Component.onCompleted: if (manual) forceActiveFocus()
|
}
|
||||||
Keys.onTabPressed: passwordField.forceActiveFocus()
|
|
||||||
}
|
|
||||||
|
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
id: loginFieldPlaceholder
|
id: passwordFieldPlaceholder
|
||||||
x: loginField.x
|
x: passwordField.x
|
||||||
y: (loginFieldBg.height - height) / 2 + loginFieldBg.y
|
y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y
|
||||||
width: loginField.width
|
width: passwordField.width
|
||||||
opacity: hasLoginShown && manual ? 1 : 0
|
opacity: hasLoginShown ? 1 : 0
|
||||||
visible: loginField.text.length <= 0
|
visible: passwordField.text.length <= 0
|
||||||
|
|
||||||
color: colors.inputPlaceholderText
|
color: colors.inputPlaceholderText
|
||||||
|
|
||||||
font: fonts.placeholder
|
font: fonts.placeholder
|
||||||
|
|
||||||
text: localeText.userName
|
text: localeText.password
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: passwordFieldBg
|
id: progressBar
|
||||||
y: manual ? loginFieldBg.y + loginFieldBg.height + 2 : 0
|
y: passwordFieldBg.y + passwordFieldBg.height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: Math.max(fonts.input.pointSize, fonts.placeholder.pointSize) + 20
|
height: 2
|
||||||
opacity: hasLoginShown ? 1 : 0
|
opacity: hasLoginShown ? 1 : 0
|
||||||
color: colors.inputBg
|
color: colors.progressBar
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInput
|
Rectangle
|
||||||
{
|
{
|
||||||
id: passwordField
|
id: progressBarBg
|
||||||
x: 10
|
y: progressBar.y
|
||||||
y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y
|
width: parent.width
|
||||||
width: parent.width - 20
|
height: 2
|
||||||
opacity: hasLoginShown ? 1 : 0
|
opacity: 0
|
||||||
color: colors.inputText
|
color: colors.progressBarBg
|
||||||
selectionColor: colors.inputSelectionBg
|
}
|
||||||
selectedTextColor: colors.inputSelectionText
|
|
||||||
|
|
||||||
echoMode: TextInput.Password
|
Rectangle
|
||||||
clip: true
|
{
|
||||||
selectByMouse: true
|
id: progressBarSlider1
|
||||||
|
x: 0
|
||||||
|
y: progressBar.y
|
||||||
|
width: parent.width / 5
|
||||||
|
height: 2
|
||||||
|
opacity: 0
|
||||||
|
color: colors.progressBarSlider
|
||||||
|
}
|
||||||
|
|
||||||
font: fonts.input
|
Rectangle
|
||||||
|
{
|
||||||
|
id: progressBarSlider2
|
||||||
|
x: parent.width
|
||||||
|
y: progressBar.y
|
||||||
|
width: 0
|
||||||
|
height: 2
|
||||||
|
opacity: 0
|
||||||
|
color: colors.progressBarSlider
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: forceActiveFocus()
|
SlicedButton
|
||||||
Keys.onBacktabPressed: { if (manual) loginField.forceActiveFocus(); else event.accepted = false; }
|
{
|
||||||
|
id: buttonUserLogin
|
||||||
|
x: userListContainer.width - widthFull
|
||||||
|
y: progressBar.y + progressBar.height + 2
|
||||||
|
paddingTop: 2
|
||||||
|
highlighted: true
|
||||||
|
opacity: hasLoginShown ? 1 : 0
|
||||||
|
|
||||||
}
|
text: localeText.login
|
||||||
|
|
||||||
Text
|
onClicked: select_or_login()
|
||||||
{
|
|
||||||
id: passwordFieldPlaceholder
|
|
||||||
x: passwordField.x
|
|
||||||
y: (passwordFieldBg.height - height) / 2 + passwordFieldBg.y
|
|
||||||
width: passwordField.width
|
|
||||||
opacity: hasLoginShown ? 1 : 0
|
|
||||||
visible: passwordField.text.length <= 0
|
|
||||||
|
|
||||||
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
|
onClicked: back_to_selection()
|
||||||
{
|
|
||||||
id: progressBar
|
|
||||||
y: passwordFieldBg.y + passwordFieldBg.height
|
|
||||||
width: parent.width
|
|
||||||
height: 2
|
|
||||||
opacity: hasLoginShown ? 1 : 0
|
|
||||||
color: colors.progressBar
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
||||||
|
|
@ -480,9 +419,6 @@ 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 }
|
||||||
|
|
@ -507,9 +443,6 @@ 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 }
|
||||||
|
|
@ -605,7 +538,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: loginControls; property: "y"; to: pageRoot.height / 2.3 - (middleItem.height / 2 + progressBar.height + 2) / 2; 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: 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 }
|
||||||
|
|
@ -622,7 +555,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: loginControls; property: "y"; to: pageRoot.height / 2.3 - (middleItem.height / 2 + passwordFieldBg.height + progressBar.height + 2 + buttonUserLogin.height) / 2; 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: 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 }
|
||||||
|
|
@ -688,14 +621,10 @@ Item
|
||||||
loginEnterAnimation.start()
|
loginEnterAnimation.start()
|
||||||
if (debug.loginError)
|
if (debug.loginError)
|
||||||
loginTimeoutTimer.start()
|
loginTimeoutTimer.start()
|
||||||
else {
|
else
|
||||||
if (manual)
|
sddm.login(currentUserLogin, passwordField.text, selectedSessionIndex)
|
||||||
sddm.login(loginField.text, passwordField.text, selectedSessionIndex)
|
|
||||||
else
|
|
||||||
sddm.login(currentUserLogin, passwordField.text, selectedSessionIndex)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (!manual)
|
else
|
||||||
{
|
{
|
||||||
topFarItem.hoverEnabled = false
|
topFarItem.hoverEnabled = false
|
||||||
topMidItem.hoverEnabled = false
|
topMidItem.hoverEnabled = false
|
||||||
|
|
@ -708,7 +637,7 @@ Item
|
||||||
|
|
||||||
function back_to_selection()
|
function back_to_selection()
|
||||||
{
|
{
|
||||||
if (hasLoginShown && !manual)
|
if (hasLoginShown)
|
||||||
{
|
{
|
||||||
topFarItem.hoverEnabled = true
|
topFarItem.hoverEnabled = true
|
||||||
topMidItem.hoverEnabled = true
|
topMidItem.hoverEnabled = true
|
||||||
|
|
@ -728,30 +657,10 @@ Item
|
||||||
onTriggered: sddm.onLoginFailed()
|
onTriggered: sddm.onLoginFailed()
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onUpPressed: {
|
Keys.onUpPressed: scroll_down()
|
||||||
if (manual && hasLoginShown && passwordField.activeFocus) {
|
Keys.onDownPressed: scroll_up()
|
||||||
loginField.forceActiveFocus()
|
Keys.onEnterPressed: select_or_login()
|
||||||
} else
|
Keys.onReturnPressed: select_or_login()
|
||||||
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()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
import QtQuick 2.7
|
|
||||||
import QtQuick.VirtualKeyboard 2.1
|
|
||||||
|
|
||||||
InputPanel {
|
|
||||||
id: inputPanel
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
|
|
@ -2,12 +2,11 @@
|
||||||
Name=Slice
|
Name=Slice
|
||||||
Description=Simple SDDM theme.
|
Description=Simple SDDM theme.
|
||||||
Author=RadRussianRus
|
Author=RadRussianRus
|
||||||
Copyright=(c) 2020, RadRussianRus
|
Copyright=(c) 2018, RadRussianRus
|
||||||
License=CC-BY-SA
|
License=CC-BY-SA
|
||||||
Type=sddm-theme
|
Type=sddm-theme
|
||||||
Screenshot=screenshot.png
|
Website=https://github.com/RadRussianRus/slice-sddm
|
||||||
Website=https://github.com/RadRussianRus/sddm-slice
|
Version=1.0
|
||||||
Version=1.5.1
|
|
||||||
MainScript=Main.qml
|
MainScript=Main.qml
|
||||||
TranslationsDirectory=translations
|
TranslationsDirectory=translations
|
||||||
ConfigFile=theme.conf
|
ConfigFile=theme.conf
|
||||||
|
|
@ -7,4 +7,3 @@ color_bg=#222222
|
||||||
color_main=#dddddd
|
color_main=#dddddd
|
||||||
color_dimmed=#888888
|
color_dimmed=#888888
|
||||||
color_contrast=#1f1f1f
|
color_contrast=#1f1f1f
|
||||||
manual=false
|
|
||||||
Binary file not shown.
|
|
@ -1,26 +0,0 @@
|
||||||
<?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