mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
0683d97636
commit
0720e74c1a
10 changed files with 29 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
1
mobile-widgets/qml/icons/chevron_left.svg
Normal file
1
mobile-widgets/qml/icons/chevron_left.svg
Normal file
|
@ -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>
|
After Width: | Height: | Size: 183 B |
1
mobile-widgets/qml/icons/expand_less.svg
Normal file
1
mobile-widgets/qml/icons/expand_less.svg
Normal file
|
@ -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>
|
After Width: | Height: | Size: 184 B |
1
mobile-widgets/qml/icons/expand_more.svg
Normal file
1
mobile-widgets/qml/icons/expand_more.svg
Normal file
|
@ -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>
|
After Width: | Height: | Size: 182 B |
1
mobile-widgets/qml/icons/local_offer.svg
Normal file
1
mobile-widgets/qml/icons/local_offer.svg
Normal file
|
@ -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>
|
After Width: | Height: | Size: 387 B |
1
mobile-widgets/qml/icons/redo.svg
Normal file
1
mobile-widgets/qml/icons/redo.svg
Normal file
|
@ -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>
|
After Width: | Height: | Size: 281 B |
1
mobile-widgets/qml/icons/undo.svg
Normal file
1
mobile-widgets/qml/icons/undo.svg
Normal file
|
@ -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>
|
After Width: | Height: | Size: 280 B |
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue