How to add icon to new widget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I would like to know, how one can add an icon to widgets that are
added on the fly using
afm-util tool.

This is what I tried:

# cat config.xml

?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"; id="xyz" version="0.3">
  <name>xyz</name>
  <icon src="icon.svg"/>
  <content src="index.html" type="text/html"/>
  <description>abcde</description>
  <author>xyz&gt;</author>
  <license>APL 2.0</license>
  <feature name="urn:AGL:widget:required-permission">
    <param name="urn:AGL:permission::public:no-htdocs" value="required" />
  </feature>
  <feature name="urn:AGL:widget:required-api">
    <param name="windowmanager" value="ws" />
    <param name="homescreen" value="ws" />
  </feature>
</widget>

With above config.xml created a widget file:

#wgtpkg-pack -f -o xyz.widget xyz

where folder xyz contains:
#ls xyz
config.xml  icon.svg  index.html

I could install and run the xyz.widget successfully but it didn't show
the icon mentioned in
<icon src="icon.svg"/> in config.xml.

Also, Jose pointed out that icons for default widgets are hard-coded
in homescreen/launcher code .
So, tried following.

Copied the xyz_active.svg and xyz_inactive.svg files at
"git/launcher/qml/images" and then

diff --git a/launcher/qml/images/images.qrc b/launcher/qml/images/images.qrc
index cef5f21..2abc53d 100644
--- a/launcher/qml/images/images.qrc
+++ b/launcher/qml/images/images.qrc
@@ -31,5 +31,7 @@
         <file>blank_inactive.svg</file>
         <file>plus_active.svg</file>
         <file>plus_inactive.svg</file>
+        <file>congo_active.svg</file>
+        <file>congo_inactive.svg</file>
     </qresource>

alone with it, bump the version for launcher in its config.xml file
from 0.1 to 0.2.

With above changes , booted the QEMU image and install xyz.widget on the fly.
But , still don't see the icon changed for new widget xyz on AGL's homescreen .

So, wanted to know how can an icons(given by icon src="icon.svg) be
reflected for new widget ?
or
We should just live with default icon for new widget which is first
letter of widget name ?

Thanks
-Amit
_______________________________________________
automotive-discussions mailing list
automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux