UI Overhaul to Match Original

Near pixel-perfect accuracy
This commit is contained in:
AerospaceDoe 2025-05-17 18:13:03 +02:00
parent 9d9f9bcf8c
commit b4ffb1e258
5 changed files with 68 additions and 46 deletions

Binary file not shown.

View File

@ -8,7 +8,7 @@
*
* Based on QTStep SDDM theme by:
* Copyright (c) 2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci@gmail.com
* Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci@gmail.com>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@ -43,7 +43,7 @@ Rectangle {
width: 1024
height: 768
color: "#008080"
color: "#55aaaa"
// Use this to control all font sizes (also affects icons and overall size of the greeter)
property double scalingFactor: 1
@ -91,8 +91,8 @@ Rectangle {
//visible: primaryScreen
Rectangle {
// Here we make another rectangle which is the logon 'window'
height: 175
width: 640
height: 144
width: 461
id: "greeter"
anchors.centerIn: parent
@ -113,14 +113,14 @@ Rectangle {
Rectangle {
Layout.row: 0
id: header
color: "#000080"
color: "#0000aa"
Layout.leftMargin: 3
Layout.rightMargin: 3
Layout.rightMargin: 5
Layout.topMargin: 3
Layout.bottomMargin: 3
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
Layout.preferredHeight: 19
Layout.preferredHeight: 18
GridLayout {
id: titleBar
columns: 3
@ -130,13 +130,14 @@ Rectangle {
Text {
Layout.fillWidth: true
Layout.column: 0
Layout.leftMargin: 5
Layout.topMargin: -1
Layout.leftMargin: 2
id: welcome_text
color: "#ffffff"
font.bold: true
text: "Enter Network Password"
text: "Welcome to Windows"
font.family: "Helvetica"
font.pixelSize: 8
font.pixelSize: 11
}
Image {
Layout.column: 1
@ -175,13 +176,13 @@ Rectangle {
}
GridLayout {
anchors.fill: parent
//anchors.fill: parent
columns: 3
rows: 1
Layout.row: 1
Image {
Layout.topMargin: 30
Layout.leftMargin: 20
Layout.topMargin: -80
Layout.leftMargin: 24
Layout.column: 0
Layout.row: 0
source: "start.png"
@ -193,24 +194,26 @@ Rectangle {
Text {
Layout.row: 0
Layout.column: 0
Layout.leftMargin: 15
Layout.topMargin: 40
Layout.leftMargin: 16
Layout.topMargin: -65
id: message_text
color: "#000000"
text: "Enter your network password for Microsoft Networking."
text: "Type a user name and password to log on to Windows."
font.family: "Helvetica"
font.pixelSize: 8
font.pixelSize: 11
}
GridLayout {
Layout.topMargin: 15
Layout.leftMargin: 15
Layout.topMargin: -13
Layout.leftMargin: 16
Layout.rightMargin: 57
columns: 2
Label {
Layout.alignment: Qt.AlignRight
text: textConstants.userName
Layout.alignment: Qt.AlignLeft
Layout.bottomMargin: 3
text: "User name: "
font.family: "Helvetica"
font.pixelSize: 8
font.pixelSize: 11
color: "#000000"
}
@ -218,9 +221,11 @@ Rectangle {
id: username
text: userModel.lastUser
Layout.fillWidth: true
Layout.preferredHeight: font.pixelSize + 15
Layout.topMargin: 4
Layout.bottomMargin: 2
Layout.preferredHeight: font.pixelSize + 12
font.family: "Helvetica"
font.pixelSize: 8
font.pixelSize: 11
color: "#000000"
background: BorderImage {
@ -233,11 +238,13 @@ Rectangle {
: "entry.svg"
}
}
Label {
Layout.alignment: Qt.AlignRight
text: textConstants.password
Layout.alignment: Qt.AlignLeft
Layout.topMargin: -3
text: "Password: "
font.family: "Helvetica"
font.pixelSize: 8
font.pixelSize: 11
color: "#000000"
}
@ -245,9 +252,9 @@ Rectangle {
id: password
echoMode: TextInput.Password
Layout.fillWidth: true
Layout.preferredHeight: font.pixelSize + 15
Layout.preferredHeight: font.pixelSize + 13
font.family: "Helvetica"
font.pixelSize: 8
font.pixelSize: 11
color: "#000000"
background: BorderImage {
border.left: 2
@ -270,17 +277,17 @@ Rectangle {
}
ColumnLayout {
Layout.topMargin: 38
Layout.topMargin: -38
Layout.leftMargin: 10
Layout.rightMargin: 10
Layout.rightMargin: 15
Layout.column: 2
Layout.row: 0
ToolButton {
id: ok_button
enabled: username.text !== "" && password.text !== "" ? true : false
Layout.preferredWidth: 80
Layout.minimumWidth: 80
Layout.preferredHeight: 30
Layout.preferredWidth: 74
Layout.minimumWidth: 74
Layout.preferredHeight: 23
background: BorderImage {
border.left: 2
border.right: 2
@ -300,7 +307,7 @@ Rectangle {
color: "#000000"
text: "OK"
font.family: "Helvetica"
font.pixelSize: 8
font.pixelSize: 11
opacity: ok_button.enabled ? 1 : 0.5
}
}
@ -312,9 +319,10 @@ Rectangle {
ToolButton {
id: shutdown_button_2
enabled: sddm.canPowerOff
Layout.preferredWidth: 80
Layout.minimumWidth: 80
Layout.preferredHeight: 30
Layout.preferredWidth: 74
Layout.minimumWidth: 74
Layout.preferredHeight: 23
Layout.topMargin: 2
background: BorderImage {
@ -337,22 +345,25 @@ Rectangle {
text: "Cancel"
font.family: "Helvetica"
opacity: shutdown_button.enabled ? 1 : 0.5
font.pixelSize: 8
font.pixelSize: 11
}
}
onClicked: sddm.powerOff()
}
ToolButton {
id: sessionbutton
Layout.preferredWidth: 80
Layout.minimumWidth: 80
Layout.preferredHeight: 30
Layout.topMargin: 9
Layout.preferredWidth: 74
Layout.minimumWidth: 74
Layout.preferredHeight: 23
property int currentIndex: -1
onClicked: sessionmenu.open()
onClicked: {
sessionmenu.open()
}
RowLayout {
anchors.centerIn: parent
spacing: 4
spacing: 0
Label {
Layout.fillWidth: true
@ -361,12 +372,14 @@ Rectangle {
elide: Label.ElideRight
font.family: "Helvetica"
font.pixelSize: 8
font.pixelSize: 11
color: "#000000"
}
Image {
fillMode: Image.PreserveAspectFit
source: "combo-indicator.svg"
//Layout.leftMargin: -10
Layout.rightMargin: -6
}
}
background: BorderImage {
@ -392,7 +405,9 @@ Rectangle {
QQC2.Menu {
id: sessionmenu
implicitWidth: 80
implicitWidth: 120
//x: sessionbutton.width
y: sessionbutton.height // + 5
Instantiator {
id: instantiator
model: sessionModel
@ -401,6 +416,13 @@ Rectangle {
delegate: QQC2.MenuItem {
id: control
text: model.name
background: Rectangle {
//anchors.fill: parent
color: control.highlighted ? "#000080" : "transparent"
}
//color: "#000000"
font.family: "Helvetica"
font.pixelSize: 11
onTriggered: {
sessionbutton.currentIndex = model.index
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 557 B