Move LockScreen, change sizing
This commit is contained in:
parent
71433c7807
commit
8d6d57fae2
3 changed files with 38 additions and 33 deletions
|
|
@ -21,6 +21,8 @@ WlSessionLock {
|
||||||
|
|
||||||
function unlockAttempt() {
|
function unlockAttempt() {
|
||||||
console.log("Unlock attempt started");
|
console.log("Unlock attempt started");
|
||||||
|
|
||||||
|
// Real PAM authentication
|
||||||
if (!pamAvailable) {
|
if (!pamAvailable) {
|
||||||
lock.errorMessage = "PAM authentication not available.";
|
lock.errorMessage = "PAM authentication not available.";
|
||||||
console.log("PAM not available");
|
console.log("PAM not available");
|
||||||
|
|
@ -156,8 +158,9 @@ WlSessionLock {
|
||||||
id: timeText
|
id: timeText
|
||||||
text: Qt.formatDateTime(new Date(), "HH:mm")
|
text: Qt.formatDateTime(new Date(), "HH:mm")
|
||||||
font.family: "Inter"
|
font.family: "Inter"
|
||||||
font.pixelSize: 140 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeXXL * 6
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
|
font.letterSpacing: -2
|
||||||
color: Colors.textPrimary
|
color: Colors.textPrimary
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
|
|
@ -172,7 +175,7 @@ WlSessionLock {
|
||||||
id: dateText
|
id: dateText
|
||||||
text: Qt.formatDateTime(new Date(), "dddd, MMMM d")
|
text: Qt.formatDateTime(new Date(), "dddd, MMMM d")
|
||||||
font.family: "Inter"
|
font.family: "Inter"
|
||||||
font.pixelSize: 26 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeXL
|
||||||
font.weight: Font.Light
|
font.weight: Font.Light
|
||||||
color: Colors.textSecondary
|
color: Colors.textSecondary
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
@ -241,8 +244,8 @@ WlSessionLock {
|
||||||
|
|
||||||
// Centered terminal section
|
// Centered terminal section
|
||||||
Item {
|
Item {
|
||||||
width: 520 * Scaling.scale(screen)
|
width: 720 * Scaling.scale(screen)
|
||||||
height: 200 * Scaling.scale(screen)
|
height: 280 * Scaling.scale(screen)
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
@ -255,7 +258,7 @@ WlSessionLock {
|
||||||
// Futuristic Terminal-Style Input
|
// Futuristic Terminal-Style Input
|
||||||
Item {
|
Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 200 * Scaling.scale(screen)
|
height: 280 * Scaling.scale(screen)
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
// Terminal background with scanlines
|
// Terminal background with scanlines
|
||||||
|
|
@ -319,8 +322,8 @@ WlSessionLock {
|
||||||
Text {
|
Text {
|
||||||
text: "SECURE TERMINAL"
|
text: "SECURE TERMINAL"
|
||||||
color: Colors.textPrimary
|
color: Colors.textPrimary
|
||||||
font.family: "Monaco"
|
font.family: "DejaVu Sans Mono"
|
||||||
font.pixelSize: 14 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeLarge
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
@ -333,7 +336,7 @@ WlSessionLock {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.topMargin: 50 * Scaling.scale(screen)
|
anchors.topMargin: 70 * Scaling.scale(screen)
|
||||||
anchors.margins: 12 * Scaling.scale(screen)
|
anchors.margins: 12 * Scaling.scale(screen)
|
||||||
spacing: 12 * Scaling.scale(screen)
|
spacing: 12 * Scaling.scale(screen)
|
||||||
|
|
||||||
|
|
@ -345,8 +348,8 @@ WlSessionLock {
|
||||||
Text {
|
Text {
|
||||||
text: "root@noctalia:~$"
|
text: "root@noctalia:~$"
|
||||||
color: Colors.accentPrimary
|
color: Colors.accentPrimary
|
||||||
font.family: "Monaco"
|
font.family: "DejaVu Sans Mono"
|
||||||
font.pixelSize: 16 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeLarge
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -354,10 +357,10 @@ WlSessionLock {
|
||||||
id: welcomeText
|
id: welcomeText
|
||||||
text: ""
|
text: ""
|
||||||
color: Colors.textPrimary
|
color: Colors.textPrimary
|
||||||
font.family: "Monaco"
|
font.family: "DejaVu Sans Mono"
|
||||||
font.pixelSize: 16 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeLarge
|
||||||
property int currentIndex: 0
|
property int currentIndex: 0
|
||||||
property string fullText: "echo 'Welcome back, " + Quickshell.env("USER") + "!'"
|
property string fullText: "Welcome back, " + Quickshell.env("USER") + "!"
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
interval: 100
|
interval: 100
|
||||||
|
|
@ -383,16 +386,16 @@ WlSessionLock {
|
||||||
Text {
|
Text {
|
||||||
text: "root@noctalia:~$"
|
text: "root@noctalia:~$"
|
||||||
color: Colors.accentPrimary
|
color: Colors.accentPrimary
|
||||||
font.family: "Monaco"
|
font.family: "DejaVu Sans Mono"
|
||||||
font.pixelSize: 16 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeLarge
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "sudo unlock_session"
|
text: "sudo unlock_session"
|
||||||
color: Colors.textPrimary
|
color: Colors.textPrimary
|
||||||
font.family: "Monaco"
|
font.family: "DejaVu Sans Mono"
|
||||||
font.pixelSize: 16 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeLarge
|
||||||
}
|
}
|
||||||
|
|
||||||
// Integrated password input (invisible, just for functionality)
|
// Integrated password input (invisible, just for functionality)
|
||||||
|
|
@ -401,8 +404,8 @@ WlSessionLock {
|
||||||
width: 0
|
width: 0
|
||||||
height: 0
|
height: 0
|
||||||
visible: false
|
visible: false
|
||||||
font.family: "Monaco"
|
font.family: "DejaVu Sans Mono"
|
||||||
font.pixelSize: 16 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeLarge
|
||||||
color: Colors.textPrimary
|
color: Colors.textPrimary
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
passwordCharacter: "*"
|
passwordCharacter: "*"
|
||||||
|
|
@ -431,8 +434,8 @@ WlSessionLock {
|
||||||
id: asterisksText
|
id: asterisksText
|
||||||
text: "*".repeat(passwordInput.text.length)
|
text: "*".repeat(passwordInput.text.length)
|
||||||
color: Colors.textPrimary
|
color: Colors.textPrimary
|
||||||
font.family: "Monaco"
|
font.family: "DejaVu Sans Mono"
|
||||||
font.pixelSize: 16 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeLarge
|
||||||
visible: passwordInput.activeFocus
|
visible: passwordInput.activeFocus
|
||||||
|
|
||||||
// Typing effect animation
|
// Typing effect animation
|
||||||
|
|
@ -475,8 +478,8 @@ WlSessionLock {
|
||||||
Text {
|
Text {
|
||||||
text: lock.authenticating ? "Authenticating..." : (lock.errorMessage !== "" ? "Authentication failed." : "")
|
text: lock.authenticating ? "Authenticating..." : (lock.errorMessage !== "" ? "Authentication failed." : "")
|
||||||
color: lock.authenticating ? Colors.accentPrimary : (lock.errorMessage !== "" ? Colors.error : "transparent")
|
color: lock.authenticating ? Colors.accentPrimary : (lock.errorMessage !== "" ? Colors.error : "transparent")
|
||||||
font.family: "Monaco"
|
font.family: "DejaVu Sans Mono"
|
||||||
font.pixelSize: 14 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeLarge
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
SequentialAnimation on opacity {
|
SequentialAnimation on opacity {
|
||||||
|
|
@ -502,8 +505,8 @@ WlSessionLock {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: lock.authenticating ? "EXECUTING..." : "EXECUTE"
|
text: lock.authenticating ? "EXECUTING..." : "EXECUTE"
|
||||||
color: executeButtonArea.containsMouse ? Colors.onAccent : Colors.accentPrimary
|
color: executeButtonArea.containsMouse ? Colors.onAccent : Colors.accentPrimary
|
||||||
font.family: "Monaco"
|
font.family: "DejaVu Sans Mono"
|
||||||
font.pixelSize: 12 * Scaling.scale(screen)
|
font.pointSize: Style.fontSizeMedium
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -608,6 +611,8 @@ WlSessionLock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Enhanced power buttons with hover effects
|
// Enhanced power buttons with hover effects
|
||||||
Row {
|
Row {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
@ -6,7 +6,7 @@ import Quickshell.Io
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import qs.Services
|
import qs.Services
|
||||||
import qs.Widgets
|
import qs.Widgets
|
||||||
import qs.Modules.Lockscreen
|
import qs.Modules.LockScreen
|
||||||
|
|
||||||
NPanel {
|
NPanel {
|
||||||
id: powerMenu
|
id: powerMenu
|
||||||
|
|
@ -421,8 +421,8 @@ NPanel {
|
||||||
running: false
|
running: false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lockscreen instance
|
// LockScreen instance
|
||||||
Lockscreen {
|
LockScreen {
|
||||||
id: lockScreen
|
id: lockScreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.Modules.Lockscreen
|
import qs.Modules.LockScreen
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -49,8 +49,8 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lockscreen instance
|
// LockScreen instance
|
||||||
Lockscreen {
|
LockScreen {
|
||||||
id: lockScreen
|
id: lockScreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue