summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2019-01-23 00:05:30 +0100
committermvglasow <michael -at- vonglasow.com>2019-01-23 00:05:30 +0100
commit7cf1c946edbf828631d44934993530da05d93711 (patch)
tree4501d0ad571801629dcc7fc67fc9754e02b7db11
parentd8397ee8a5dfabc368aa19700acfbdb2dfc95504 (diff)
downloadnavit-7cf1c946edbf828631d44934993530da05d93711.tar.gz
Add:gui:New icons for toggle_announcer OSD
Background is now fully transparent by default Default icons are now sound_on and sound_off, respectively BUG: icon is not found on Android Signed-off-by: mvglasow <michael -at- vonglasow.com>
-rw-r--r--navit/icons/sound_off.svg122
-rw-r--r--navit/icons/sound_on.svg130
-rw-r--r--navit/osd/core/osd_core.c9
-rw-r--r--navit/xslt/osd_minimum.xslt2
4 files changed, 258 insertions, 5 deletions
diff --git a/navit/icons/sound_off.svg b/navit/icons/sound_off.svg
new file mode 100644
index 000000000..f1d3d7e5a
--- /dev/null
+++ b/navit/icons/sound_off.svg
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="gui_sound_off.svg"
+ inkscape:export-filename="/home/michael/src/navit-artwork/gui_sound_off.png"
+ inkscape:export-xdpi="134.99994"
+ inkscape:export-ydpi="134.99994">
+ <defs
+ id="defs4">
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath428">
+ <path
+ inkscape:connector-curvature="0"
+ d="M 0,96 96,96 96,0 0,0 0,96 z"
+ id="path430" />
+ </clipPath>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="15.8125"
+ inkscape:cx="24.221344"
+ inkscape:cy="24"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1280"
+ inkscape:window-height="955"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1">
+ <sodipodi:guide
+ orientation="0,1"
+ position="0,40"
+ id="guide2985" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="0,8"
+ id="guide2987" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="8,0"
+ id="guide2989" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="40,0"
+ id="guide2991" />
+ <inkscape:grid
+ type="xygrid"
+ id="grid3763"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1004.3622)">
+ <rect
+ style="fill:#000000;fill-opacity:0.62745098;stroke:none"
+ id="rect2993"
+ width="48"
+ height="48.000019"
+ x="3.5527137e-15"
+ y="1004.3622"
+ rx="4" />
+ <g
+ id="g424"
+ transform="matrix(0.45714286,0,0,-0.45714286,2.0572799,1050.3049)"
+ style="fill:#ffffff;fill-opacity:1">
+ <g
+ id="g426"
+ clip-path="url(#clipPath428)"
+ style="fill:#ffffff;fill-opacity:1">
+ <g
+ id="g432"
+ transform="translate(58.0527,46.4707)"
+ style="fill:#ffffff;fill-opacity:1">
+ <path
+ d="m 0,0 c -0.104,-15.984 -1.828,-28.715 -3.955,-28.715 -1.749,0 -4.147,8.621 -5.042,20.559 l -11.614,-10.487 c 4.938,-7.257 10.408,-14.828 11.783,-14.828 l 5.769,0 c 3.811,0 6.675,15.751 6.675,35.077 L 3.603,3.252 0,0 z m -32.653,-11.591 0.454,0 24.226,21.882 c -0.324,0.313 -0.673,0.584 -1.037,0.804 0.896,12.018 3.293,20.676 5.055,20.676 1.453,0 2.711,-5.925 3.41,-14.766 l 3.241,2.931 c -1.102,9.969 -3.124,16.593 -5.6,16.593 l -5.924,0 c -1.867,0 -10.254,-13.159 -15.619,-21.883 l -8.206,0 c -2.087,0 -3.786,-5.82 -3.786,-13.118 0,-7.298 1.699,-13.119 3.786,-13.119 m 51.889,42.026 -61.91,-55.96 3.33,-3.994 61.912,55.964 -3.332,3.99 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path434"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/navit/icons/sound_on.svg b/navit/icons/sound_on.svg
new file mode 100644
index 000000000..ebf3257fb
--- /dev/null
+++ b/navit/icons/sound_on.svg
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="gui_sound.svg"
+ inkscape:export-filename="/home/michael/src/navit-artwork/gui_sound.png"
+ inkscape:export-xdpi="134.99994"
+ inkscape:export-ydpi="134.99994">
+ <defs
+ id="defs4">
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath428">
+ <path
+ inkscape:connector-curvature="0"
+ d="M 0,96 96,96 96,0 0,0 0,96 z"
+ id="path430" />
+ </clipPath>
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath416">
+ <path
+ inkscape:connector-curvature="0"
+ d="M 0,96 96,96 96,0 0,0 0,96 z"
+ id="path418" />
+ </clipPath>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="15.8125"
+ inkscape:cx="33.233202"
+ inkscape:cy="24"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1280"
+ inkscape:window-height="955"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1">
+ <sodipodi:guide
+ orientation="0,1"
+ position="0,40"
+ id="guide2985" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="0,8"
+ id="guide2987" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="8,0"
+ id="guide2989" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="40,0"
+ id="guide2991" />
+ <inkscape:grid
+ type="xygrid"
+ id="grid3763"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1004.3622)">
+ <rect
+ style="fill:#000000;fill-opacity:0.62745098;stroke:none"
+ id="rect2993"
+ width="48"
+ height="48.000019"
+ x="3.5527137e-15"
+ y="1004.3622"
+ rx="4" />
+ <g
+ id="g412"
+ transform="matrix(0.45688831,0,0,-0.45688831,2.0694068,1050.2926)"
+ style="fill:#ffffff;fill-opacity:1">
+ <g
+ id="g414"
+ clip-path="url(#clipPath416)"
+ style="fill:#ffffff;fill-opacity:1">
+ <g
+ id="g420"
+ transform="translate(46.6484,17.7441)"
+ style="fill:#ffffff;fill-opacity:1">
+ <path
+ d="m 0,0 c -1.765,0 -4.169,8.674 -5.072,20.68 2.455,1.502 4.195,5.218 4.195,9.575 0,4.368 -1.74,8.073 -4.195,9.576 0.903,12.018 3.307,20.68 5.072,20.68 2.202,0 3.98,-13.544 3.98,-30.256 C 3.98,13.559 2.202,0 0,0 m 1.057,65.275 -5.952,0 c -1.865,0 -10.29,-13.161 -15.671,-21.886 l -8.239,0 c -2.088,0 -3.789,-5.83 -3.789,-13.134 0,-7.304 1.701,-13.132 3.789,-13.132 l 4.435,0 0,-0.047 2.96,0 c 5.412,-8.205 14.68,-21.84 16.515,-21.84 l 5.791,0 c 3.827,0 6.702,15.76 6.702,35.094 0,19.336 -2.725,34.945 -6.541,34.945 M 11.629,33.936 c 1.152,-2.499 1.133,-5.729 -0.049,-8.862 l 3.492,-1.32 c 1.535,4.064 1.518,8.344 -0.049,11.744 l -3.394,-1.562 z m 7.662,7.843 c 1.479,-3.706 2.629,-7.724 2.629,-11.744 0,-4.019 -1.15,-8.099 -2.629,-11.805 l 3.822,-1.328 c 1.782,4.377 2.959,8.621 2.959,13.327 0,4.618 -1.029,9.16 -2.777,13.508 l -4.004,-1.958 z m 11.105,12.357 -3.765,-2.21 C 29.59,45.111 31.16,37.581 31.16,30.08 c 0,-7.5 -1.57,-15.031 -4.529,-21.846 l 3.765,-2.211 c 3.213,7.518 4.901,15.825 4.901,24.057 0,8.247 -1.688,16.54 -4.901,24.056"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path422"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/navit/osd/core/osd_core.c b/navit/osd/core/osd_core.c
index 5450a4203..512031cad 100644
--- a/navit/osd/core/osd_core.c
+++ b/navit/osd/core/osd_core.c
@@ -2205,8 +2205,8 @@ static void osd_nav_toggle_announcer_draw(struct osd_priv_common *opc, struct na
int do_draw = opc->osd_item.do_draw;
struct graphics_image *gr_image;
char *path;
- char *gui_sound_off = "gui_sound_off";
- char *gui_sound_on = "gui_sound";
+ char *sound_off = "sound_off";
+ char *sound_on = "sound_on";
struct attr attr, speechattr;
if (!navit_get_attr(navit, attr_speech, &speechattr, NULL)) {
@@ -2229,9 +2229,9 @@ static void osd_nav_toggle_announcer_draw(struct osd_priv_common *opc, struct na
graphics_draw_rectangle(opc->osd_item.gr, opc->osd_item.graphic_bg, &p, opc->osd_item.w, opc->osd_item.h);
if (this->active)
- path = g_strdup_printf(this->icon_src, gui_sound_on);
+ path = g_strdup_printf(this->icon_src, sound_on);
else
- path = g_strdup_printf(this->icon_src, gui_sound_off);
+ path = g_strdup_printf(this->icon_src, sound_off);
gr_image = graphics_image_new_scaled(opc->osd_item.gr, path, this->icon_w, this->icon_h);
if (!gr_image) {
@@ -2280,6 +2280,7 @@ static struct osd_priv *osd_nav_toggle_announcer_new(struct navit *nav, struct o
meth->set_attr = set_std_osd_attr;
osd_set_std_attr(attrs, &opc->osd_item, 0);
+ opc->osd_item.color_bg.a = 0x0000;
this->icon_w = -1;
this->icon_h = -1;
diff --git a/navit/xslt/osd_minimum.xslt b/navit/xslt/osd_minimum.xslt
index 5d37323f4..2ce4d8f32 100644
--- a/navit/xslt/osd_minimum.xslt
+++ b/navit/xslt/osd_minimum.xslt
@@ -22,7 +22,7 @@
<osd type="text" label="${{tracking.item.street_name_systematic}}${{tracking.item.street_name}}" x="0" y="{round(-14*number($OSD_SIZE))}" w="100%" h="{round(14*number($OSD_SIZE))}" font_size="{round(200*number($OSD_SIZE))}" enable_expression="vehicle.position_valid"/>
<xsl:text>&#x0A; </xsl:text>
<!-- TODO does this need an icon_src attribute? -->
- <osd type="toggle_announcer" x="{round(-(number($ICON_BIG)+8*number($OSD_SIZE)))}" y="{round(62*number($OSD_SIZE))}"/>
+ <osd type="toggle_announcer" icon_src="%s_{number($ICON_BIG)}_{number($ICON_BIG)}.png" x="{round(-(number($ICON_BIG)+8*number($OSD_SIZE)))}" y="{round(62*number($OSD_SIZE))}"/>
<xsl:text>&#x0A; </xsl:text>
<!-- TODO implement
<osd type="button" src="gui_zoom_manual_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="autozoom_active=0" x="0" y="0" osd_configuration="1" use_overlay="{$OSD_USE_OVERLAY}" enable_expression="autozoom_active!=0"/>