diff options
author | Arseniy Movshev <dodoradio@outlook.com> | 2023-01-18 19:01:10 +0000 |
---|---|---|
committer | Arseniy Movshev <dodoradio@outlook.com> | 2023-01-18 20:29:48 +0000 |
commit | d78ce0b466b212bff3bfd256ebf1c0c70d5c4b55 (patch) | |
tree | 53ef3608dfe89ecaff3093e041be5fa56d2c0635 | |
parent | 38d6e68a153061917672af697d1d12f4755387ee (diff) |
Tweak the UI colours for aesthetics and readability
consolidate most of the colours into `colors` - also rename this to US 'colors' for consistency
make all icons in setpointpage white for readability
-rw-r--r-- | asteroid-map.desktop.template | 4 | ||||
-rw-r--r-- | src/DefaultMapControls.qml | 12 | ||||
-rw-r--r-- | src/MapWaypoint.qml | 2 | ||||
-rw-r--r-- | src/SetPointMapControls.qml | 14 | ||||
-rw-r--r-- | src/SetPointPage.qml | 6 | ||||
-rw-r--r-- | src/main.qml | 12 |
6 files changed, 26 insertions, 24 deletions
diff --git a/asteroid-map.desktop.template b/asteroid-map.desktop.template index 7c4bbbf..1939d09 100644 --- a/asteroid-map.desktop.template +++ b/asteroid-map.desktop.template @@ -3,5 +3,5 @@ Type=Application Categories=Applications; Exec=invoker --single-instance --type=qtcomponents-qt5 /usr/bin/asteroid-map Icon=ios-map-outline -X-Asteroid-Center-Color=#003ee9 -X-Asteroid-Outer-Color=#00bc1b +X-Asteroid-Center-Color=#003F1A +X-Asteroid-Outer-Color=#00FCC9 diff --git a/src/DefaultMapControls.qml b/src/DefaultMapControls.qml index 079aefa..6b70f4e 100644 --- a/src/DefaultMapControls.qml +++ b/src/DefaultMapControls.qml @@ -10,7 +10,7 @@ Item { anchors.verticalCenterOffset: - height/2 + DeviceInfo.flatTireHeight/2 height: parent.height*0.2 width: height - iconColor: "blue" + iconColor: colors.primary z: 2 onClicked: mapView.zoomLevel = mapView.zoomLevel + 0.3 } @@ -21,7 +21,7 @@ Item { anchors.verticalCenterOffset: height/2 + DeviceInfo.flatTireHeight/2 height: parent.height*0.2 width: height - iconColor: "blue" + iconColor: colors.primary z: 2 onClicked: mapView.zoomLevel = mapView.zoomLevel - 0.3 } @@ -42,7 +42,7 @@ Item { anchors.fill: parent name: compass.reading.calibrationLevel > 0 ? "ios-compass-outline" : "ios-infinite-outline" rotation: -45 - color: "blue" + color: colors.primary } } IconButton { @@ -52,7 +52,7 @@ Item { anchors.left: parent.left height: parent.height*0.2 width: height - iconColor: "blue" + iconColor: colors.primary z: 2 onClicked: positionProvider.update() } @@ -62,7 +62,7 @@ Item { anchors.right: parent.horizontalCenter height: parent.height*0.2 width: height - iconColor: "blue" + iconColor: colors.primary z: 2 onClicked: pageStack.push(settingsPage,{}) } @@ -72,7 +72,7 @@ Item { anchors.left: parent.horizontalCenter height: parent.height*0.2 width: height - iconColor: "blue" + iconColor: colors.primary z: 2 onClicked: { parent.visible = false diff --git a/src/MapWaypoint.qml b/src/MapWaypoint.qml index f40f62d..2abfa31 100644 --- a/src/MapWaypoint.qml +++ b/src/MapWaypoint.qml @@ -16,7 +16,7 @@ MapQuickItem { width: Asteroid.Dims.w(12) iconName: "waypoint" height: width - iconColor: root.iconColor.hsvValue < 0.5 ? "white" : "black" + iconColor: root.iconColor.hsvValue < 0.5 ? "#E0E0E0" : colors.primary Asteroid.Icon { anchors.centerIn: parent width: parent.width*0.9 diff --git a/src/SetPointMapControls.qml b/src/SetPointMapControls.qml index de0078e..417ebbb 100644 --- a/src/SetPointMapControls.qml +++ b/src/SetPointMapControls.qml @@ -13,7 +13,7 @@ Item { anchors.verticalCenterOffset: - height/2 + DeviceInfo.flatTireHeight/2 height: parent.height*0.2 width: height - iconColor: "blue" + iconColor: colors.primary z: 2 onClicked: mapView.zoomLevel = mapView.zoomLevel + 0.3 } @@ -24,7 +24,7 @@ Item { anchors.verticalCenterOffset: height/2 + DeviceInfo.flatTireHeight/2 height: parent.height*0.2 width: height - iconColor: "blue" + iconColor: colors.primary z: 2 onClicked: mapView.zoomLevel = mapView.zoomLevel - 0.3 } @@ -45,7 +45,7 @@ Item { anchors.fill: parent name: compass.reading.calibrationLevel > 0 ? "ios-compass-outline" : "ios-infinite-outline" rotation: -45 - color: "blue" + color: colors.primary } } IconButton { @@ -55,7 +55,7 @@ Item { anchors.verticalCenterOffset: height/2 + DeviceInfo.flatTireHeight/2 height: parent.height*0.2 width: height - iconColor: "blue" + iconColor: colors.primary z: 2 } IconButton { @@ -64,7 +64,7 @@ Item { anchors.right: parent.horizontalCenter height: parent.height*0.2 width: height - iconColor: "blue" + iconColor: colors.primary z: 2 onClicked: { parent.visible = false @@ -77,7 +77,7 @@ Item { anchors.left: parent.horizontalCenter height: parent.height*0.2 width: height - iconColor: "blue" + iconColor: colors.primary z: 2 onClicked: primaryButtonAction() } @@ -86,6 +86,6 @@ Item { width: parent.width*0.1 height: width name: "ios-add" - color: "blue" + color: colors.primary } } diff --git a/src/SetPointPage.qml b/src/SetPointPage.qml index c22f0c3..234edf0 100644 --- a/src/SetPointPage.qml +++ b/src/SetPointPage.qml @@ -23,7 +23,7 @@ Item { textbox.text = currWaypointData[3] } else { editIndex = waypointArray.length - selectedColor = colours.primary + selectedColor = colors.secondary } } } @@ -59,7 +59,7 @@ Item { onClicked: root.selectedIcon = model.name height: iconSelectorView.height width: height - iconColor: root.selectedIcon == model.name ? colours.primary : colours.primaryUnselected + iconColor: root.selectedIcon == model.name ? colors.textDefault : colors.textUnselected } ListModel { id: iconModel @@ -115,7 +115,7 @@ Item { var writebuffer = {} writebuffer[0] = selectedIcon writebuffer[1] = [coord.latitude,coord.longitude] - writebuffer[2] = selectedColor //the colours.primary is currently a placeholder. it would be nice to let users select colours, but I CBA to write a colour picker right now + writebuffer[2] = selectedColor //the colors.secondary is currently a placeholder. it would be nice to let users select colours, but I CBA to write a colour picker right now writebuffer[3] = textBox.text writebuffer[4] = Date waypointArray[index] = writebuffer diff --git a/src/main.qml b/src/main.qml index 22a7597..2852fe8 100644 --- a/src/main.qml +++ b/src/main.qml @@ -6,14 +6,16 @@ import Nemo.Configuration 1.0 import QtSensors 5.3 Application { - centerColor: "#6e90e9" - outerColor: "#00bc1b" + centerColor: colors.primary + outerColor: colors.secondary id: app Item { - id: colours - property string primary: "#0056d7" - property string primaryUnselected: "#3274d7" + id: colors + property string primary: "#003F1A" + property string secondary: "#00FCC9" + property string textDefault: "#FFFFFF" + property string textUnselected: "#999999" } Plugin { id: mapProvider |