Skip to content

Commit

Permalink
refactor: 💄 Fix the UI for BIOS bootloader choice screen too
Browse files Browse the repository at this point in the history
  • Loading branch information
pvshvp-oss committed Jul 23, 2024
1 parent b7eabc5 commit 6efdd3e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 41 deletions.
67 changes: 33 additions & 34 deletions etc/calamares/branding/rebornos/BIOS.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,114 +17,113 @@ import QtQuick.Layouts 1.3
Column {
id: column
anchors.centerIn: parent
spacing: 5
spacing: 7

ButtonGroup {
id: switchGroup
}

Component.onCompleted: {
config.packageChoice = "grub"
}

Rectangle {
//id: rectangle
width: 700
height: 50
height: 40
color: "#2a2e32"
border.width: 0
Text {
height: 25
anchors.centerIn: parent
text: qsTr("Please select a <strong>bootloader</strong> option for your install, or leave the already selected default option, <strong>GRUB</strong>.")
font.pointSize: 11
font.pointSize: 12
color: "#ffffff"
wrapMode: Text.WordWrap
}
}

Rectangle {
width: 700
height: 150
height: 90
color: "#1b1e20"
radius: 5
border.width: 1
border.color: "#646b75"
Text {
width: 600
height: 104
anchors.centerIn: parent
text: qsTr("<strong>Grub Bootloader</strong><br><br>The GRand Unified Bootloader is the reference implementation<br>of the Free Software Foundation's Multiboot Specification,<br>which provides a user the choice<br>to boot one of multiple operating systems installed on a computer.")
font.pointSize: 10
height: 40
x: 25
y: 10
text: qsTr("<strong>GRUB</strong>: a feature-rich and customizable bootloader that has broad compatibility with various filesystems.")
font.pointSize: 12
color: "#ffffff"
anchors.verticalCenterOffset: 0
anchors.horizontalCenterOffset: -20.0
wrapMode: Text.WordWrap
}

Switch {
id: element2
id: grub_switch
x: 500
y: 110
y: 65
width: 187
height: 14
text: qsTr("GRUB")
checked: true
hoverEnabled: true
ButtonGroup.group: switchGroup


indicator: Rectangle {
implicitWidth: 40
implicitHeight: 14
radius: 10
color: element2.checked ? "#3498db" : "#B9B9B9"
border.color: element2.checked ? "#3498db" : "#cccccc"
color: grub_switch.checked ? "#3498db" : "#B9B9B9"
border.color: grub_switch.checked ? "#3498db" : "#cccccc"

Rectangle {
x: element2.checked ? parent.width - width : 0
x: grub_switch.checked ? parent.width - width : 0
y: (parent.height - height) / 2
width: 20
height: 20
radius: 10
color: element2.down ? "#cccccc" : "#ffffff"
border.color: element2.checked ? (element2.down ? "#3498db" : "#3498db") : "#999999"
color: grub_switch.down ? "#cccccc" : "#ffffff"
border.color: grub_switch.checked ? (grub_switch.down ? "#3498db" : "#3498db") : "#999999"
}
}

onCheckedChanged: {
if (! checked) {
print("grub not used")
print("GRUB not used")
} else {
print("GRUB")
config.packageChoice = "grub"
print(config.packageChoice)
}
}
}
}

Rectangle {
width: 700
height: 150
height: 90
color: "#1b1e20"
radius: 5
border.width: 1
border.color: "#646b75"
Text {
width: 600
height: 104
anchors.centerIn: parent
text: qsTr("<strong>No Bootloader</strong><br><br>Selecting no bootloader might result in an <strong>un-bootable system</strong>,<br>If you don't already have a bootloader that you can add this install to.")
font.pointSize: 10
height: 40
x: 25
y: 10
text: qsTr("<strong>No Bootloader</strong>: Not selecting a bootloader might result in an <strong>un-bootable system</strong>. Only choose this option if you already have a bootloader from another installation.")
font.pointSize: 12
color: "#ffffff"
anchors.verticalCenterOffset: 0
anchors.horizontalCenterOffset: -20.0
wrapMode: Text.WordWrap
}

Switch {
id: element3
id: no_bootloader_switch
x: 500
y: 110
y: 65
width: 187
height: 14
text: qsTr("No bootloader")
Expand All @@ -136,23 +135,23 @@ Column {
implicitWidth: 40
implicitHeight: 14
radius: 10
color: element3.checked ? "#3498db" : "#B9B9B9"
border.color: element3.checked ? "#3498db" : "#cccccc"
color: no_bootloader_switch.checked ? "#ff8585" : "#B9B9B9"
border.color: no_bootloader_switch.checked ? "#ff8585" : "#cccccc"

Rectangle {
x: element3.checked ? parent.width - width : 0
x: no_bootloader_switch.checked ? parent.width - width : 0
y: (parent.height - height) / 2
width: 20
height: 20
radius: 10
color: element3.down ? "#cccccc" : "#ffffff"
border.color: element3.checked ? (element3.down ? "#3498db" : "#3498db") : "#999999"
color: no_bootloader_switch.down ? "#cccccc" : "#ffffff"
border.color: no_bootloader_switch.checked ? (no_bootloader_switch.down ? "#ff8585" : "#ff8585") : "#999999"
}
}

onCheckedChanged: {
if (! checked) {
print("no btl not checked")
print("no bootloader not checked")
} else {
print("no bootloader")
config.packageChoice = "none"
Expand Down
14 changes: 7 additions & 7 deletions etc/calamares/branding/rebornos/UEFI.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Column {
Text {
height: 25
anchors.centerIn: parent
text: qsTr("Please select a <strong>bootloader</strong> option for your install, or leave the already selected default option, <strong>Grub</strong>.")
text: qsTr("Please select a <strong>bootloader</strong> option for your install, or leave the already selected default option, <strong>GRUB</strong>.")
font.pointSize: 12
color: "#ffffff"
wrapMode: Text.WordWrap
Expand All @@ -51,7 +51,7 @@ Column {
height: 40
x: 25
y: 10
text: qsTr("<strong>Grub</strong>: a feature-rich and customizable bootloader that has broad compatibility with various filesystems.")
text: qsTr("<strong>GRUB</strong>: a feature-rich and customizable bootloader that has broad compatibility with various filesystems.")
font.pointSize: 12
color: "#ffffff"
anchors.verticalCenterOffset: 0
Expand All @@ -65,7 +65,7 @@ Column {
y: 65
width: 187
height: 14
text: qsTr("Grub")
text: qsTr("GRUB")
checked: true
hoverEnabled: true
ButtonGroup.group: switchGroup
Expand All @@ -91,9 +91,9 @@ Column {

onCheckedChanged: {
if (! checked) {
print("Grub not used")
print("GRUB not used")
} else {
print("Grub")
print("GRUB")
config.packageChoice = "grub"
}
}
Expand Down Expand Up @@ -151,7 +151,7 @@ Column {

onCheckedChanged: {
if (! checked) {
print("systemd not used")
print("systemd-boot not used")
} else {
config.packageChoice = "systemd-boot"
print(config.packageChoice)
Expand Down Expand Up @@ -271,7 +271,7 @@ Column {

onCheckedChanged: {
if (! checked) {
print("no btl not checked")
print("no bootloader not checked")
} else {
print("no bootloader")
config.packageChoice = "none"
Expand Down

0 comments on commit 6efdd3e

Please sign in to comment.