Skip to content

Commit

Permalink
First working version
Browse files Browse the repository at this point in the history
  • Loading branch information
EricKotato committed Feb 22, 2018
0 parents commit d99a388
Show file tree
Hide file tree
Showing 21 changed files with 2,343 additions and 0 deletions.
427 changes: 427 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Slice (SDDM Theme)

Simple dark SDDM theme.

## Installing

1. Install QML modules:
* Qt Graphical Effects
* Qt Quick Controls
2. Install Roboto font
3. `git clone https://github.com/RadRussianRus/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

## License

[![CC-BY-SA](https://i.creativecommons.org/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/)
74 changes: 74 additions & 0 deletions slice/LoopListPowerItem.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0

Item
{
id: itemRoot
opacity: distance
property int duration: 100

signal clicked()
signal entered()

transform: Scale
{
origin.x: 54
origin.y: 29
xScale: distance
yScale: distance
}

Behavior on distance
{
PropertyAnimation { duration: itemRoot.duration }
}

property real distance: 1.0
property string icon: "icons/no_avatar.svg"
property string title: ""

Image
{
id: powerItemIcon
source: icon
sourceSize.width: 48
sourceSize.height: 48
}

ColorOverlay
{
id: powerItemIconOverlay
anchors.fill: powerItemIcon
source: powerItemIcon
color: "#dddddd"
}

Label
{
id: descriptionLabel
text: itemRoot.title
color: "#fff"

font
{
family: "Roboto"
pointSize: 28
bold: true
}

x: 54
y: 5
}

MouseArea
{
width: descriptionLabel.x + descriptionLabel.width
height: 48
hoverEnabled: true

onClicked: itemRoot.clicked()
onEntered: itemRoot.entered()
}
}
32 changes: 32 additions & 0 deletions slice/LoopListSessionItem.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0

Item
{
id: itemRoot
opacity: distance
scale: distance

property real distance: 1.0
property string sessionName: ""

Label
{
id: sessionNameLabel
anchors.centerIn: parent
text: sessionName
color: "#fff"

font
{
family: "Roboto"
pointSize: 28
bold: true
}

x: parent.x
y: 0
}
}
68 changes: 68 additions & 0 deletions slice/LoopListUserItem.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import QtQuick 2.7
import QtGraphicalEffects 1.0
import SddmComponents 2.0
import QtQuick.Controls 2.0

Item
{
id: itemRoot
opacity: distance

transform: Scale
{
origin.x: 80
xScale: distance
yScale: distance
}

property real distance: 1.0
property string userName: ""
property string userLogin: ""
property string userAvatar: "icons/no_avatar.svg"

Image
{
id: profilePicture
source: userAvatar
sourceSize.width: 64
sourceSize.height: 64
}

ColorOverlay
{
id: profilePictureOverlay
anchors.fill: profilePicture
source: profilePicture
color: "#dddddd"
}

Label
{
text: userName
color: "#fff"

font
{
family: "Roboto"
pointSize: 28
bold: true
}

x: 80
y: 0
}

Label
{
text: userLogin
color: "#fff"
y: userName == "" ? 5 : 36
font
{
family: "Roboto"
pointSize: userName == "" ? 36 : 20
bold: userName == ""
}
x: 80
}
}
Loading

0 comments on commit d99a388

Please sign in to comment.