mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
qml: Remove customisation button, roll into flow
This patch carries a translation risk, as we change the default progression button. Remove the customisation button all together, and make the customisation options something we offer as part of flashing an image that has that capability. While this adds an additional click to the flash sequence, it should provide a steer to people who are flashing customisable images to make use of this capability, potentially avoiding an additional pass through the Imager.
This commit is contained in:
parent
9fb9fca065
commit
2b2fd7de8a
2 changed files with 9 additions and 28 deletions
|
@ -70,7 +70,7 @@ Popup {
|
||||||
Layout.topMargin: 10
|
Layout.topMargin: 10
|
||||||
font.family: roboto.name
|
font.family: roboto.name
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: qsTr("Warning: advanced settings set")
|
text: qsTr("Use image customisation?")
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@ -83,8 +83,9 @@ Popup {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.leftMargin: 25
|
Layout.leftMargin: 25
|
||||||
Layout.topMargin: 25
|
Layout.topMargin: 25
|
||||||
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||||
Accessible.name: text.replace(/<\/?[^>]+(>|$)/g, "")
|
Accessible.name: text.replace(/<\/?[^>]+(>|$)/g, "")
|
||||||
text: qsTr("Would you like to apply the image customization settings saved earlier?")
|
text: qsTr("Would you like to apply image customization settings?")
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -111,6 +112,7 @@ Popup {
|
||||||
}
|
}
|
||||||
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
|
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
|
||||||
Material.background: "#c51a4a"
|
Material.background: "#c51a4a"
|
||||||
|
enabled: imageWriter.hasSavedCustomizationSettings() ? true : false
|
||||||
}
|
}
|
||||||
|
|
||||||
ImButton {
|
ImButton {
|
||||||
|
@ -121,6 +123,7 @@ Popup {
|
||||||
}
|
}
|
||||||
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
|
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
|
||||||
Material.background: "#c51a4a"
|
Material.background: "#c51a4a"
|
||||||
|
enabled: imageWriter.hasSavedCustomizationSettings() ? true : false
|
||||||
}
|
}
|
||||||
|
|
||||||
ImButton {
|
ImButton {
|
||||||
|
|
26
src/main.qml
26
src/main.qml
|
@ -283,26 +283,9 @@ ApplicationWindow {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
ImButton {
|
|
||||||
Layout.bottomMargin: 25
|
|
||||||
Layout.minimumHeight: 40
|
|
||||||
Layout.preferredWidth: 200
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
padding: 5
|
|
||||||
id: customizebutton
|
|
||||||
onClicked: {
|
|
||||||
optionspopup.openPopup()
|
|
||||||
}
|
|
||||||
visible: imageWriter.imageSupportsCustomization()
|
|
||||||
Accessible.description: qsTr("Select this button to access advanced settings")
|
|
||||||
contentItem: Image {
|
|
||||||
source: "icons/ic_cog_red.svg"
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImButton {
|
ImButton {
|
||||||
id: writebutton
|
id: writebutton
|
||||||
text: qsTr("WRITE")
|
text: qsTr("Next")
|
||||||
Layout.bottomMargin: 25
|
Layout.bottomMargin: 25
|
||||||
Layout.minimumHeight: 40
|
Layout.minimumHeight: 40
|
||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 200
|
||||||
|
@ -315,7 +298,7 @@ ApplicationWindow {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!optionspopup.initialized && imageWriter.imageSupportsCustomization() && imageWriter.hasSavedCustomizationSettings()) {
|
if (!optionspopup.visible && imageWriter.imageSupportsCustomization()) {
|
||||||
usesavedsettingspopup.openPopup()
|
usesavedsettingspopup.openPopup()
|
||||||
} else {
|
} else {
|
||||||
confirmwritepopup.askForConfirmation()
|
confirmwritepopup.askForConfirmation()
|
||||||
|
@ -1136,7 +1119,6 @@ ApplicationWindow {
|
||||||
langbarRect.visible = false
|
langbarRect.visible = false
|
||||||
writebutton.visible = false
|
writebutton.visible = false
|
||||||
writebutton.enabled = false
|
writebutton.enabled = false
|
||||||
customizebutton.visible = false
|
|
||||||
cancelwritebutton.enabled = true
|
cancelwritebutton.enabled = true
|
||||||
cancelwritebutton.visible = true
|
cancelwritebutton.visible = true
|
||||||
cancelverifybutton.enabled = true
|
cancelverifybutton.enabled = true
|
||||||
|
@ -1266,7 +1248,6 @@ ApplicationWindow {
|
||||||
function resetWriteButton() {
|
function resetWriteButton() {
|
||||||
progressText.visible = false
|
progressText.visible = false
|
||||||
progressBar.visible = false
|
progressBar.visible = false
|
||||||
customizebutton.visible = imageWriter.imageSupportsCustomization()
|
|
||||||
osbutton.enabled = true
|
osbutton.enabled = true
|
||||||
dstbutton.enabled = true
|
dstbutton.enabled = true
|
||||||
hwbutton.enabled = true
|
hwbutton.enabled = true
|
||||||
|
@ -1313,7 +1294,6 @@ ApplicationWindow {
|
||||||
if (imageWriter.readyToWrite()) {
|
if (imageWriter.readyToWrite()) {
|
||||||
writebutton.enabled = true
|
writebutton.enabled = true
|
||||||
}
|
}
|
||||||
customizebutton.visible = imageWriter.imageSupportsCustomization()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onCancelled() {
|
function onCancelled() {
|
||||||
|
@ -1599,7 +1579,6 @@ ApplicationWindow {
|
||||||
hwTags = hwmodel.tags
|
hwTags = hwmodel.tags
|
||||||
|
|
||||||
if (hwmodel.matching_type) {
|
if (hwmodel.matching_type) {
|
||||||
|
|
||||||
switch (hwmodel.matching_type) {
|
switch (hwmodel.matching_type) {
|
||||||
case "exclusive":
|
case "exclusive":
|
||||||
hwTagMatchingType = 0
|
hwTagMatchingType = 0
|
||||||
|
@ -1709,7 +1688,6 @@ ApplicationWindow {
|
||||||
if (imageWriter.readyToWrite()) {
|
if (imageWriter.readyToWrite()) {
|
||||||
writebutton.enabled = true
|
writebutton.enabled = true
|
||||||
}
|
}
|
||||||
customizebutton.visible = imageWriter.imageSupportsCustomization()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue