diff options
author | rikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-03-13 22:55:40 +0000 |
---|---|---|
committer | rikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-03-13 22:55:40 +0000 |
commit | aa4d6f87bb82a2970c613f8cf57b87606376ea31 (patch) | |
tree | 58506ced1cf158c6c515e1b5be1807deb9d5d095 /navit/xslt/osd_minimum.xslt | |
parent | 1061d3ab561e55e97b7380da697f5dbae029a608 (diff) | |
download | navit-aa4d6f87bb82a2970c613f8cf57b87606376ea31.tar.gz |
Fix:core:Update some XSLTs to better support different display sizes
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4344 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/xslt/osd_minimum.xslt')
-rw-r--r-- | navit/xslt/osd_minimum.xslt | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/navit/xslt/osd_minimum.xslt b/navit/xslt/osd_minimum.xslt index aad5c67a5..b44e55ab1 100644 --- a/navit/xslt/osd_minimum.xslt +++ b/navit/xslt/osd_minimum.xslt @@ -1,24 +1,18 @@ <?xml version="1.0"?> <xsl:transform version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude"> - <xsl:template match="/config/navit/osd[1]"> - <xsl:variable name="OSD_SIZE_"> - <xsl:choose> - <xsl:when test="string-length($OSD_SIZE)"><xsl:value-of select="$OSD_SIZE"/></xsl:when> - <xsl:otherwise>1</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <osd type="compass" enabled="yes" x="{round(-60*number($OSD_SIZE_))}" y="{round(-80*number($OSD_SIZE_))}" w="{round(60*number($OSD_SIZE_))}" h="{round(80*number($OSD_SIZE_))}" font_size="{round(200*number($OSD_SIZE_))}" osd_configuration="1"/> - <xsl:text>
 </xsl:text> - <osd type="text" label="${{navigation.item.destination_length[named]}}\n${{navigation.item.destination_time[arrival]}}" x="{round(-60*number($OSD_SIZE_))}" y="0" w="{round(60*number($OSD_SIZE_))}" h="{round(40*number($OSD_SIZE_))}" font_size="{round(200*number($OSD_SIZE_))}" osd_configuration="1"/> - <xsl:text>
 </xsl:text> - <osd type="navigation_next_turn" x="0" y="{round(-60*number($OSD_SIZE_))}" w="{round(60*number($OSD_SIZE_))}" h="{round(40*number($OSD_SIZE_))}" icon_src="%s_wh_{round(44*number($OSD_SIZE_))}_{round(44*number($OSD_SIZE_))}.png" osd_configuration="1"/> - <xsl:text>
 </xsl:text> - <osd type="text" label="${{navigation.item[1].length[named]}}" x="0" y="{round(-20*number($OSD_SIZE_))}" w="{round(60*number($OSD_SIZE_))}" h="{round(20*number($OSD_SIZE_))}" font_size="{round(200*number($OSD_SIZE_))}" osd_configuration="1"/> - <xsl:text>
 </xsl:text> - <osd type="button" src="gui_zoom_in_{round(48*number($OSD_SIZE_))}_{round(48*number($OSD_SIZE_))}.png" command="zoom_in()" x="0" y="0" osd_configuration="1"/> - <xsl:text>
 </xsl:text> - <osd type="button" src="gui_zoom_out_{round(48*number($OSD_SIZE_))}_{round(48*number($OSD_SIZE_))}.png" command="zoom_out()" x="0" y="{round(53*number($OSD_SIZE_))}" osd_configuration="1"/> - <xsl:text>
 </xsl:text> - <xsl:copy><xsl:copy-of select="@*|node()"/></xsl:copy> - </xsl:template> + <xsl:template match="/config/navit/osd[1]"> + <osd type="compass" enabled="yes" x="{round(-60*number($OSD_SIZE))}" y="{round(-80*number($OSD_SIZE))}" w="{round(60*number($OSD_SIZE))}" h="{round(80*number($OSD_SIZE))}" font_size="{round(200*number($OSD_SIZE))}" osd_configuration="1"/> + <xsl:text>
 </xsl:text> + <osd type="text" label="${{navigation.item.destination_length[named]}}\n${{navigation.item.destination_time[arrival]}}" x="{round(-60*number($OSD_SIZE))}" y="0" w="{round(60*number($OSD_SIZE))}" h="{round(40*number($OSD_SIZE))}" font_size="{round(200*number($OSD_SIZE))}" osd_configuration="1"/> + <xsl:text>
 </xsl:text> + <osd type="navigation_next_turn" x="0" y="{round(-60*number($OSD_SIZE))}" w="{round(60*number($OSD_SIZE))}" h="{round(40*number($OSD_SIZE))}" icon_src="%s_wh_{$ICON_BIG}_{$ICON_BIG}.png" osd_configuration="1"/> + <xsl:text>
 </xsl:text> + <osd type="text" label="${{navigation.item[1].length[named]}}" x="0" y="{round(-20*number($OSD_SIZE))}" w="{round(60*number($OSD_SIZE))}" h="{round(20*number($OSD_SIZE))}" font_size="{round(200*number($OSD_SIZE))}" osd_configuration="1"/> + <xsl:text>
 </xsl:text> + <osd type="button" src="gui_zoom_in_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="zoom_in()" x="0" y="0" osd_configuration="1"/> + <xsl:text>
 </xsl:text> + <osd type="button" src="gui_zoom_out_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="zoom_out()" x="0" y="{round(number($ICON_BIG)+16*number($OSD_SIZE))}" osd_configuration="1"/> + <xsl:text>
 </xsl:text> + <xsl:copy><xsl:copy-of select="@*|node()"/></xsl:copy> + </xsl:template> </xsl:transform> |