Removed unnecessary dependencies and added 2 new configuration options

This commit is contained in:
Eric Kotato 2018-05-31 00:08:41 +03:00
parent f4ff7ef802
commit 56608764af
10 changed files with 40 additions and 35 deletions

View file

@ -6,9 +6,7 @@ Simple dark SDDM theme.
## Installing
1. Install QML modules:
* Qt Graphical Effects
* Qt Quick Controls
1. Install `Qt Graphical Effects` QML module
2. Install Roboto font (optional, you can change to other font, see below)
3. `git clone https://github.com/RadRussianRus/sddm-slice.git`
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_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_selection_bg` - selected text background color. Defaults to `#555555`.
* `color_selection_text` - selected text color. Defaults to `#dddddd`.
## License

View file

@ -1,7 +1,6 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0
Item
{
@ -45,7 +44,7 @@ Item
color: config.color_text
}
Label
Text
{
id: descriptionLabel
text: itemRoot.title

View file

@ -1,7 +1,6 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0
Item
{
@ -12,7 +11,7 @@ Item
property real distance: 1.0
property string sessionName: ""
Label
Text
{
id: sessionNameLabel
anchors.centerIn: parent

View file

@ -1,7 +1,6 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0
Item
{
@ -28,7 +27,7 @@ Item
sourceSize.height: 64
}
Label
Text
{
text: userName
color: config.color_text
@ -44,7 +43,7 @@ Item
y: 0
}
Label
Text
{
text: userLogin
color: config.color_text

View file

@ -1,8 +1,6 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 1.4
Rectangle
{

View file

@ -1,7 +1,6 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3

View file

@ -1,8 +1,4 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0
Item
{

View file

@ -1,8 +1,4 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
Item
{
@ -217,22 +213,19 @@ Item
userAvatar: get_avatar(3)
}
TextField
TextInput
{
id: passwordField
y: hasLoginShown ? pageRoot.height / 2.3 + 35 : pageRoot.height / 2.3 + 60
width: parent.width
height: 25
opacity: hasLoginShown ? 1 : 0
color: config.color_text
selectionColor: config.color_selection_bg
selectedTextColor: config.color_selection_text
placeholderText: localeText.password
echoMode: TextInput.Password
style: TextFieldStyle
{
textColor: config.color_text
placeholderTextColor: config.color_placeholder_text
background: Item { height: 25 }
}
clip: true
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
{
id: progressBar
@ -304,7 +317,7 @@ Item
onClicked: back_to_selection()
}
Label
Text
{
id: errorMessage
text: localeText.loginFailed
@ -373,6 +386,7 @@ Item
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: passwordFieldPlaceholder; 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: 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: 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: buttonUserBack; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }
NumberAnimation { target: buttonUserLogin; property: "opacity"; to: 0; duration: userListContainer.scrollDuration }

View file

@ -1,6 +1,4 @@
import QtQuick 2.7
import QtQuick.Controls 1.4
Item
{
@ -191,7 +189,7 @@ Item
}
Label
Text
{
id: buttonText
x: paddingLeft

View file

@ -8,3 +8,5 @@ color_button_bg_selected_hover=#cccccc
color_button_text=#1f1f1f
color_text=#dddddd
color_placeholder_text=#888888
color_selection_bg=#555555
color_selection_text=#dddddd