-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michal-Szczepaniak
committed
Apr 30, 2018
0 parents
commit 711cb22
Showing
6 changed files
with
176 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
Version 2, December 2004 | ||
|
||
Copyright (C) 2004 Sam Hocevar <[email protected]> | ||
|
||
Everyone is permitted to copy and distribute verbatim or modified | ||
copies of this license document, and changing it is allowed as long | ||
as the name is changed. | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
|
||
0. You just DO WHAT THE FUCK YOU WANT TO. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
// Copyright © 2018 Michał Szczepaniak <[email protected]> | ||
// This work is free. You can redistribute it and/or modify it under the | ||
// terms of the Do What The Fuck You Want To Public License, Version 2, | ||
// as published by Sam Hocevar. See the COPYING file for more details. | ||
|
||
import QtQuick 2.0 | ||
import SddmComponents 2.0 | ||
|
||
Rectangle { | ||
id : amadeus_root | ||
|
||
property var scalingX: 1920/bg.paintedWidth | ||
property var scalingY: 1080/bg.paintedHeight | ||
property var diffX: (amadeus_root.width - bg.paintedWidth)/2 | ||
property var diffY: (amadeus_root.height - bg.paintedHeight)/2 | ||
|
||
signal tryLogin() | ||
|
||
onTryLogin : { | ||
sddm.login(amadeus_username.text, amadeus_password.text, sessionModel.lastIndex); | ||
} | ||
|
||
FontLoader { | ||
id: opensans_cond_light | ||
source: "fonts/OpenSans_CondLight.ttf" | ||
} | ||
|
||
TextConstants { id: textConstants } | ||
|
||
Connections { | ||
target: sddm | ||
|
||
onLoginSucceeded: { | ||
} | ||
|
||
onLoginFailed: { | ||
} | ||
} | ||
|
||
Repeater { | ||
model: screenModel | ||
|
||
Item { | ||
Rectangle { | ||
x : geometry.x | ||
y : geometry.y | ||
width : geometry.width | ||
height : geometry.height | ||
color : "black" | ||
} | ||
} | ||
} | ||
|
||
Image { | ||
id: bg | ||
anchors.fill: parent | ||
source: "amadeus-background.png" | ||
fillMode: Image.PreserveAspectFit | ||
|
||
clip: true | ||
focus: true | ||
smooth: true | ||
} | ||
|
||
TextBox { | ||
id: amadeus_username | ||
|
||
x: 677/amadeus_root.scalingX + diffX | ||
y: 630/amadeus_root.scalingY + diffY | ||
|
||
width: 571/amadeus_root.scalingX | ||
height: 46/amadeus_root.scalingY | ||
|
||
color: "black" | ||
borderColor: "black" | ||
focusColor: "#000" | ||
hoverColor: "#000" | ||
textColor: "#f7d65d" | ||
|
||
font.family: opensans_cond_light.name | ||
font.pixelSize: 20 | ||
|
||
KeyNavigation.tab: amadeus_password | ||
} | ||
|
||
PasswordBox { | ||
id: amadeus_password | ||
|
||
x: 677/amadeus_root.scalingX + diffX | ||
y: 698/amadeus_root.scalingY + diffY | ||
|
||
width: 571/amadeus_root.scalingX | ||
height: 46/amadeus_root.scalingY | ||
|
||
color: "black" | ||
borderColor: "black" | ||
focusColor: "#000" | ||
hoverColor: "#000" | ||
textColor: "#f7d65d" | ||
|
||
font.family: opensans_cond_light.name | ||
font.pixelSize: 20 | ||
|
||
KeyNavigation.tab: amadeus_login | ||
KeyNavigation.backtab: amadeus_username | ||
|
||
Keys.onPressed: { | ||
if ((event.key === Qt.Key_Return) || (event.key === Qt.Key_Enter)) { | ||
amadeus_root.tryLogin() | ||
|
||
event.accepted = true; | ||
} | ||
} | ||
} | ||
|
||
MouseArea { | ||
id: amadeus_login | ||
|
||
x : 1254/amadeus_root.scalingX + diffX | ||
y : 695/amadeus_root.scalingY + diffY | ||
width : 50/amadeus_root.scalingX | ||
height : 50/amadeus_root.scalingY | ||
|
||
cursorShape: Qt.PointingHandCursor | ||
|
||
hoverEnabled: true | ||
enabled: true | ||
|
||
acceptedButtons: Qt.LeftButton | ||
|
||
onClicked: { amadeus_root.tryLogin() } | ||
} | ||
|
||
Component.onCompleted: { | ||
if (amadeus_username.text === "") | ||
amadeus_username.focus = true | ||
else | ||
amadeus_password.focus = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Amadeus Theme for SDDM | ||
|
||
INSTALL: | ||
Copy this folder to /usr/share/sddm/themes/ or to similar path with SDDM themes and apply. | ||
|
||
LICENSE: | ||
Read COPYING | ||
|
||
Open Sans Condensed font downloaded from Font Squirrel is available under the Apache License version 2.0. | ||
(https://www.fontsquirrel.com/license/open-sans-condensed) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[SddmGreeterTheme] | ||
Name=amadeus | ||
Description=Amadeus styled theme | ||
Author=Michał Szczepaniak | ||
Copyright=(c) 2018, Michał Szczepaniak | ||
License=WTFPL | ||
Type=sddm-theme | ||
Version=0.1 | ||
Website=https://github.com/Michal-Szczepaniak | ||
Screenshot=amadeus-background.png | ||
MainScript=Main.qml | ||
Theme-Id=amadeus | ||
Theme-API=2.0 |