diff options
author | Martin Měřinský <mermar@centrum.cz> | 2017-11-29 10:57:08 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-11-30 23:14:46 -0800 |
commit | 8ef87e618afd1ec943c0f42a852b3b393c1e2113 (patch) | |
tree | c767de27b2a78d3a85575b2c15ddecd7edcca891 /map-widget | |
parent | 0855f6f31577789888aa6d9b955c1bc46ed34d40 (diff) | |
download | subsurface-8ef87e618afd1ec943c0f42a852b3b393c1e2113.tar.gz |
Use better aliases for icons.
Icon aliases were complete mess.
Some icons had alias some didn't.
Named with underscores vs. hyphens vs. camelCase.
Lower vs. upper case.
"ICON" prefix vs. suffix vs. nothing.
With vs. without filename suffix.
Some didn't make sence. Eg. mapwidget-marker-gray
(I can see, it's grey, but what does it represent?)
Some were duplicated, eg warning vs. warning-icon.
Some were name after widget, which is wrong.
Do not reinvent wheel. Use widely used naming scheme
close to Freedesktop Icon Naming Specification. This
will enable usage of common icons from current set in
the future. Thus Subsurface will fit nicely to GUI.
This changes icon aliases to one, easy grep-able style.
Signed-off-by: Martin Měřinský <mermar@centrum.cz>
Diffstat (limited to 'map-widget')
-rw-r--r-- | map-widget/qml/MapWidget.qml | 8 | ||||
-rw-r--r-- | map-widget/qml/MapWidgetContextMenu.qml | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/map-widget/qml/MapWidget.qml b/map-widget/qml/MapWidget.qml index af9b47135..ee6b49231 100644 --- a/map-widget/qml/MapWidget.qml +++ b/map-widget/qml/MapWidget.qml @@ -56,7 +56,7 @@ Item { z: mapHelper.model.selectedUuid === model.uuid ? mapHelper.model.count - 1 : 0 sourceItem: Image { id: mapItemImage - source: "qrc:///mapwidget-marker" + (mapHelper.model.selectedUuid === model.uuid ? "-selected" : (mapHelper.editMode ? "-gray" : "")) + source: "qrc:///dive-location-marker" + (mapHelper.model.selectedUuid === model.uuid ? "-selected" : (mapHelper.editMode ? "-inactive" : "")) + "-icon" SequentialAnimation { id: mapItemImageAnimation PropertyAnimation { target: mapItemImage; property: "scale"; from: 1.0; to: 0.7; duration: 120 } @@ -258,7 +258,7 @@ Item { x: 10; y: x width: 40 height: 40 - source: "qrc:///mapwidget-toggle-" + (map.activeMapType === map.mapType.SATELLITE ? "street" : "satellite") + source: "qrc:///map-style-" + (map.activeMapType === map.mapType.SATELLITE ? "map" : "photo") + "-icon" SequentialAnimation { id: toggleImageAnimation PropertyAnimation { target: toggleImage; property: "scale"; from: 1.0; to: 0.8; duration: 120 } @@ -278,7 +278,7 @@ Item { x: 10 + (toggleImage.width - imageZoomIn.width) * 0.5; y: toggleImage.y + toggleImage.height + 10 width: 20 height: 20 - source: "qrc:///mapwidget-zoom-in" + source: "qrc:///zoom-in-icon" SequentialAnimation { id: imageZoomInAnimation PropertyAnimation { target: imageZoomIn; property: "scale"; from: 1.0; to: 0.8; duration: 120 } @@ -301,7 +301,7 @@ Item { Image { id: imageZoomOut x: imageZoomIn.x; y: imageZoomIn.y + imageZoomIn.height + 10 - source: "qrc:///mapwidget-zoom-out" + source: "qrc:///zoom-out-icon" width: 20 height: 20 SequentialAnimation { diff --git a/map-widget/qml/MapWidgetContextMenu.qml b/map-widget/qml/MapWidgetContextMenu.qml index a7cb568b3..cf96cd975 100644 --- a/map-widget/qml/MapWidgetContextMenu.qml +++ b/map-widget/qml/MapWidgetContextMenu.qml @@ -31,7 +31,7 @@ Item { Image { id: contextMenuImage x: -width - source: "qrc:///mapwidget-context-menu" + source: "qrc:///open-menu-icon" SequentialAnimation { id:contextMenuImageAnimation |