Merge pull request #386 from AerospaceDoe/master

UI Overhaul to Match Original
This commit is contained in:
grassmunk 2025-05-27 07:45:53 -07:00 committed by GitHub
commit dad1533bf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 82 additions and 50 deletions

Binary file not shown.

View File

@ -8,7 +8,7 @@
* *
* Based on QTStep SDDM theme by: * Based on QTStep SDDM theme by:
* Copyright (c) 2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> * 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 * Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation * obtaining a copy of this software and associated documentation
@ -43,9 +43,9 @@ Rectangle {
width: 1024 width: 1024
height: 768 height: 768
color: "#008080" color: "#55aaaa"
// Use this to control all font sizes (also affects icons and overall size of the greeter) // Use this to control all font sizes (also affects icons and overall size of the greeter)
property double scalingFactor: 1 property double scalingFactor: 1
LayoutMirroring.enabled: Qt.locale().textDirection == Qt.RightToLeft LayoutMirroring.enabled: Qt.locale().textDirection == Qt.RightToLeft
@ -88,11 +88,11 @@ Rectangle {
// Main Rectangle fills the whole screen // Main Rectangle fills the whole screen
anchors.fill: parent anchors.fill: parent
color: "transparent" color: "transparent"
//visible: primaryScreen // visible: primaryScreen
Rectangle { Rectangle {
// Here we make another rectangle which is the logon 'window' // Here we make another rectangle which is the logon 'window'
height: 175 height: 144
width: 640 width: 461
id: "greeter" id: "greeter"
anchors.centerIn: parent anchors.centerIn: parent
@ -113,30 +113,31 @@ Rectangle {
Rectangle { Rectangle {
Layout.row: 0 Layout.row: 0
id: header id: header
color: "#000080" color: "#0000aa"
Layout.leftMargin: 3 Layout.leftMargin: 3
Layout.rightMargin: 3 Layout.rightMargin: 5
Layout.topMargin: 3 Layout.topMargin: 3
Layout.bottomMargin: 3 Layout.bottomMargin: 3
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 19 Layout.preferredHeight: 18
GridLayout { GridLayout {
id: titleBar id: titleBar
columns: 3 columns: 3
anchors.fill: parent anchors.fill: parent
columnSpacing: 0 columnSpacing: 0
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignTop
Text { Text {
Layout.fillWidth: true Layout.fillWidth: true
Layout.column: 0 Layout.column: 0
Layout.leftMargin: 5 Layout.topMargin: -1
Layout.leftMargin: 2
id: welcome_text id: welcome_text
color: "#ffffff" color: "#ffffff"
font.bold: true font.bold: true
text: "Enter Network Password" text: "Welcome to Windows"
font.family: "Helvetica" font.family: "Helvetica"
font.pixelSize: 8 font.pixelSize: 11
} }
Image { Image {
Layout.column: 1 Layout.column: 1
@ -175,13 +176,15 @@ Rectangle {
} }
GridLayout { GridLayout {
anchors.fill: parent // anchors.fill: parent
columns: 3 columns: 3
rows: 1 rows: 1
Layout.row: 1 Layout.row: 1
Layout.alignment: Qt.AlignTop
Image { Image {
Layout.topMargin: 30 Layout.alignment: Qt.AlignTop
Layout.leftMargin: 20 Layout.topMargin: -2
Layout.leftMargin: 24
Layout.column: 0 Layout.column: 0
Layout.row: 0 Layout.row: 0
source: "start.png" source: "start.png"
@ -190,37 +193,45 @@ Rectangle {
ColumnLayout { ColumnLayout {
Layout.column: 1 Layout.column: 1
Layout.row: 0 Layout.row: 0
Layout.alignment: Qt.AlignTop
Text { Text {
Layout.row: 0 Layout.row: 0
Layout.column: 0 Layout.column: 0
Layout.leftMargin: 15 Layout.leftMargin: 16
Layout.topMargin: 40 Layout.topMargin: -2
id: message_text id: message_text
color: "#000000" 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.family: "Helvetica"
font.pixelSize: 8 font.pixelSize: 11
} }
GridLayout { GridLayout {
Layout.topMargin: 15 Layout.topMargin: 0
Layout.leftMargin: 15 Layout.leftMargin: 16
Layout.rightMargin: 57
Layout.alignment: Qt.AlignTop
columns: 2 columns: 2
Label { Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignLeft
text: textConstants.userName Layout.topMargin: 12
Layout.preferredWidth: 67
Layout.minimumWidth: 67
text: "User name:"
font.family: "Helvetica" font.family: "Helvetica"
font.pixelSize: 8 font.pixelSize: 11
color: "#000000" color: "#000000"
} }
TextField { TextField {
id: username id: username
text: userModel.lastUser text: userModel.lastUser
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: font.pixelSize + 15 Layout.topMargin: 17
Layout.preferredHeight: font.pixelSize + 12
font.family: "Helvetica" font.family: "Helvetica"
font.pixelSize: 8 font.pixelSize: 11
color: "#000000" color: "#000000"
background: BorderImage { background: BorderImage {
@ -233,11 +244,13 @@ Rectangle {
: "entry.svg" : "entry.svg"
} }
} }
Label { Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignLeft
text: textConstants.password Layout.topMargin: -1
text: "Password:"
font.family: "Helvetica" font.family: "Helvetica"
font.pixelSize: 8 font.pixelSize: 11
color: "#000000" color: "#000000"
} }
@ -245,9 +258,10 @@ Rectangle {
id: password id: password
echoMode: TextInput.Password echoMode: TextInput.Password
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: font.pixelSize + 15 Layout.topMargin: 2
Layout.preferredHeight: font.pixelSize + 13
font.family: "Helvetica" font.family: "Helvetica"
font.pixelSize: 8 font.pixelSize: 11
color: "#000000" color: "#000000"
background: BorderImage { background: BorderImage {
border.left: 2 border.left: 2
@ -270,17 +284,18 @@ Rectangle {
} }
ColumnLayout { ColumnLayout {
Layout.topMargin: 38 Layout.alignment: Qt.AlignTop
Layout.topMargin: -2
Layout.leftMargin: 10 Layout.leftMargin: 10
Layout.rightMargin: 10 Layout.rightMargin: 15
Layout.column: 2 Layout.column: 2
Layout.row: 0 Layout.row: 0
ToolButton { ToolButton {
id: ok_button id: ok_button
enabled: username.text !== "" && password.text !== "" ? true : false enabled: username.text !== "" && password.text !== "" ? true : false
Layout.preferredWidth: 80 Layout.preferredWidth: 74
Layout.minimumWidth: 80 Layout.minimumWidth: 74
Layout.preferredHeight: 30 Layout.preferredHeight: 23
background: BorderImage { background: BorderImage {
border.left: 2 border.left: 2
border.right: 2 border.right: 2
@ -300,7 +315,7 @@ Rectangle {
color: "#000000" color: "#000000"
text: "OK" text: "OK"
font.family: "Helvetica" font.family: "Helvetica"
font.pixelSize: 8 font.pixelSize: 11
opacity: ok_button.enabled ? 1 : 0.5 opacity: ok_button.enabled ? 1 : 0.5
} }
} }
@ -312,9 +327,10 @@ Rectangle {
ToolButton { ToolButton {
id: shutdown_button_2 id: shutdown_button_2
enabled: sddm.canPowerOff enabled: sddm.canPowerOff
Layout.preferredWidth: 80 Layout.preferredWidth: 74
Layout.minimumWidth: 80 Layout.minimumWidth: 74
Layout.preferredHeight: 30 Layout.preferredHeight: 23
Layout.topMargin: 2
background: BorderImage { background: BorderImage {
@ -337,36 +353,43 @@ Rectangle {
text: "Cancel" text: "Cancel"
font.family: "Helvetica" font.family: "Helvetica"
opacity: shutdown_button.enabled ? 1 : 0.5 opacity: shutdown_button.enabled ? 1 : 0.5
font.pixelSize: 8 font.pixelSize: 11
} }
} }
onClicked: sddm.powerOff() onClicked: sddm.powerOff()
} }
ToolButton { ToolButton {
id: sessionbutton id: sessionbutton
Layout.preferredWidth: 80 Layout.topMargin: 9
Layout.minimumWidth: 80 Layout.preferredWidth: 74
Layout.preferredHeight: 30 Layout.minimumWidth: 74
Layout.preferredHeight: 23
property int currentIndex: -1 property int currentIndex: -1
onClicked: sessionmenu.open() onClicked: {
sessionmenu.open()
}
RowLayout { RowLayout {
anchors.centerIn: parent anchors.left: parent.left
spacing: 4 anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
spacing: 0
Label { Label {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 7
text: instantiator.objectAt(sessionbutton.currentIndex).text || "" text: instantiator.objectAt(sessionbutton.currentIndex).text || ""
Layout.preferredWidth:50 Layout.preferredWidth:50
elide: Label.ElideRight elide: Label.ElideRight
font.family: "Helvetica" font.family: "Helvetica"
font.pixelSize: 8 font.pixelSize: 11
color: "#000000" color: "#000000"
} }
Image { Image {
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: "combo-indicator.svg" source: "combo-indicator.svg"
Layout.rightMargin: 1
} }
} }
background: BorderImage { background: BorderImage {
@ -392,7 +415,9 @@ Rectangle {
QQC2.Menu { QQC2.Menu {
id: sessionmenu id: sessionmenu
implicitWidth: 80 implicitWidth: 120 // Adjust menu width here
// x: sessionbutton.width
y: sessionbutton.height // + 5
Instantiator { Instantiator {
id: instantiator id: instantiator
model: sessionModel model: sessionModel
@ -401,6 +426,13 @@ Rectangle {
delegate: QQC2.MenuItem { delegate: QQC2.MenuItem {
id: control id: control
text: model.name text: model.name
background: Rectangle {
// anchors.fill: parent
color: control.highlighted ? "#000080" : "transparent"
}
// color: "#000000"
font.family: "Helvetica"
font.pixelSize: 11
onTriggered: { onTriggered: {
sessionbutton.currentIndex = model.index sessionbutton.currentIndex = model.index
} }

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 557 B