summaryrefslogtreecommitdiff
path: root/navit/xslt
diff options
context:
space:
mode:
authormdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2015-01-07 13:38:25 +0000
committermdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2015-01-07 13:38:25 +0000
commita8ac4b4a41506278b2f595ce08cbae0a569ab6ae (patch)
treeec5c516d77562ff15124ce96c0d67e459bb9e6bd /navit/xslt
parentfc8a3b2ca9ff61d6f7943d5de17d1989fd222e61 (diff)
downloadnavit-a8ac4b4a41506278b2f595ce08cbae0a569ab6ae.tar.gz
Add:port_android:Better image sizes for high dpi screens, scale icons consistently, scale dashes of dashed lines propotionally to other graphic parameters. Related to #1181.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5994 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/xslt')
-rw-r--r--navit/xslt/android.xslt17
1 files changed, 14 insertions, 3 deletions
diff --git a/navit/xslt/android.xslt b/navit/xslt/android.xslt
index ab0d114b5..0a5ee40b6 100644
--- a/navit/xslt/android.xslt
+++ b/navit/xslt/android.xslt
@@ -66,7 +66,7 @@
</xsl:template>
<xsl:template match="/config/navit/layout/layer/itemgra/child::*">
<xsl:copy>
- <xsl:copy-of select="@*[not(name()='text_size') and not(name()='width') and not(name()='radius') and not(name()='w') and not(name()='h') and not(name()='x') and not(name()='y')]"/>
+ <xsl:copy-of select="@*[not(name()='text_size') and not(name()='width') and not(name()='radius') and not(name()='w') and not(name()='h') and not(name()='x') and not(name()='y') and not(name()='dash')]"/>
<xsl:if test="@text_size">
<xsl:attribute name="text_size"><xsl:value-of select="round(number(@text_size)*number($OSD_SIZE))"/></xsl:attribute>
</xsl:if>
@@ -77,8 +77,8 @@
<xsl:attribute name="radius"><xsl:value-of select="round(number(@radius)*number($OSD_SIZE))"/></xsl:attribute>
</xsl:if>
<xsl:if test="name()='icon'">
- <xsl:attribute name="w"><xsl:value-of select="round(24.0*number($OSD_SIZE))"/></xsl:attribute>
- <xsl:attribute name="h"><xsl:value-of select="round(24.0*number($OSD_SIZE))"/></xsl:attribute>
+ <xsl:attribute name="w"><xsl:value-of select="$ICON_SMALL"/></xsl:attribute>
+ <xsl:attribute name="h"><xsl:value-of select="$ICON_SMALL"/></xsl:attribute>
</xsl:if>
<xsl:if test="@w and not(name()='icon')">
<xsl:attribute name="w"><xsl:value-of select="round(number(@w)*number($OSD_SIZE))"/></xsl:attribute>
@@ -93,6 +93,17 @@
<xsl:if test="@y">
<xsl:attribute name="y"><xsl:value-of select="round(number(@y)*number($OSD_SIZE))"/></xsl:attribute>
</xsl:if>
+ <xsl:if test="@offset">
+ <xsl:attribute name="offset"><xsl:value-of select="round(number(@offset)*number($OSD_SIZE))"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@dash">
+ <xsl:attribute name="dash">
+ <xsl:for-each select="tokenize(@dash,',')">
+ <xsl:value-of select="round(number(.)*number($OSD_SIZE))"/>
+ <xsl:if test="not(position() eq last())"><xsl:text>,</xsl:text></xsl:if>
+ </xsl:for-each>
+ </xsl:attribute>
+ </xsl:if>
</xsl:copy>
</xsl:template>
<xsl:template match="/config/navit/layout">