Skip to content

Commit

Permalink
Removed unnecessary dependencies and added 2 new configuration options
Browse files Browse the repository at this point in the history
  • Loading branch information
EricKotato committed May 30, 2018
1 parent f4ff7ef commit 5660876
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 35 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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

Expand Down
3 changes: 1 addition & 2 deletions slice/LoopListPowerItem.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0

Item
{
Expand Down Expand Up @@ -45,7 +44,7 @@ Item
color: config.color_text
}

Label
Text
{
id: descriptionLabel
text: itemRoot.title
Expand Down
3 changes: 1 addition & 2 deletions slice/LoopListSessionItem.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0

Item
{
Expand All @@ -12,7 +11,7 @@ Item
property real distance: 1.0
property string sessionName: ""

Label
Text
{
id: sessionNameLabel
anchors.centerIn: parent
Expand Down
5 changes: 2 additions & 3 deletions slice/LoopListUserItem.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0

Item
{
Expand All @@ -28,7 +27,7 @@ Item
sourceSize.height: 64
}

Label
Text
{
text: userName
color: config.color_text
Expand All @@ -44,7 +43,7 @@ Item
y: 0
}

Label
Text
{
text: userLogin
color: config.color_text
Expand Down
2 changes: 0 additions & 2 deletions slice/Main.qml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 1.4


Rectangle
{
Expand Down
1 change: 0 additions & 1 deletion slice/PagePower.qml
Original file line number Diff line number Diff line change
@@ -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


Expand Down
4 changes: 0 additions & 4 deletions slice/PageSessions.qml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0


Item
{
Expand Down
43 changes: 29 additions & 14 deletions slice/PageUsers.qml
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down Expand Up @@ -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
{
Expand All @@ -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
Expand Down Expand Up @@ -304,7 +317,7 @@ Item
onClicked: back_to_selection()
}

Label
Text
{
id: errorMessage
text: localeText.loginFailed
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }
Expand Down
4 changes: 1 addition & 3 deletions slice/SlicedButton.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import QtQuick 2.7
import QtQuick.Controls 1.4


Item
{
Expand Down Expand Up @@ -191,7 +189,7 @@ Item
}


Label
Text
{
id: buttonText
x: paddingLeft
Expand Down
4 changes: 3 additions & 1 deletion slice/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ color_button_bg_selected=#dddddd
color_button_bg_selected_hover=#cccccc
color_button_text=#1f1f1f
color_text=#dddddd
color_placeholder_text=#888888
color_placeholder_text=#888888
color_selection_bg=#555555
color_selection_text=#dddddd

0 comments on commit 5660876

Please sign in to comment.