QML UI: fix incorrect icon references

Not sure why this has worked in the past - it was simply wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2018-04-16 17:28:53 -07:00
parent bb03bd862b
commit d2d46d848a
5 changed files with 37 additions and 37 deletions

View file

@ -141,7 +141,7 @@ Kirigami.Page {
property QtObject deleteAction: Kirigami.Action {
text: qsTr("Delete dive")
icon {
name: "trash-empty"
name: ":/icons/trash-empty"
}
onTriggered: {
var deletedId = currentItem.modelData.dive.id
@ -158,7 +158,7 @@ Kirigami.Page {
property QtObject cancelAction: Kirigami.Action {
text: qsTr("Cancel edit")
icon {
name: "dialog-cancel"
name: ":/icons/dialog-cancel"
}
onTriggered: {
endEditMode()
@ -168,7 +168,7 @@ Kirigami.Page {
property QtObject mapAction: Kirigami.Action {
text: qsTr("Show on map")
icon {
name: "gps"
name: ":/icons/gps"
}
onTriggered: {
showMap()
@ -178,7 +178,7 @@ Kirigami.Page {
actions.main: Kirigami.Action {
icon {
name: state !== "view" ? "document-save" : "document-edit"
name: state !== "view" ? ":/icons/document-save" : ":/icons/document-edit"
color: subsurfaceTheme.primaryColor
}
onTriggered: {

View file

@ -117,31 +117,31 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: ratingText.verticalCenter
source: (dive.rating >= 1) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
source: (dive.rating >= 1) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
}
Kirigami.Icon {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: ratingText.verticalCenter
source: (dive.rating >= 2) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
source: (dive.rating >= 2) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
}
Kirigami.Icon {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: ratingText.verticalCenter
source: (dive.rating >= 3) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
source: (dive.rating >= 3) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
}
Kirigami.Icon {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: ratingText.verticalCenter
source: (dive.rating >= 4) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
source: (dive.rating >= 4) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
}
Kirigami.Icon {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: ratingText.verticalCenter
source: (dive.rating === 5) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
source: (dive.rating === 5) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
}
}
Row {
@ -160,31 +160,31 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: visibilityText.verticalCenter
source: (dive.visibility >= 1) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
source: (dive.visibility >= 1) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
}
Kirigami.Icon {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: visibilityText.verticalCenter
source: (dive.visibility >= 2) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
source: (dive.visibility >= 2) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
}
Kirigami.Icon {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: visibilityText.verticalCenter
source: (dive.visibility >= 3) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
source: (dive.visibility >= 3) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
}
Kirigami.Icon {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: visibilityText.verticalCenter
source: (dive.visibility >= 4) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
source: (dive.visibility >= 4) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
}
Kirigami.Icon {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: visibilityText.verticalCenter
source: (dive.visibility === 5) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
source: (dive.visibility === 5) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
}
}

View file

@ -210,7 +210,7 @@ Kirigami.ScrollablePage {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
source: "trash-empty"
source: ":/icons/trash-empty"
}
MouseArea {
anchors.fill: parent
@ -403,7 +403,7 @@ Kirigami.ScrollablePage {
property QtObject downloadFromDCAction: Kirigami.Action {
icon {
name: "downloadDC"
name: ":/icons/downloadDC"
color: subsurfaceTheme.primaryColor
}
onTriggered: {
@ -414,7 +414,7 @@ Kirigami.ScrollablePage {
property QtObject addDiveAction: Kirigami.Action {
icon {
name: "list-add"
name: ":/icons/list-add"
}
onTriggered: {
startAddDive()

View file

@ -115,7 +115,7 @@ Kirigami.ApplicationWindow {
actions: [
Kirigami.Action {
icon {
name: "icons/ic_home.svg"
name: ":/icons/ic_home.svg"
}
text: qsTr("Dive list")
onTriggered: {
@ -133,7 +133,7 @@ Kirigami.ApplicationWindow {
},
Kirigami.Action {
icon {
name: "icons/map-globe.svg"
name: ":/icons/map-globe.svg"
}
text: mapPage.title
onTriggered: {
@ -142,12 +142,12 @@ Kirigami.ApplicationWindow {
},
Kirigami.Action {
icon {
name: "icons/ic_sync.svg"
name: ":/icons/ic_sync.svg"
}
text: qsTr("Dive management")
Kirigami.Action {
icon {
name: "icons/ic_add.svg"
name: ":/icons/ic_add.svg"
}
text: qsTr("Add dive manually")
enabled: manager.credentialStatus === QMLManager.CS_VERIFIED || manager.credentialStatus === QMLManager.CS_NOCLOUD
@ -160,7 +160,7 @@ Kirigami.ApplicationWindow {
Kirigami.Action {
// this of course assumes a white background - theming means this needs to change again
icon {
name: "icons/downloadDC-black.svg"
name: ":/icons/downloadDC-black.svg"
}
text: qsTr("Download from DC")
enabled: true
@ -172,7 +172,7 @@ Kirigami.ApplicationWindow {
}
Kirigami.Action {
icon {
name: "icons/ic_add_location.svg"
name: ":/icons/ic_add_location.svg"
}
text: qsTr("Apply GPS fixes")
onTriggered: {
@ -181,7 +181,7 @@ Kirigami.ApplicationWindow {
}
Kirigami.Action {
icon {
name: "icons/cloud_sync.svg"
name: ":/icons/cloud_sync.svg"
}
text: qsTr("Manual sync with cloud")
enabled: manager.credentialStatus === QMLManager.CS_VERIFIED || manager.credentialStatus === QMLManager.CS_NOCLOUD
@ -202,7 +202,7 @@ Kirigami.ApplicationWindow {
}
Kirigami.Action {
icon {
name: syncToCloud ? "icons/ic_cloud_off.svg" : "icons/ic_cloud_done.svg"
name: syncToCloud ? ":/icons/ic_cloud_off.svg" : ":/icons/ic_cloud_done.svg"
}
text: syncToCloud ? qsTr("Disable auto cloud sync") : qsTr("Enable auto cloud sync")
enabled: manager.credentialStatus !== QMLManager.CS_NOCLOUD
@ -218,14 +218,14 @@ if you have network connectivity and want to sync your data to cloud storage."),
},
Kirigami.Action {
icon {
name: "icons/ic_place.svg"
name: ":/icons/ic_place.svg"
}
text: qsTr("GPS")
visible: true
Kirigami.Action {
icon {
name: "icons/ic_cloud_upload.svg"
name: ":/icons/ic_cloud_upload.svg"
}
text: qsTr("Upload GPS data")
onTriggered: {
@ -236,7 +236,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
Kirigami.Action {
icon {
name: "icons/ic_cloud_download.svg"
name: ":/icons/ic_cloud_download.svg"
}
text: qsTr("Download GPS data")
onTriggered: {
@ -247,7 +247,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
Kirigami.Action {
icon {
name:"icons/ic_gps_fixed.svg"
name:":/icons/ic_gps_fixed.svg"
}
text: qsTr("Show GPS fixes")
onTriggered: {
@ -260,7 +260,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
Kirigami.Action {
icon {
name: "icons/ic_clear.svg"
name: ":/icons/ic_clear.svg"
}
text: qsTr("Clear GPS cache")
onTriggered: {
@ -271,7 +271,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
Kirigami.Action {
icon {
name: locationServiceEnabled ? "icons/ic_location_off.svg" : "icons/ic_place.svg"
name: locationServiceEnabled ? ":/icons/ic_location_off.svg" : ":/icons/ic_place.svg"
}
text: locationServiceEnabled ? qsTr("Disable location service") : qsTr("Run location service")
onTriggered: {
@ -282,7 +282,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
},
Kirigami.Action {
icon {
name: "icons/ic_info_outline.svg"
name: ":/icons/ic_info_outline.svg"
}
text: qsTr("About")
onTriggered: {
@ -293,7 +293,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
},
Kirigami.Action {
icon {
name: "icons/ic_settings.svg"
name: ":/icons/ic_settings.svg"
}
text: qsTr("Settings")
onTriggered: {
@ -304,7 +304,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
},
Kirigami.Action {
icon {
name: "icons/ic_adb.svg"
name: ":/icons/ic_adb.svg"
}
text: qsTr("Developer")
visible: manager.developer
@ -326,7 +326,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
},
Kirigami.Action {
icon {
name: "icons/ic_help_outline.svg"
name: ":/icons/ic_help_outline.svg"
}
text: qsTr("Help")
onTriggered: {
@ -335,7 +335,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
}
] // end actions
Kirigami.Icon {
source: "icons/" + (subsurfaceTheme.currentTheme != "" ? subsurfaceTheme.currentTheme : "Blue") + "_gps.svg"
source: ":/icons/" + (subsurfaceTheme.currentTheme != "" ? subsurfaceTheme.currentTheme : "Blue") + "_gps.svg"
enabled: false
visible: locationServiceEnabled
}

View file

@ -42,7 +42,7 @@
<qresource prefix="/">
<file>qtquickcontrols2.conf</file>
</qresource>
<qresource prefix="/org/kde/kirigami">
<qresource>
<file alias="icons/map-globe.svg">kirigami/icons/map-globe.svg</file>
<file alias="icons/go-next-symbolic.svg">kirigami/icons/go-next.svg</file>
<file alias="icons/go-previous-symbolic.svg">kirigami/icons/go-previous.svg</file>