Removed unnecessary dependencies and added 2 new configuration options
This commit is contained in:
parent
f4ff7ef802
commit
56608764af
10 changed files with 40 additions and 35 deletions
|
|
@ -6,9 +6,7 @@ Simple dark SDDM theme.
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
1. Install QML modules:
|
1. Install `Qt Graphical Effects` QML module
|
||||||
* Qt Graphical Effects
|
|
||||||
* Qt Quick Controls
|
|
||||||
2. Install Roboto font (optional, you can change to other font, see below)
|
2. Install Roboto font (optional, you can change to other font, see below)
|
||||||
3. `git clone https://github.com/RadRussianRus/sddm-slice.git`
|
3. `git clone https://github.com/RadRussianRus/sddm-slice.git`
|
||||||
4. `cp -r sddm-slice/slice /usr/share/sddm/themes/slice`
|
4. `cp -r sddm-slice/slice /usr/share/sddm/themes/slice`
|
||||||
|
|
@ -29,6 +27,8 @@ Create file `theme.conf.user` in theme folder. See `slice/theme.conf` for refere
|
||||||
* `color_button_text` - button text color (in any state). Defaults to `#1f1f1f`.
|
* `color_button_text` - button text color (in any state). Defaults to `#1f1f1f`.
|
||||||
* `color_text` - main text and foreground elements color (such as progress bar and power icons). Defaults to `#dddddd`.
|
* `color_text` - main text and foreground elements color (such as progress bar and power icons). Defaults to `#dddddd`.
|
||||||
* `color_placeholder_text` - placeholder text color (in password field). Defaults to `#888888`.
|
* `color_placeholder_text` - placeholder text color (in password field). Defaults to `#888888`.
|
||||||
|
* `color_selection_bg` - selected text background color. Defaults to `#555555`.
|
||||||
|
* `color_selection_text` - selected text color. Defaults to `#dddddd`.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import SddmComponents 2.0
|
import SddmComponents 2.0
|
||||||
import QtQuick.Controls 2.0
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
|
@ -45,7 +44,7 @@ Item
|
||||||
color: config.color_text
|
color: config.color_text
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Text
|
||||||
{
|
{
|
||||||
id: descriptionLabel
|
id: descriptionLabel
|
||||||
text: itemRoot.title
|
text: itemRoot.title
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import SddmComponents 2.0
|
import SddmComponents 2.0
|
||||||
import QtQuick.Controls 2.0
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
|
@ -12,7 +11,7 @@ Item
|
||||||
property real distance: 1.0
|
property real distance: 1.0
|
||||||
property string sessionName: ""
|
property string sessionName: ""
|
||||||
|
|
||||||
Label
|
Text
|
||||||
{
|
{
|
||||||
id: sessionNameLabel
|
id: sessionNameLabel
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import SddmComponents 2.0
|
import SddmComponents 2.0
|
||||||
import QtQuick.Controls 2.0
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
|
@ -28,7 +27,7 @@ Item
|
||||||
sourceSize.height: 64
|
sourceSize.height: 64
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Text
|
||||||
{
|
{
|
||||||
text: userName
|
text: userName
|
||||||
color: config.color_text
|
color: config.color_text
|
||||||
|
|
@ -44,7 +43,7 @@ Item
|
||||||
y: 0
|
y: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Text
|
||||||
{
|
{
|
||||||
text: userLogin
|
text: userLogin
|
||||||
color: config.color_text
|
color: config.color_text
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import SddmComponents 2.0
|
import SddmComponents 2.0
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import SddmComponents 2.0
|
import SddmComponents 2.0
|
||||||
import QtQuick.Controls 2.0
|
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
import SddmComponents 2.0
|
|
||||||
import QtQuick.Controls 2.0
|
|
||||||
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
import SddmComponents 2.0
|
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
|
@ -217,22 +213,19 @@ Item
|
||||||
userAvatar: get_avatar(3)
|
userAvatar: get_avatar(3)
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField
|
TextInput
|
||||||
{
|
{
|
||||||
id: passwordField
|
id: passwordField
|
||||||
y: hasLoginShown ? pageRoot.height / 2.3 + 35 : pageRoot.height / 2.3 + 60
|
y: hasLoginShown ? pageRoot.height / 2.3 + 35 : pageRoot.height / 2.3 + 60
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
height: 25
|
||||||
opacity: hasLoginShown ? 1 : 0
|
opacity: hasLoginShown ? 1 : 0
|
||||||
|
color: config.color_text
|
||||||
|
selectionColor: config.color_selection_bg
|
||||||
|
selectedTextColor: config.color_selection_text
|
||||||
|
|
||||||
placeholderText: localeText.password
|
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
|
clip: true
|
||||||
style: TextFieldStyle
|
|
||||||
{
|
|
||||||
textColor: config.color_text
|
|
||||||
placeholderTextColor: config.color_placeholder_text
|
|
||||||
background: Item { height: 25 }
|
|
||||||
}
|
|
||||||
|
|
||||||
font
|
font
|
||||||
{
|
{
|
||||||
|
|
@ -245,6 +238,26 @@ Item
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
id: passwordFieldPlaceholder
|
||||||
|
x: passwordField.x
|
||||||
|
y: passwordField.y
|
||||||
|
width: passwordField.width
|
||||||
|
opacity: passwordField.text.length > 0 || !hasLoginShown ? 0 : 1
|
||||||
|
|
||||||
|
color: config.color_placeholder_text
|
||||||
|
|
||||||
|
font
|
||||||
|
{
|
||||||
|
family: config.font
|
||||||
|
bold: true
|
||||||
|
pointSize: 18
|
||||||
|
}
|
||||||
|
|
||||||
|
text: localeText.password
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: progressBar
|
id: progressBar
|
||||||
|
|
@ -304,7 +317,7 @@ Item
|
||||||
onClicked: back_to_selection()
|
onClicked: back_to_selection()
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Text
|
||||||
{
|
{
|
||||||
id: errorMessage
|
id: errorMessage
|
||||||
text: localeText.loginFailed
|
text: localeText.loginFailed
|
||||||
|
|
@ -373,6 +386,7 @@ Item
|
||||||
NumberAnimation { target: middleItem; property: "y"; to: pageRoot.height / 2.3 - 40; duration: userListContainer.scrollDuration }
|
NumberAnimation { target: middleItem; property: "y"; to: pageRoot.height / 2.3 - 40; 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: progressBar; property: "opacity"; to: 1; duration: userListContainer.scrollDuration }
|
NumberAnimation { target: progressBar; 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 }
|
||||||
|
|
@ -400,6 +414,7 @@ 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: 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: progressBar; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
|
NumberAnimation { target: progressBar; 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 }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
|
@ -191,7 +189,7 @@ Item
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Label
|
Text
|
||||||
{
|
{
|
||||||
id: buttonText
|
id: buttonText
|
||||||
x: paddingLeft
|
x: paddingLeft
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,5 @@ color_button_bg_selected_hover=#cccccc
|
||||||
color_button_text=#1f1f1f
|
color_button_text=#1f1f1f
|
||||||
color_text=#dddddd
|
color_text=#dddddd
|
||||||
color_placeholder_text=#888888
|
color_placeholder_text=#888888
|
||||||
|
color_selection_bg=#555555
|
||||||
|
color_selection_text=#dddddd
|
||||||
Loading…
Add table
Reference in a new issue