diff options
author | Wildemann Stefan <stefan.wildemann@corpuls.com> | 2019-09-23 16:46:18 +0200 |
---|---|---|
committer | Wildemann Stefan <stefan.wildemann@corpuls.com> | 2019-09-25 13:02:17 +0200 |
commit | 755cbb73d41eb413e98974b18a1806a12a82aec8 (patch) | |
tree | 77a229a21e90462ecdc9ff27ffe6b0f2d32bc284 | |
parent | 7115f2a8a3ad56ead1b1ec2ef791888b2a860758 (diff) | |
download | navit-755cbb73d41eb413e98974b18a1806a12a82aec8.tar.gz |
enhancement:layout:set default icon size
Set default icon size to 22x22 in the layouts and enable tunnel
transparency in car layout.
Change sailfish xslt to reflect changes
-rw-r--r-- | navit/color.h | 5 | ||||
-rw-r--r-- | navit/navit_layout_bike_shipped.xml | 2 | ||||
-rw-r--r-- | navit/navit_layout_car_android_shipped.xml | 2 | ||||
-rw-r--r-- | navit/navit_layout_car_dark_shipped.xml | 2 | ||||
-rw-r--r-- | navit/navit_layout_car_shipped.xml | 2 | ||||
-rw-r--r-- | navit/navit_layout_car_simple_shipped.xml | 2 | ||||
-rw-r--r-- | navit/navit_layout_th_shipped.xml | 2 | ||||
-rw-r--r-- | navit/xslt/sailfish_svg.xslt | 17 |
8 files changed, 20 insertions, 14 deletions
diff --git a/navit/color.h b/navit/color.h index 83470781a..067702ebe 100644 --- a/navit/color.h +++ b/navit/color.h @@ -34,8 +34,9 @@ struct color { #define COLOR_TRANSPARENT ((struct color) {COLOR_TRANSPARENT_}) #define COLOR_FMT "0x%x,0x%x,0x%x,0x%x" #define COLOR_ARGS(c) (c).r,(c).g,(c).b,(c).a -/*default alpha value to apply for all things flagged AF_UNDERGROUND*/ -#define UNDERGROUND_ALPHA_ 0x3333 +/*default alpha value to apply for all things flagged AF_UNDERGROUND + *use solid color to not change default behaviour*/ +#define UNDERGROUND_ALPHA_ 0xFFFF #define COLOR_IS_SAME(c1,c2) ((c1).r==(c2).r && (c1).g==(c2).g && (c1).b==(c2).b && (c1).a==(c2).a) #define COLOR_IS_WHITE(c) COLOR_IS_SAME(c, COLOR_WHITE) diff --git a/navit/navit_layout_bike_shipped.xml b/navit/navit_layout_bike_shipped.xml index dd5a9943a..ae30093dd 100644 --- a/navit/navit_layout_bike_shipped.xml +++ b/navit/navit_layout_bike_shipped.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Bike" color="#ffefb7" font="Liberation Sans"> +<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Bike" color="#ffefb7" icon_w="22" icon_h="22" font="Liberation Sans"> <cursor w="26" h="26"> <itemgra> <circle color="#0000ff" radius="24" width="2"> diff --git a/navit/navit_layout_car_android_shipped.xml b/navit/navit_layout_car_android_shipped.xml index 046d52d37..256ab3db2 100644 --- a/navit/navit_layout_car_android_shipped.xml +++ b/navit/navit_layout_car_android_shipped.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Car-Android" color="#fef9ee" font="Liberation Sans"> +<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Car-Android" color="#fef9ee" icon_w="22" icon_h="22" font="Liberation Sans"> <cursor w="57" h="57"> <itemgra speed_range="-2"> <polyline color="#00BC00" radius="0" width="4"> diff --git a/navit/navit_layout_car_dark_shipped.xml b/navit/navit_layout_car_dark_shipped.xml index b24978a57..61407837c 100644 --- a/navit/navit_layout_car_dark_shipped.xml +++ b/navit/navit_layout_car_dark_shipped.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Car-dark" daylayout="Car" color="#011001"> +<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Car-dark" daylayout="Car" icon_w="22" icon_h="22" color="#011001"> <cursor w="57" h="57"> <itemgra speed_range="-2"> <polyline color="#0000BC" radius="0" width="4"> diff --git a/navit/navit_layout_car_shipped.xml b/navit/navit_layout_car_shipped.xml index e772ab9f4..e24614dee 100644 --- a/navit/navit_layout_car_shipped.xml +++ b/navit/navit_layout_car_shipped.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Car" nightlayout="Car-dark" color="#ffefb7" font="Liberation Sans"> +<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Car" nightlayout="Car-dark" color="#ffefb7" icon_w="22" icon_h="22" underground_alpha="0x33" font="Liberation Sans"> <cursor w="57" h="57"> <itemgra speed_range="-2"> <polyline color="#00BC00" radius="0" width="4"> diff --git a/navit/navit_layout_car_simple_shipped.xml b/navit/navit_layout_car_simple_shipped.xml index 4029833f5..82d730a6e 100644 --- a/navit/navit_layout_car_simple_shipped.xml +++ b/navit/navit_layout_car_simple_shipped.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Car-simple" color="#839ea9"> +<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Car-simple" icon_w="22" icon_h="22" color="#839ea9"> <layer name="polygon"> <itemgra item_types="poly_town" order="8-"> <polygon color="#6b8091"/> diff --git a/navit/navit_layout_th_shipped.xml b/navit/navit_layout_th_shipped.xml index aebc79d6e..bf4ad6731 100644 --- a/navit/navit_layout_th_shipped.xml +++ b/navit/navit_layout_th_shipped.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="T@H" font="Liberation Sans"> +<layout xmlns:xi="http://www.w3.org/2001/XInclude" name="T@H" icon_w="22" icon_h="22" font="Liberation Sans"> <cursor w="26" h="26"> <itemgra> <circle color="#0000ff" radius="24" width="2"> diff --git a/navit/xslt/sailfish_svg.xslt b/navit/xslt/sailfish_svg.xslt index 7203ed34d..63d384a5a 100644 --- a/navit/xslt/sailfish_svg.xslt +++ b/navit/xslt/sailfish_svg.xslt @@ -12,6 +12,17 @@ </xsl:copy> </xsl:template> + <!-- Force default cursor size of all layouts, force tunnel transparency --> + <xsl:template match="/layout"> + <xsl:copy> + <xsl:apply-templates select="@*"/> + <xsl:attribute name="icon_w">16</xsl:attribute> + <xsl:attribute name="icon_h">16</xsl:attribute> + <xsl:attribute name="underground_alpha">0x33</xsl:attribute> + <xsl:apply-templates select="node()"/> + </xsl:copy> + </xsl:template> + <!-- Force all png icons to svg and add w and h if not exist --> <xsl:template match="icon"> <xsl:copy> @@ -21,12 +32,6 @@ <xsl:value-of select="concat(substring(@src,1, string-length(@src)-3),'svg')"/> </xsl:attribute> </xsl:if> - <xsl:if test="not(@h)"> - <xsl:attribute name="h">15</xsl:attribute> - </xsl:if> - <xsl:if test="not(@w)"> - <xsl:attribute name="w">15</xsl:attribute> - </xsl:if> <xsl:apply-templates select="node()"/> </xsl:copy> </xsl:template> |