How to refrence theme icons from SilicaWebView (browser)??

asked 2016-06-06 19:42:59 +0300

mobilitio gravatar image

Hello,

I'm writing a help page for my app, and found out that using a (Silica)WebView is the way to go. Just write a HTML page for your help. The QML app refers into standard icons like :

IconButton {
                    width: parent.width/lineitems
                    icon.source: "image://theme/icon-l-up"
}

I'd like to refer to the same icons on the help page that describes the usage of the app; On the Jolla emulator this works from the html file loaded to SilicaWebView:

  <li><img src="/usr/share/themes/jolla-ambient/meegotouch/icons/icon-l-up.png" />UP</li>

..but it doesn't on my physical Jolla device, because /usr/share/themes/jolla-ambient/meegotouch/ is empty.

I'd prefer to have a symbolic link to directories where I can find the theme icons I used QML (and emulator). At the moment I'm using "-dismiss", "-flag","-keyboard", "-up", "-down","-delete", "toggle-on", "toggle-off".

Any idea how this can be done appropriately, or change this to a feature-request?

I do have the option to include the icons in my package, but it'd fix my icons and the app wouldn't change to the Theme.

edit retag flag offensive close delete

Comments

@mobilitio - the correct path for icons is /usr/share/themes/sailfish-default/meegotouch/z1.0/icons/ also, some other icons (like camera icons) are found in /usr/share/themes/sailfish-default/meegotouch/icons

Spam Hunter ( 2016-06-06 21:45:00 +0300 )edit

Thank you @Markkyboy! The correct paths work on Jolla device (running 2.0.1.11 Taalojärvi). My emulator is running 2.0.0.10 (Saimaa). I get broken images paths now on emulator with sailfish-default.

Then, obviously, no URI scheme works in SilicaWebView (or whatever "image:" is)?

mobilitio ( 2016-06-07 02:23:40 +0300 )edit

Cool, pleased to be of some help to you. I don't use the SDK or emulator. I should also declare, I'm no expert with most of this 'stuff'. The few apps I've made are very basic and have come about through tinkering and are written and built entirely on the phone via SSH. I don't know much about SilicaWebView, other than many complain about it, especially in the jolla-email app.

Spam Hunter ( 2016-06-07 15:44:20 +0300 )edit

If you update your SDK to the last version the emulator will run then 2.0.1.11.

SilicaWebView is nice (it has a lot of undocumented features) but it's based on QTWebkit. The QTWebkit has some bugs :(

Dylan Van Assche ( 2016-06-07 18:47:37 +0300 )edit