parser: ignore_in_mode attribute; watch additions

This commit is contained in:
galister
2025-08-03 17:26:34 +09:00
parent eaa81450b5
commit b2902f8f7f
9 changed files with 68 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
<theme>
<var key="border" value="2" />
<var key="kbd_color" value="#a6da95" />
<var key="set_color" value="#dddddd" />
<var key="set_color" value="#cad3f5" />
<var key="clock0_color" value="#cad3f5" />
<var key="clock0_size" value="46" />
@@ -18,6 +18,15 @@
<sprite color="~device_color" width="${size}" height="${size}" src="${src}" />
</template>
<template name="Set">
<div align_items="center" justify_content="center" flex_wrap="wrap" align_content="center">
<sprite width="40" height="40" color="~set_color" src="watch/set2.svg" />
<div position="absolute" margin_top="11" >
<label text="${name}" size="24" color="#000000" weight="bold" />
</div>
</div>
</template>
<elements>
<div width="400" height="200">
<rectangle width="100%" height="100%" padding="4" box_sizing="content_box" flex_wrap="wrap" gap="16" color="~bg_color">
@@ -38,14 +47,31 @@
</div>
<div width="10" height="100%" />
<div id="clock_alt" flex_direction="column" padding="4">
<div width="100%" padding="2" />
<label text="Paris" id="clock1_tz" color="~clock_alt1_color" size="~clock_alt_tz_size" weight="bold" />
<div width="100%" padding="2" />
<label text="23:59" id="clock1_time" color="~clock_alt1_color" size="~clock_alt_size" weight="bold" />
<label text="Chicago" id="clock2_tz" color="~clock_alt2_color" size="~clock_alt_tz_size" weight="bold" />
<div width="100%" padding="2" />
<label text="Chicago" id="clock2_tz" color="~clock_alt2_color" size="~clock_alt_tz_size" weight="bold" />
<label text="23:59" id="clock2_time" color="~clock_alt2_color" size="~clock_alt_size" weight="bold" />
</div>
</div>
<div width="100%" flex_direction="row">
<div id="btn_home">
<sprite color="~set_color" width="40" height="40" src="watch/home.svg" />
</div>
<div id="sets" ignore_in_mode="dev">
<!-- Will populate <Set> tags at runtime -->
</div>
<div ignore_in_mode="live">
<!-- Example sets for testing -->
<Set name="A" />
<Set name="B" />
<Set name="C" />
</div>
<div id="btn_edit">
<sprite color="~set_color" width="40" height="40" src="watch/edit.svg" />
</div>
</div>
</rectangle>
</div>
</elements>

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Material Symbols by Google - https://github.com/google/material-design-icons/blob/master/LICENSE --><path fill="white" d="m18.9 21l-5.475-5.475l2.1-2.1L21 18.9zM5.1 21L3 18.9L9.9 12l-1.7-1.7l-.7.7l-1.275-1.275v2.05l-.7.7L2.5 9.45l.7-.7h2.05L4 7.5l3.55-3.55q.5-.5 1.075-.725T9.8 3t1.175.225t1.075.725l-2.3 2.3L11 7.5l-.7.7L12 9.9l2.25-2.25q-.1-.275-.162-.575t-.063-.6q0-1.475 1.013-2.488t2.487-1.012q.375 0 .713.075t.687.225L16.45 5.75l1.8 1.8l2.475-2.475q.175.35.238.687t.062.713q0 1.475-1.012 2.488t-2.488 1.012q-.3 0-.6-.05t-.575-.175z"/></svg>

After

Width:  |  Height:  |  Size: 645 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Material Symbols by Google - https://github.com/google/material-design-icons/blob/master/LICENSE --><path fill="white" d="M4 21v-9.375L2.2 13L1 11.4L12 3l11 8.4l-1.2 1.575l-1.8-1.35V21zm4-6q-.425 0-.712-.288T7 14t.288-.712T8 13t.713.288T9 14t-.288.713T8 15m4 0q-.425 0-.712-.288T11 14t.288-.712T12 13t.713.288T13 14t-.288.713T12 15m4 0q-.425 0-.712-.288T15 14t.288-.712T16 13t.713.288T17 14t-.288.713T16 15"/></svg>

After

Width:  |  Height:  |  Size: 514 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Material Symbols by Google - https://github.com/google/material-design-icons/blob/master/LICENSE --><path fill="white" d="M20 15v-5q0-1.25-.875-2.125T17 7H6V4q0-.825.588-1.412T8 2h12q.825 0 1.413.588T22 4v9q0 .825-.587 1.413T20 15M4 22q-.825 0-1.412-.587T2 20v-9q0-.825.588-1.412T4 9h12q.825 0 1.413.588T18 11v9q0 .825-.587 1.413T16 22z"/></svg>

After

Width:  |  Height:  |  Size: 444 B