Compare commits
5 Commits
490b329d64
...
master
Author | SHA1 | Date | |
---|---|---|---|
bbb4aa1d9e | |||
c776338883 | |||
25dc28e9e4 | |||
d89d86a70b | |||
05cc785b60 |
@@ -56,10 +56,24 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Background {
|
||||||
|
anchors.fill: parent
|
||||||
|
source: Qt.resolvedUrl(config.background)
|
||||||
|
fillMode: Image.PreserveAspectCrop
|
||||||
|
onStatusChanged: {
|
||||||
|
var defaultBackground = Qt.resolvedUrl(config.defaultBackground)
|
||||||
|
if (status == Image.Error && source != defaultBackground) {
|
||||||
|
source = defaultBackground
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Background
|
// Background
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "transparent"
|
color: "#00000000"
|
||||||
|
//color: "#e6000000"
|
||||||
|
// ^ This matches hyprlock but it looks kinda bad :<
|
||||||
//visible: primaryScreen
|
//visible: primaryScreen
|
||||||
|
|
||||||
// Within that bg, we have a login box with everything in it
|
// Within that bg, we have a login box with everything in it
|
||||||
@@ -102,7 +116,7 @@ Rectangle {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
text: textConstants.userName
|
text: textConstants.userName
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 14
|
||||||
}
|
}
|
||||||
|
|
||||||
SaltTextBox {
|
SaltTextBox {
|
||||||
@@ -110,7 +124,7 @@ Rectangle {
|
|||||||
width: parent.width; height: 50
|
width: parent.width; height: 50
|
||||||
text: userModel.lastUser
|
text: userModel.lastUser
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 14
|
||||||
radius: 8
|
radius: 8
|
||||||
textColor: "#ebdbb2"
|
textColor: "#ebdbb2"
|
||||||
borderWidth: 4
|
borderWidth: 4
|
||||||
@@ -140,14 +154,14 @@ Rectangle {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
text: textConstants.password
|
text: textConstants.password
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 14
|
||||||
}
|
}
|
||||||
|
|
||||||
SaltPasswordBox {
|
SaltPasswordBox {
|
||||||
id: password
|
id: password
|
||||||
width: parent.width; height: 50
|
width: parent.width; height: 50
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 14
|
||||||
radius: 8
|
radius: 8
|
||||||
textColor: "#ebdbb2"
|
textColor: "#ebdbb2"
|
||||||
borderWidth: 4
|
borderWidth: 4
|
||||||
@@ -179,14 +193,14 @@ Rectangle {
|
|||||||
text: textConstants.session
|
text: textConstants.session
|
||||||
wrapMode: TextEdit.WordWrap
|
wrapMode: TextEdit.WordWrap
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 14
|
||||||
}
|
}
|
||||||
|
|
||||||
SaltComboBox {
|
SaltComboBox {
|
||||||
id: session
|
id: session
|
||||||
width: parent.width; height: 50
|
width: parent.width; height: 50
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 14
|
||||||
radius: 8
|
radius: 8
|
||||||
textColor: "#ebdbb2"
|
textColor: "#ebdbb2"
|
||||||
borderColor: "#32302f"
|
borderColor: "#32302f"
|
||||||
@@ -211,7 +225,7 @@ Rectangle {
|
|||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: textConstants.prompt
|
text: textConstants.prompt
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 14
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,7 +244,7 @@ Rectangle {
|
|||||||
|
|
||||||
KeyNavigation.backtab: session; KeyNavigation.tab: shutdownButton
|
KeyNavigation.backtab: session; KeyNavigation.tab: shutdownButton
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 14
|
||||||
textColor: "#282828"
|
textColor: "#282828"
|
||||||
color: "#458588"
|
color: "#458588"
|
||||||
disabledColor: "#32302f"
|
disabledColor: "#32302f"
|
||||||
@@ -255,7 +269,7 @@ Rectangle {
|
|||||||
|
|
||||||
KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton
|
KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 14
|
||||||
textColor: "#ebdbb2"
|
textColor: "#ebdbb2"
|
||||||
color: "#32302f"
|
color: "#32302f"
|
||||||
disabledColor: "#32302f"
|
disabledColor: "#32302f"
|
||||||
@@ -273,7 +287,7 @@ Rectangle {
|
|||||||
|
|
||||||
KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name
|
KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 14
|
||||||
textColor: "#ebdbb2"
|
textColor: "#ebdbb2"
|
||||||
color: "#32302f"
|
color: "#32302f"
|
||||||
disabledColor: "#32302f"
|
disabledColor: "#32302f"
|
BIN
salt-gruvbox/background.jpg
Normal file
BIN
salt-gruvbox/background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 529 KiB |
162
salt-gruvbox/components/SaltPasswordBox.qml
Normal file
162
salt-gruvbox/components/SaltPasswordBox.qml
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (c) 2013 Nikita Mikhaylov <nslqqq@gmail.com>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person
|
||||||
|
* obtaining a copy of this software and associated documentation
|
||||||
|
* files (the "Software"), to deal in the Software without restriction,
|
||||||
|
* including without limitation the rights to use, copy, modify, merge,
|
||||||
|
* publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||||
|
* OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
import QtQuick 2.0
|
||||||
|
|
||||||
|
FocusScope {
|
||||||
|
id: container
|
||||||
|
width: 80; height: 30
|
||||||
|
|
||||||
|
property alias borderWidth: txtMain.borderWidth
|
||||||
|
property alias color: txtMain.color
|
||||||
|
property alias borderColor: txtMain.borderColor
|
||||||
|
property alias focusColor: txtMain.focusColor
|
||||||
|
property alias hoverColor: txtMain.hoverColor
|
||||||
|
property alias radius: txtMain.radius
|
||||||
|
property alias font: txtMain.font
|
||||||
|
property alias textColor: txtMain.textColor
|
||||||
|
property alias echoMode: txtMain.echoMode
|
||||||
|
property alias text: txtMain.text
|
||||||
|
|
||||||
|
property alias image: img.source
|
||||||
|
property double imageFadeIn: 300
|
||||||
|
property double imageFadeOut: 200
|
||||||
|
|
||||||
|
property alias tooltipEnabled: tooltip.visible
|
||||||
|
property alias tooltipText: tooltipText.text
|
||||||
|
property alias tooltipFG: tooltipText.color
|
||||||
|
property alias tooltipBG: tooltip.color
|
||||||
|
|
||||||
|
SaltTextBox {
|
||||||
|
id: txtMain
|
||||||
|
width: parent.width; height: parent.height
|
||||||
|
font.pixelSize: 14
|
||||||
|
|
||||||
|
echoMode: TextInput.Password
|
||||||
|
|
||||||
|
focus: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: img
|
||||||
|
opacity: 0
|
||||||
|
state: keyboard.capsLock ? "activated" : ""
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
|
||||||
|
smooth: true
|
||||||
|
height: parent.height * 0.8
|
||||||
|
|
||||||
|
source: "warning.png"
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: height
|
||||||
|
|
||||||
|
anchors.rightMargin: 0.3 * width
|
||||||
|
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "activated"
|
||||||
|
PropertyChanges { target: img; opacity: 1; }
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: ""
|
||||||
|
PropertyChanges { target: img; opacity: 0; }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
transitions: [
|
||||||
|
Transition {
|
||||||
|
to: "activated"
|
||||||
|
NumberAnimation { target: img; property: "opacity"; from: 0; to: 1; duration: imageFadeIn; }
|
||||||
|
},
|
||||||
|
|
||||||
|
Transition {
|
||||||
|
to: ""
|
||||||
|
NumberAnimation { target: img; property: "opacity"; from: 1; to: 0; duration: imageFadeOut; }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: hoverArea
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.ArrowCursor
|
||||||
|
|
||||||
|
onEntered: {
|
||||||
|
tooltip.x = mouseX + img.x + 10
|
||||||
|
tooltip.y = mouseY + 10
|
||||||
|
}
|
||||||
|
|
||||||
|
onPositionChanged: {
|
||||||
|
tooltip.x = mouseX + img.x + 10
|
||||||
|
tooltip.y = mouseY + 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: tooltip
|
||||||
|
color: "lightblue"
|
||||||
|
border.color: "black"
|
||||||
|
border.width: 1
|
||||||
|
|
||||||
|
width: 1.1 * tooltipText.implicitWidth
|
||||||
|
height: 1.4 * tooltipText.implicitHeight
|
||||||
|
radius: 2
|
||||||
|
opacity: 0
|
||||||
|
|
||||||
|
state: hoverArea.containsMouse && img.state == "activated" ? "activated" : ""
|
||||||
|
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "activated"
|
||||||
|
PropertyChanges { target: tooltip; opacity: 1 }
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: ""
|
||||||
|
PropertyChanges { target: tooltip; opacity: 0 }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
transitions: [
|
||||||
|
Transition {
|
||||||
|
to: "activated"
|
||||||
|
NumberAnimation { target: tooltip; property: "opacity"; from: 0; to: 1; duration: imageFadeIn; }
|
||||||
|
},
|
||||||
|
|
||||||
|
Transition {
|
||||||
|
to: ""
|
||||||
|
NumberAnimation { target: tooltip; property: "opacity"; from: 1; to: 0; duration: imageFadeOut; }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: tooltipText
|
||||||
|
anchors.centerIn: parent;
|
||||||
|
text: textConstants.capslockWarning
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
test.sh
2
test.sh
@@ -1,2 +1,2 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
sddm-greeter --test-mode --theme theme/
|
sddm-greeter --test-mode --theme salt-gruvbox/
|
||||||
|
@@ -1,162 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
* Copyright (c) 2013 Nikita Mikhaylov <nslqqq@gmail.com>
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person
|
|
||||||
* obtaining a copy of this software and associated documentation
|
|
||||||
* files (the "Software"), to deal in the Software without restriction,
|
|
||||||
* including without limitation the rights to use, copy, modify, merge,
|
|
||||||
* publish, distribute, sublicense, and/or sell copies of the Software,
|
|
||||||
* and to permit persons to whom the Software is furnished to do so,
|
|
||||||
* subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included
|
|
||||||
* in all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
|
||||||
* OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
import QtQuick 2.0
|
|
||||||
|
|
||||||
FocusScope {
|
|
||||||
id: container
|
|
||||||
width: 80; height: 30
|
|
||||||
|
|
||||||
property alias borderWidth: txtMain.borderWidth
|
|
||||||
property alias color: txtMain.color
|
|
||||||
property alias borderColor: txtMain.borderColor
|
|
||||||
property alias focusColor: txtMain.focusColor
|
|
||||||
property alias hoverColor: txtMain.hoverColor
|
|
||||||
property alias radius: txtMain.radius
|
|
||||||
property alias font: txtMain.font
|
|
||||||
property alias textColor: txtMain.textColor
|
|
||||||
property alias echoMode: txtMain.echoMode
|
|
||||||
property alias text: txtMain.text
|
|
||||||
|
|
||||||
property alias image: img.source
|
|
||||||
property double imageFadeIn: 300
|
|
||||||
property double imageFadeOut: 200
|
|
||||||
|
|
||||||
property alias tooltipEnabled: tooltip.visible
|
|
||||||
property alias tooltipText: tooltipText.text
|
|
||||||
property alias tooltipFG: tooltipText.color
|
|
||||||
property alias tooltipBG: tooltip.color
|
|
||||||
|
|
||||||
SaltTextBox {
|
|
||||||
id: txtMain
|
|
||||||
width: parent.width; height: parent.height
|
|
||||||
font.pixelSize: 14
|
|
||||||
|
|
||||||
echoMode: TextInput.Password
|
|
||||||
|
|
||||||
focus: true
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: img
|
|
||||||
opacity: 0
|
|
||||||
state: keyboard.capsLock ? "activated" : ""
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
|
|
||||||
smooth: true
|
|
||||||
height: parent.height * 0.8
|
|
||||||
|
|
||||||
source: "warning.png"
|
|
||||||
sourceSize.width: width
|
|
||||||
sourceSize.height: height
|
|
||||||
|
|
||||||
anchors.rightMargin: 0.3 * width
|
|
||||||
|
|
||||||
states: [
|
|
||||||
State {
|
|
||||||
name: "activated"
|
|
||||||
PropertyChanges { target: img; opacity: 1; }
|
|
||||||
},
|
|
||||||
State {
|
|
||||||
name: ""
|
|
||||||
PropertyChanges { target: img; opacity: 0; }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
transitions: [
|
|
||||||
Transition {
|
|
||||||
to: "activated"
|
|
||||||
NumberAnimation { target: img; property: "opacity"; from: 0; to: 1; duration: imageFadeIn; }
|
|
||||||
},
|
|
||||||
|
|
||||||
Transition {
|
|
||||||
to: ""
|
|
||||||
NumberAnimation { target: img; property: "opacity"; from: 1; to: 0; duration: imageFadeOut; }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: hoverArea
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
cursorShape: Qt.ArrowCursor
|
|
||||||
|
|
||||||
onEntered: {
|
|
||||||
tooltip.x = mouseX + img.x + 10
|
|
||||||
tooltip.y = mouseY + 10
|
|
||||||
}
|
|
||||||
|
|
||||||
onPositionChanged: {
|
|
||||||
tooltip.x = mouseX + img.x + 10
|
|
||||||
tooltip.y = mouseY + 10
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: tooltip
|
|
||||||
color: "lightblue"
|
|
||||||
border.color: "black"
|
|
||||||
border.width: 1
|
|
||||||
|
|
||||||
width: 1.1 * tooltipText.implicitWidth
|
|
||||||
height: 1.4 * tooltipText.implicitHeight
|
|
||||||
radius: 2
|
|
||||||
opacity: 0
|
|
||||||
|
|
||||||
state: hoverArea.containsMouse && img.state == "activated" ? "activated" : ""
|
|
||||||
|
|
||||||
states: [
|
|
||||||
State {
|
|
||||||
name: "activated"
|
|
||||||
PropertyChanges { target: tooltip; opacity: 1 }
|
|
||||||
},
|
|
||||||
State {
|
|
||||||
name: ""
|
|
||||||
PropertyChanges { target: tooltip; opacity: 0 }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
transitions: [
|
|
||||||
Transition {
|
|
||||||
to: "activated"
|
|
||||||
NumberAnimation { target: tooltip; property: "opacity"; from: 0; to: 1; duration: imageFadeIn; }
|
|
||||||
},
|
|
||||||
|
|
||||||
Transition {
|
|
||||||
to: ""
|
|
||||||
NumberAnimation { target: tooltip; property: "opacity"; from: 1; to: 0; duration: imageFadeOut; }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: tooltipText
|
|
||||||
anchors.centerIn: parent;
|
|
||||||
text: textConstants.capslockWarning
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user