added some flair!

This commit is contained in:
cmclark00 2024-08-12 22:42:25 -04:00
parent 110b23f1fb
commit 875f0fe590
13 changed files with 81 additions and 38 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

View file

@ -11,13 +11,34 @@ import QtQuick.Controls.Material 2.2
import "qmlcomponents" import "qmlcomponents"
ApplicationWindow { ApplicationWindow {
// Define the colors
property color beigeColor: "#c4bebb"
property color maroonColor: "#800000"
property color yellowColor: "#fcad01"
// Placeholder for detecting the selected CFW
property string selectedCFW: "" // This should be set dynamically
// Set the color scheme based on the selected CFW
property color backgroundColor: selectedCFW.toLowerCase().indexOf("muos") !== -1 ? yellowColor : beigeColor
property color accentColor: selectedCFW.toLowerCase().indexOf("muos") !== -1 ? yellowColor : maroonColor
id: window id: window
visible: true visible: true
// Define your colors
// Placeholder for detecting the selected CFW
// Set the color scheme based on the selected CFW
// Apply these colors to your existing UI components below
width: imageWriter.isEmbeddedMode() ? -1 : 680 width: imageWriter.isEmbeddedMode() ? -1 : 680
height: imageWriter.isEmbeddedMode() ? -1 : 450 height: imageWriter.isEmbeddedMode() ? -1 : 450
minimumWidth: imageWriter.isEmbeddedMode() ? -1 : 680 minimumWidth: imageWriter.isEmbeddedMode() ? -1 : 680
minimumHeight: imageWriter.isEmbeddedMode() ? -1 : 420 minimumHeight: imageWriter.isEmbeddedMode() ? -1 : 450
title: qsTr("Retro Imager v%1").arg(imageWriter.constantVersion()) title: qsTr("Retro Imager v%1").arg(imageWriter.constantVersion())
@ -56,6 +77,7 @@ ApplicationWindow {
Rectangle { Rectangle {
id: logoContainer id: logoContainer
color: accentColor
implicitHeight: window.height/4 implicitHeight: window.height/4
Image { Image {
@ -89,7 +111,7 @@ ApplicationWindow {
} }
Rectangle { Rectangle {
color: "#fcad01" color: backgroundColor
implicitWidth: window.width implicitWidth: window.width
implicitHeight: window.height * (1 - 1/4) implicitHeight: window.height * (1 - 1/4)
@ -115,7 +137,7 @@ ApplicationWindow {
Text { Text {
id: text0 id: text0
color: "#ffffff" color: accentColor
text: qsTr("Retro Gaming Handheld Device") text: qsTr("Retro Gaming Handheld Device")
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 17 Layout.preferredHeight: 17
@ -135,12 +157,37 @@ ApplicationWindow {
topPadding: 0 topPadding: 0
Layout.minimumHeight: 40 Layout.minimumHeight: 40
Layout.fillWidth: true Layout.fillWidth: true
onClicked: {
hwpopup.open()
hwlist.forceActiveFocus()
}
Accessible.ignored: ospopup.visible || dstpopup.visible || hwpopup.visible Accessible.ignored: ospopup.visible || dstpopup.visible || hwpopup.visible
Accessible.description: qsTr("Select this button to choose your target Retro Gaming Handheld") Accessible.description: qsTr("Select this button to choose your target Retro Gaming Handheld")
MouseArea {
id: hwbuttonMouseArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: {
bgrect.mouseOver = true
}
onExited: {
bgrect.mouseOver = false
}
onClicked: {
hwpopup.open()
hwlist.forceActiveFocus()
}
}
Rectangle {
id: bgrect
anchors.fill: parent
color: accentColor
visible: mouseOver
property bool mouseOver: false
}
} }
} }
@ -153,7 +200,7 @@ ApplicationWindow {
Text { Text {
id: text1 id: text1
color: "#ffffff" color: accentColor
text: qsTr("Custom Firmware") text: qsTr("Custom Firmware")
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 17 Layout.preferredHeight: 17
@ -190,7 +237,7 @@ ApplicationWindow {
Text { Text {
id: text2 id: text2
color: "#ffffff" color: accentColor
text: qsTr("Storage") text: qsTr("Storage")
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 17 Layout.preferredHeight: 17
@ -230,7 +277,7 @@ ApplicationWindow {
Text { Text {
id: progressText id: progressText
font.pointSize: 10 font.pointSize: 10
color: "white" color: accentColor
font.family: robotoBold.name font.family: robotoBold.name
font.bold: true font.bold: true
visible: false visible: false
@ -245,7 +292,7 @@ ApplicationWindow {
id: progressBar id: progressBar
Layout.fillWidth: true Layout.fillWidth: true
visible: false visible: false
Material.background: "#fcad01" Material.background: accentColor
} }
} }
@ -313,7 +360,7 @@ ApplicationWindow {
Text { Text {
Layout.columnSpan: 3 Layout.columnSpan: 3
color: "#ffffff" color: accentColor
font.pixelSize: 18 font.pixelSize: 18
font.family: roboto.name font.family: roboto.name
visible: imageWriter.isEmbeddedMode() && imageWriter.customRepo() visible: imageWriter.isEmbeddedMode() && imageWriter.customRepo()
@ -323,7 +370,7 @@ ApplicationWindow {
Text { Text {
id: networkInfo id: networkInfo
Layout.columnSpan: 3 Layout.columnSpan: 3
color: "#ffffff" color: accentColor
font.pixelSize: 18 font.pixelSize: 18
font.family: roboto.name font.family: roboto.name
visible: imageWriter.isEmbeddedMode() visible: imageWriter.isEmbeddedMode()
@ -332,7 +379,7 @@ ApplicationWindow {
Text { Text {
Layout.columnSpan: 3 Layout.columnSpan: 3
color: "#ffffff" color: accentColor
font.pixelSize: 18 font.pixelSize: 18
font.family: roboto.name font.family: roboto.name
visible: !imageWriter.hasMouse() visible: !imageWriter.hasMouse()
@ -347,7 +394,7 @@ ApplicationWindow {
visible: imageWriter.isEmbeddedMode() visible: imageWriter.isEmbeddedMode()
implicitWidth: langbar.width implicitWidth: langbar.width
implicitHeight: langbar.height implicitHeight: langbar.height
color: "#fcad01" color: backgroundColor
radius: 5 radius: 5
RowLayout { RowLayout {
@ -442,7 +489,7 @@ ApplicationWindow {
// background of title // background of title
Rectangle { Rectangle {
color: "#fcad01" color: backgroundColor
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
height: 35 height: 35
@ -509,7 +556,6 @@ ApplicationWindow {
width: window.width-100 width: window.width-100
height: window.height-100 height: window.height-100
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
ScrollBar.vertical: ScrollBar { ScrollBar.vertical: ScrollBar {
width: 10 width: 10
policy: hwlist.contentHeight > hwlist.height ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded policy: hwlist.contentHeight > hwlist.height ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded
@ -544,7 +590,7 @@ ApplicationWindow {
// background of title // background of title
Rectangle { Rectangle {
color: "#fcad01" color: backgroundColor
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
height: 35 height: 35
@ -607,7 +653,6 @@ ApplicationWindow {
width: window.width-100 width: window.width-100
height: window.height-100 height: window.height-100
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
ScrollBar.vertical: ScrollBar { ScrollBar.vertical: ScrollBar {
width: 10 width: 10
policy: oslist.contentHeight > oslist.height ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded policy: oslist.contentHeight > oslist.height ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded
@ -661,7 +706,6 @@ ApplicationWindow {
width: window.width-100 width: window.width-100
height: window.height-100 height: window.height-100
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
ScrollBar.vertical: ScrollBar { ScrollBar.vertical: ScrollBar {
width: 10 width: 10
policy: parent.contentHeight > parent.height ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded policy: parent.contentHeight > parent.height ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded
@ -728,7 +772,7 @@ ApplicationWindow {
Rectangle { Rectangle {
id: bgrect id: bgrect
anchors.fill: parent anchors.fill: parent
color: "#f5f5f5" color: accentColor
visible: mouseOver && parent.ListView.view.currentIndex !== index visible: mouseOver && parent.ListView.view.currentIndex !== index
property bool mouseOver: false property bool mouseOver: false
} }
@ -736,7 +780,7 @@ ApplicationWindow {
id: borderrect id: borderrect
implicitHeight: 1 implicitHeight: 1
implicitWidth: parent.width implicitWidth: parent.width
color: "#dcdcdc" color: accentColor
y: parent.height y: parent.height
} }
@ -775,13 +819,13 @@ ApplicationWindow {
font.family: roboto.name font.family: roboto.name
text: description text: description
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: "#1a1a1a" color: accentColor
} }
ToolTip { ToolTip {
visible: hwMouseArea.containsMouse && typeof(tooltip) == "string" && tooltip != "" visible: hwMouseArea.containsMouse && typeof(tooltip) == "string" && tooltip != ""
delay: 1000 delay: 1000
text: typeof(tooltip) == "string" ? tooltip : "" text: tooltip ? tooltip : ""
clip: false clip: false
} }
} }
@ -819,15 +863,16 @@ ApplicationWindow {
Rectangle { Rectangle {
id: bgrect id: bgrect
anchors.fill: parent anchors.fill: parent
color: "#fcad01" color: accentColor
visible: mouseOver && parent.ListView.view.currentIndex !== index visible: mouseOver && parent.ListView.view.currentIndex !== index
property bool mouseOver: false property bool mouseOver: false
} }
Rectangle { Rectangle {
id: borderrect id: borderrect
implicitHeight: 1 implicitHeight: 1
implicitWidth: parent.width implicitWidth: parent.width
color: "#dcdcdc" color: accentColor
y: parent.height y: parent.height
} }
@ -888,7 +933,7 @@ ApplicationWindow {
Text { Text {
Layout.fillWidth: true Layout.fillWidth: true
elide: Text.ElideRight elide: Text.ElideRight
color: "#646464" color: accentColor
font.weight: Font.Light font.weight: Font.Light
visible: typeof(release_date) == "string" && release_date visible: typeof(release_date) == "string" && release_date
text: qsTr("Released: %1").arg(release_date) text: qsTr("Released: %1").arg(release_date)
@ -896,7 +941,7 @@ ApplicationWindow {
Text { Text {
Layout.fillWidth: true Layout.fillWidth: true
elide: Text.ElideRight elide: Text.ElideRight
color: "#646464" color: accentColor
font.weight: Font.Light font.weight: Font.Light
visible: typeof(url) == "string" && url != "" && url != "internal://format" visible: typeof(url) == "string" && url != "" && url != "internal://format"
text: !url ? "" : text: !url ? "" :
@ -940,7 +985,7 @@ ApplicationWindow {
// background of title // background of title
Rectangle { Rectangle {
color: "#fcad01" color: backgroundColor
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
height: 35 height: 35
@ -997,7 +1042,6 @@ ApplicationWindow {
width: window.width-100 width: window.width-100
height: window.height-100 height: window.height-100
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
Label { Label {
anchors.fill: parent anchors.fill: parent
@ -1050,16 +1094,16 @@ ApplicationWindow {
Rectangle { Rectangle {
id: dstbgrect id: dstbgrect
anchors.fill: parent anchors.fill: parent
color: "#fcad01" color: accentColor
visible: mouseOver && parent.ListView.view.currentIndex !== index visible: mouseOver && parent.ListView.view.currentIndex !== index
property bool mouseOver: false property bool mouseOver: false
} }
Rectangle { Rectangle {
id: dstborderrect id: dstborderrect
implicitHeight: 1 implicitHeight: 1
implicitWidth: parent.width implicitWidth: parent.width
color: "#dcdcdc" color: accentColor
y: parent.height y: parent.height
} }
@ -1163,7 +1207,7 @@ ApplicationWindow {
progressText.visible = true progressText.visible = true
progressBar.visible = true progressBar.visible = true
progressBar.indeterminate = true progressBar.indeterminate = true
progressBar.Material.accent = "#ffffff" progressBar.Material.accent = accentColor
osbutton.enabled = false osbutton.enabled = false
dstbutton.enabled = false dstbutton.enabled = false
hwbutton.enabled = false hwbutton.enabled = false
@ -1264,7 +1308,7 @@ ApplicationWindow {
return return
progressText.text = qsTr("Verifying... %1%").arg(Math.floor(newPos*100)) progressText.text = qsTr("Verifying... %1%").arg(Math.floor(newPos*100))
progressBar.Material.accent = "#fcad01" progressBar.Material.accent = backgroundColor
progressBar.value = newPos progressBar.value = newPos
} }
} }
@ -1736,4 +1780,4 @@ ApplicationWindow {
writebutton.enabled = true writebutton.enabled = true
} }
} }
} }

View file

@ -42,8 +42,7 @@
}, },
{ {
"name": "Anbernic RG35XX Plus", "name": "Anbernic RG35XX Plus",
"tags": ["rg35xx_plus"], "tags": ["rg35xx_plus"]
"default": "True"
}, },
{ {
"name": "Anbernic RG35XX SP", "name": "Anbernic RG35XX SP",