Jujuyeh / webapp-creator

Ubuntu Touch Webapp Creator
9 stars 4 forks source link

WAC assumes svg App Icons are jpg #35

Open cibersheep opened 6 years ago

cibersheep commented 6 years ago

As reported by a user, when selecting an svg as app icon, it doesn't get copies in the click. Reason might be:

svg icon is passed as xx + .jpg

file:///opt/click.ubuntu.com/webapp-creator.jujuyeh/1.3.02/share/qml/webapp-creator/ImportPage.qml:51: TypeError: Type error
qml: Charged
qml: file:///home/phablet/.cache/webapp-creator.jujuyeh/HubIncoming/57/submit_icon_cg1p60649486c_th.jpg
file:///opt/click.ubuntu.com/webapp-creator.jujuyeh/1.3.02/share/qml/webapp-creator/ImportPage.qml:49: TypeError: Cannot read property of null
cibersheep commented 6 years ago

Update: User was thinking using an svg but it was a jpg. .desktop assumes is svg and don't copy the image.

We need a clear solution with this:

· A ListModelFolder in galley folder? Dangerous as app is unconfined · Filtering Gallery pictures by type? I don't think is implemented · Giving error when importing jpg / jpeg. We need to implement this · Other?

mateosalta commented 6 years ago

re-save as png? Looks like there is a hacky way of saving from painted element? https://forum.qt.io/topic/3864/how-to-save-an-image-from-qml-image-element/4 - might be good if it works

Otherwise we should probably go the error route