Compare commits

...

5 Commits

Author SHA1 Message Date
bbb4aa1d9e Disable that visibility hint
Turns out it actually breaks shit
2025-01-12 14:30:24 -06:00
c776338883 Rename! 2025-01-12 04:46:45 -06:00
25dc28e9e4 Slightly bump font size 2025-01-12 04:40:31 -06:00
d89d86a70b Fixups, add bg 2025-01-12 04:38:56 -06:00
05cc785b60 Fix whitespace 2025-01-12 04:34:42 -06:00
12 changed files with 188 additions and 174 deletions

View File

@@ -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
Rectangle {
anchors.fill: parent
color: "transparent"
color: "#00000000"
//color: "#e6000000"
// ^ This matches hyprlock but it looks kinda bad :<
//visible: primaryScreen
// Within that bg, we have a login box with everything in it
@@ -102,7 +116,7 @@ Rectangle {
width: parent.width
text: textConstants.userName
font.family: "IBM Plex Sans"
font.pixelSize: 13
font.pixelSize: 14
}
SaltTextBox {
@@ -110,7 +124,7 @@ Rectangle {
width: parent.width; height: 50
text: userModel.lastUser
font.family: "IBM Plex Sans"
font.pixelSize: 13
font.pixelSize: 14
radius: 8
textColor: "#ebdbb2"
borderWidth: 4
@@ -140,14 +154,14 @@ Rectangle {
width: parent.width
text: textConstants.password
font.family: "IBM Plex Sans"
font.pixelSize: 13
font.pixelSize: 14
}
SaltPasswordBox {
id: password
width: parent.width; height: 50
font.family: "IBM Plex Sans"
font.pixelSize: 13
font.pixelSize: 14
radius: 8
textColor: "#ebdbb2"
borderWidth: 4
@@ -179,14 +193,14 @@ Rectangle {
text: textConstants.session
wrapMode: TextEdit.WordWrap
font.family: "IBM Plex Sans"
font.pixelSize: 13
font.pixelSize: 14
}
SaltComboBox {
id: session
width: parent.width; height: 50
font.family: "IBM Plex Sans"
font.pixelSize: 13
font.pixelSize: 14
radius: 8
textColor: "#ebdbb2"
borderColor: "#32302f"
@@ -211,7 +225,7 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
text: textConstants.prompt
font.family: "IBM Plex Sans"
font.pixelSize: 13
font.pixelSize: 14
}
}
@@ -230,7 +244,7 @@ Rectangle {
KeyNavigation.backtab: session; KeyNavigation.tab: shutdownButton
font.family: "IBM Plex Sans"
font.pixelSize: 13
font.pixelSize: 14
textColor: "#282828"
color: "#458588"
disabledColor: "#32302f"
@@ -255,7 +269,7 @@ Rectangle {
KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton
font.family: "IBM Plex Sans"
font.pixelSize: 13
font.pixelSize: 14
textColor: "#ebdbb2"
color: "#32302f"
disabledColor: "#32302f"
@@ -273,7 +287,7 @@ Rectangle {
KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name
font.family: "IBM Plex Sans"
font.pixelSize: 13
font.pixelSize: 14
textColor: "#ebdbb2"
color: "#32302f"
disabledColor: "#32302f"

BIN
salt-gruvbox/background.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 KiB

View 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
}
}
}

View File

@@ -1,2 +1,2 @@
#! /bin/sh
sddm-greeter --test-mode --theme theme/
sddm-greeter --test-mode --theme salt-gruvbox/

View File

@@ -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
}
}
}