diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-02-22 15:23:24 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-10 09:25:57 -0700 |
commit | 0720e74c1afc5cbd51593db08add58bc277213c8 (patch) | |
tree | 9cd6980e31d808f8f3483159fa2a11993ca13fd1 /mobile-widgets/qml | |
parent | 0683d97636647f75c10aa9150e1ca8f2ab992a95 (diff) | |
download | subsurface-0720e74c1afc5cbd51593db08add58bc277213c8.tar.gz |
mobile UI: six new icons
I will (mis)use these for moving dives out of trips and to the trip above or
below and of course for undo/redo. And the weirdest one is the 'local offer'
icon that seemed a reasonably good fit to edit trip details.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 5 | ||||
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 6 | ||||
-rw-r--r-- | mobile-widgets/qml/icons/README.license | 6 | ||||
-rw-r--r-- | mobile-widgets/qml/icons/chevron_left.svg | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/icons/expand_less.svg | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/icons/expand_more.svg | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/icons/local_offer.svg | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/icons/redo.svg | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/icons/undo.svg | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/mobile-resources.qrc | 6 |
10 files changed, 29 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index f1feeedd7..9a185789c 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -61,6 +61,7 @@ Kirigami.Page { property QtObject removeDiveFromTripAction: Kirigami.Action { text: qsTr ("Remove this dive from trip") + icon { name: ":/icons/chevron_left.svg" } enabled: currentItem && currentItem.modelData && currentItem.modelData.diveInTrip onTriggered: { manager.appendTextToLog("remove dive #" + currentItem.modelData.number + " from its trip") @@ -69,6 +70,7 @@ Kirigami.Page { } property QtObject addDiveToTripAboveAction: Kirigami.Action { text: qsTr ("Add dive to trip above") + icon { name: ":/icons/expand_less.svg" } enabled: currentItem && currentItem.modelData && !currentItem.modelData.diveInTrip && currentItem.modelData.tripAbove !== -1 onTriggered: { manager.appendTextToLog("add dive #" + currentItem.modelData.number + " to trip with id " + currentItem.modelData.tripAbove) @@ -77,6 +79,7 @@ Kirigami.Page { } property QtObject addDiveToTripBelowAction: Kirigami.Action { text: qsTr ("Add dive to trip below") + icon { name: ":/icons/expand_more.svg" } enabled: currentItem && currentItem.modelData && !currentItem.modelData.diveInTrip && currentItem.modelData.tripBelow !== -1 onTriggered: { manager.appendTextToLog("add dive #" + currentItem.modelData.number + " to trip with id " + currentItem.modelData.tripBelow) @@ -85,11 +88,13 @@ Kirigami.Page { } property QtObject undoAction: Kirigami.Action { text: qsTr("Undo") + " " + manager.undoText + icon { name: ":/icons/undo.svg" } enabled: manager.undoText !== "" onTriggered: manager.undo() } property QtObject redoAction: Kirigami.Action { text: qsTr("Redo") + " " + manager.redoText + icon { name: ":/icons/redo.svg" } enabled: manager.redoText !== "" onTriggered: manager.redo() } diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 86b361186..8394fafef 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -250,6 +250,7 @@ Kirigami.ScrollablePage { property QtObject removeDiveFromTripAction: Kirigami.Action { text: visible ? qsTr ("Remove dive %1 from trip").arg(currentItem.myData.number) : "" + icon { name: ":/icons/chevron_left.svg" } visible: currentItem && currentItem.myData && !currentItem.myData.isTrip && currentItem.myData.diveInTrip === true onTriggered: { manager.removeDiveFromTrip(currentItem.myData.id) @@ -257,6 +258,7 @@ Kirigami.ScrollablePage { } property QtObject addDiveToTripAboveAction: Kirigami.Action { text: visible ? qsTr ("Add dive %1 to trip above").arg(currentItem.myData.number) : "" + icon { name: ":/icons/expand_less.svg" } visible: currentItem && currentItem.myData && !currentItem.myData.isTrip && currentItem.myData.tripAbove !== -1 onTriggered: { manager.addDiveToTrip(currentItem.myData.id, currentItem.myData.tripAbove) @@ -264,6 +266,7 @@ Kirigami.ScrollablePage { } property QtObject addDiveToTripBelowAction: Kirigami.Action { text: visible ? qsTr ("Add dive %1 to trip below").arg(currentItem.myData.number) : "" + icon { name: ":/icons/expand_more.svg" } visible: currentItem && currentItem.myData && !currentItem.myData.isTrip && currentItem.myData.tripBelow !== -1 onTriggered: { manager.addDiveToTrip(currentItem.myData.id, currentItem.myData.tripBelow) @@ -286,6 +289,7 @@ Kirigami.ScrollablePage { } property QtObject tripDetailsEdit: Kirigami.Action { text: qsTr("Edit trip details") + icon { name: ":/icons/trip_details.svg" } visible: currentItem && currentItem.myData && currentItem.myData.isTrip onTriggered: { tripEditWindow.tripId = currentItem.myData.tripId @@ -297,11 +301,13 @@ Kirigami.ScrollablePage { property QtObject undoAction: Kirigami.Action { text: qsTr("Undo") + " " + manager.undoText + icon { name: ":/icons/undo.svg" } enabled: manager.undoText !== "" onTriggered: manager.undo() } property QtObject redoAction: Kirigami.Action { text: qsTr("Redo") + " " + manager.redoText + icon { name: ":/icons/redo.svg" } enabled: manager.redoText !== "" onTriggered: manager.redo() } diff --git a/mobile-widgets/qml/icons/README.license b/mobile-widgets/qml/icons/README.license index 0f739e9ef..bc2c1aa80 100644 --- a/mobile-widgets/qml/icons/README.license +++ b/mobile-widgets/qml/icons/README.license @@ -29,4 +29,10 @@ ic_place_black_24px.svg -> ic_place.svg ic_settings_24px.svg -> ic_settings.svg ic_sync_24px.svg -> ic_sync.svg account_circle-24px.svg -> account_circle.svg +chevron_left-24px.svg -> chevron_left.svg contact_support-24px.svg -> contact_support.svg +expand_less-24px.svg -> expand_less.svg +expand_more-24px.svg -> expand_more.svg +local_offer-24px.svg -> local_offer.svg +redo-24px.svg -> redo.svg +undo-24px.svg -> undo.svg diff --git a/mobile-widgets/qml/icons/chevron_left.svg b/mobile-widgets/qml/icons/chevron_left.svg new file mode 100644 index 000000000..8a3a603ee --- /dev/null +++ b/mobile-widgets/qml/icons/chevron_left.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
\ No newline at end of file diff --git a/mobile-widgets/qml/icons/expand_less.svg b/mobile-widgets/qml/icons/expand_less.svg new file mode 100644 index 000000000..cf5bbc9af --- /dev/null +++ b/mobile-widgets/qml/icons/expand_less.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
\ No newline at end of file diff --git a/mobile-widgets/qml/icons/expand_more.svg b/mobile-widgets/qml/icons/expand_more.svg new file mode 100644 index 000000000..8a835b75c --- /dev/null +++ b/mobile-widgets/qml/icons/expand_more.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
\ No newline at end of file diff --git a/mobile-widgets/qml/icons/local_offer.svg b/mobile-widgets/qml/icons/local_offer.svg new file mode 100644 index 000000000..5ab8c6730 --- /dev/null +++ b/mobile-widgets/qml/icons/local_offer.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"/></svg>
\ No newline at end of file diff --git a/mobile-widgets/qml/icons/redo.svg b/mobile-widgets/qml/icons/redo.svg new file mode 100644 index 000000000..d90527266 --- /dev/null +++ b/mobile-widgets/qml/icons/redo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>
\ No newline at end of file diff --git a/mobile-widgets/qml/icons/undo.svg b/mobile-widgets/qml/icons/undo.svg new file mode 100644 index 000000000..59d5ef9d9 --- /dev/null +++ b/mobile-widgets/qml/icons/undo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>
\ No newline at end of file diff --git a/mobile-widgets/qml/mobile-resources.qrc b/mobile-widgets/qml/mobile-resources.qrc index 5272862ef..f7075556b 100644 --- a/mobile-widgets/qml/mobile-resources.qrc +++ b/mobile-widgets/qml/mobile-resources.qrc @@ -59,11 +59,14 @@ <!-- ********** icons ********** --> <file>icons/account_circle.svg</file> <file>icons/Blue_gps.svg</file> + <file>icons/chevron_left.svg</file> <file>icons/cloud_sync.svg</file> <file>icons/contact_support.svg</file> <file>icons/Dark_gps.svg</file> <file alias="icons/downloadDC.svg">icons/button-download-dc_icon.svg</file> <file alias="icons/downloadDC-black.svg">icons/button-download-dc-black_icon.svg</file> + <file>icons/expand_less.svg</file> + <file>icons/expand_more.svg</file> <file>icons/ic_adb.svg</file> <file>icons/ic_add.svg</file> <file>icons/ic_add_location.svg</file> @@ -83,9 +86,12 @@ <file>icons/ic_star_border.svg</file> <file>icons/ic_sync.svg</file> <file>icons/Pink_gps.svg</file> + <file>icons/redo.svg</file> <file>icons/sigma.svg</file> + <file>icons/undo.svg</file> <file alias="icons/ic_filter_list.svg">icons/ic_filter_list_24px.svg</file> <file alias="icons/ic_sort.svg">icons/ic_sort_24px.svg</file> + <file alias="icons/trip_details.svg">icons/local_offer.svg</file> <!-- ********** kirigami icons ********** --> <file alias="icons/application-menu.svg">kirigami/icons/application-menu.svg</file> |