diff --git a/icons/ic_cog_40px.svg b/icons/ic_cog_40px.svg
deleted file mode 100644
index c8c447b..0000000
--- a/icons/ic_cog_40px.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/icons/ic_cog_red.svg b/icons/ic_cog_red.svg
new file mode 100644
index 0000000..6b868f6
--- /dev/null
+++ b/icons/ic_cog_red.svg
@@ -0,0 +1,13 @@
+
diff --git a/main.qml b/main.qml
index 490c9a2..73ed314 100644
--- a/main.qml
+++ b/main.qml
@@ -255,16 +255,22 @@ ApplicationWindow {
font.family: roboto.name
Accessible.onPressAction: clicked()
}
- Image {
- id: customizebutton
- source: "icons/ic_cog_40px.svg"
- visible: false
- MouseArea {
- anchors.fill: parent
- onClicked: {
- optionspopup.openPopup()
- }
+ Button {
+ Layout.bottomMargin: 25
+ padding: 5
+ id: customizebutton
+ onClicked: {
+ optionspopup.openPopup()
+ }
+ Material.background: "#ffffff"
+ visible: false
+ Accessible.description: qsTr("Select this button to access advanced settings")
+ Accessible.onPressAction: clicked()
+
+ contentItem: Image {
+ source: "icons/ic_cog_red.svg"
+ fillMode: Image.PreserveAspectFit
}
}
}
@@ -1051,6 +1057,29 @@ ApplicationWindow {
progressText.text = qsTr("Finalizing...")
}
+ function shuffle(arr) {
+ for (var i = 0; i < arr.length - 1; i++) {
+ var j = i + Math.floor(Math.random() * (arr.length - i));
+
+ var t = arr[j];
+ arr[j] = arr[i];
+ arr[i] = t;
+ }
+ }
+
+ function checkForRandom(list) {
+ for (var i in list) {
+ var entry = list[i]
+
+ if ("subitems" in entry) {
+ checkForRandom(entry["subitems"])
+ if ("random" in entry && entry["random"]) {
+ shuffle(entry["subitems"])
+ }
+ }
+ }
+ }
+
function oslistFromJson(o) {
var lang_country = Qt.locale().name
if ("os_list_"+lang_country in o) {
@@ -1068,7 +1097,9 @@ ApplicationWindow {
return false
}
- return o["os_list"]
+ var oslist = o["os_list"]
+ checkForRandom(oslist)
+ return oslist
}
function selectNamedOS(name, collection)
diff --git a/qml.qrc b/qml.qrc
index 89364b9..76390f7 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -30,5 +30,6 @@
icons/ic_info_12px.png
icons/ic_cog_40px.svg
keymap-layouts.txt
+ icons/ic_cog_red.svg