fenix 5 plus (240x240)

This commit is contained in:
Gyuri Horák 2023-10-05 20:48:33 +02:00
parent 3234078662
commit 32b3e742e9
Signed by: dyuri
GPG Key ID: 4993F07B3EAE8D38
7 changed files with 87 additions and 13 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. --> <!-- This is a generated file. It is highly recommended that you DO NOT edit this file. -->
<iq:manifest version="3" xmlns:iq="http://www.garmin.com/xml/connectiq"> <iq:manifest version="3" xmlns:iq="http://www.garmin.com/xml/connectiq">
<iq:application id="d0f125e7-b43a-46ab-927e-87396eda74a0" type="datafield" name="@Strings.AppName" entry="RepaFieldApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="4.2.0"> <iq:application id="d0f125e7-b43a-46ab-927e-87396eda74a0" type="datafield" name="@Strings.AppName" entry="RepaFieldApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="3.2.0">
<iq:products> <iq:products>
<iq:product id="approachs7042mm"/> <iq:product id="approachs7042mm"/>
<iq:product id="approachs7047mm"/> <iq:product id="approachs7047mm"/>
@ -11,8 +11,18 @@
<iq:product id="epix2pro42mm"/> <iq:product id="epix2pro42mm"/>
<iq:product id="epix2pro47mm"/> <iq:product id="epix2pro47mm"/>
<iq:product id="epix2pro51mm"/> <iq:product id="epix2pro51mm"/>
<iq:product id="fenix5plus"/>
<iq:product id="fenix5splus"/>
<iq:product id="fenix5xplus"/>
<iq:product id="fenix6pro"/>
<iq:product id="fenix7"/> <iq:product id="fenix7"/>
<iq:product id="fenix7pro"/> <iq:product id="fenix7pro"/>
<iq:product id="fr245m"/>
<iq:product id="fr255"/>
<iq:product id="fr255m"/>
<iq:product id="fr945"/>
<iq:product id="fr945lte"/>
<iq:product id="fr955"/>
<iq:product id="fr965"/> <iq:product id="fr965"/>
<iq:product id="marq2"/> <iq:product id="marq2"/>
<iq:product id="marq2aviator"/> <iq:product id="marq2aviator"/>

View File

@ -0,0 +1,72 @@
<layouts>
<!-- A generic, centered layout. -->
<layout id="MainLayout">
<drawable class="Background"/>
<drawable class="BgOverlay" id="BgOverlay">
<param name="x">100</param>
<param name="y">38</param>
<param name="h">160</param>
<param name="d">-18</param>
</drawable>
<drawable class="HeartRate" id="HeartRate">
<param name="y">38</param>
</drawable>
<drawable class="Track" />
<!-- drawable class="Stamina" /-->
<!-- hr labels -->
<label id="hr" x="center" y="1" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_MEDIUM" />
<label id="ahr" x="32%" y="9" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
<label id="mhr" x="68%" y="9" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
<!-- time/timer -->
<label id="timerHM" x="82" y="170" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_MEDIUM" />
<label id="timerS" x="83" y="176" color="Graphics.COLOR_LT_GRAY" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_XTINY" />
<label id="time" x="50%" y="200" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_LARGE" />
<!-- distance/pace/avg pace -->
<label id="pace" x="200" y="56" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_NUMBER_MEDIUM"/>
<bitmap id="iconPace" filename="../resources/drawables/pace.png" x="198" y="68" />
<label id="apace" x="200" y="100" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_LARGE"/>
<bitmap id="iconAPace" filename="../resources/drawables/apace.png" x="198" y="104" />
<label id="distance" x="200" y="144" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_NUMBER_MEDIUM" />
<label id="distanceLabel" x="202" y="140" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_XTINY" text="km"/>
<!-- cadence -->
<bitmap id="iconCadence" filename="../resources/drawables/cadence.png" x="24" y="66" />
<label id="cadence" x="42" y="54" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM" />
<!-- elevation, egain -->
<bitmap id="iconHills" filename="../resources/drawables/hills_sm.png" x="12" y="88" />
<label id="elevation" x="42" y="82" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM"/>
<bitmap id="iconEGain" filename="../resources/drawables/e_gain_sm.png" x="12" y="116" />
<label id="elevationGain" x="42" y="110" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM"/>
<bitmap id="iconELoss" filename="../resources/drawables/e_loss_sm.png" x="12" y="144" />
<label id="elevationLoss" x="42" y="138" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM"/>
</layout>
<!-- Layouts used for the for the four quadrants. -->
<layout id="TopLayout">
<drawable class="Background" />
<drawable class="HeartRate" id="HeartRate">
<param name="y">42</param>
</drawable>
<!-- hr labels -->
<label id="hr" x="center" y="6" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_MEDIUM" />
<label id="ahr" x="32%" y="18" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
<label id="mhr" x="68%" y="18" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
</layout>
<layout id="BottomLayout">
<drawable class="Background" />
<drawable class="HeartRate" id="HeartRate">
<param name="y">42</param>
</drawable>
<!-- hr labels -->
<label id="hr" x="center" y="72" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_MEDIUM" />
<label id="ahr" x="32%" y="72" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
<label id="mhr" x="68%" y="72" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
</layout>
</layouts>

View File

@ -5,7 +5,6 @@
<drawable class="BgOverlay" id="BgOverlay"> <drawable class="BgOverlay" id="BgOverlay">
<param name="x">100</param> <param name="x">100</param>
<param name="y">42</param> <param name="y">42</param>
<param name="w">180</param>
<param name="h">160</param> <param name="h">160</param>
<param name="d">-18</param> <param name="d">-18</param>
</drawable> </drawable>

View File

@ -5,7 +5,6 @@
<drawable class="BgOverlay" id="BgOverlay"> <drawable class="BgOverlay" id="BgOverlay">
<param name="x">140</param> <param name="x">140</param>
<param name="y">62</param> <param name="y">62</param>
<param name="w">280</param>
<param name="h">260</param> <param name="h">260</param>
<param name="d">-32</param> <param name="d">-32</param>
</drawable> </drawable>

View File

@ -5,7 +5,6 @@
<drawable class="BgOverlay" id="BgOverlay"> <drawable class="BgOverlay" id="BgOverlay">
<param name="x">158</param> <param name="x">158</param>
<param name="y">78</param> <param name="y">78</param>
<param name="w">400</param>
<param name="h">280</param> <param name="h">280</param>
<param name="d">-36</param> <param name="d">-36</param>
</drawable> </drawable>

View File

@ -5,7 +5,6 @@
<drawable class="BgOverlay" id="BgOverlay"> <drawable class="BgOverlay" id="BgOverlay">
<param name="x">158</param> <param name="x">158</param>
<param name="y">62</param> <param name="y">62</param>
<param name="w">280</param>
<param name="h">260</param> <param name="h">260</param>
<param name="d">-32</param> <param name="d">-32</param>
</drawable> </drawable>

View File

@ -7,7 +7,6 @@ class BgOverlay extends WatchUi.Drawable {
hidden var x as Number; hidden var x as Number;
hidden var y as Number; hidden var y as Number;
hidden var w as Number;
hidden var h as Number; hidden var h as Number;
hidden var d as Number; hidden var d as Number;
@ -24,10 +23,6 @@ class BgOverlay extends WatchUi.Drawable {
if (params.hasKey(:y)) { if (params.hasKey(:y)) {
y = params.get(:y) as Number; y = params.get(:y) as Number;
} }
w = 300;
if (params.hasKey(:w)) {
w = params.get(:w) as Number;
}
h = 260; h = 260;
if (params.hasKey(:h)) { if (params.hasKey(:h)) {
h = params.get(:h) as Number; h = params.get(:h) as Number;
@ -50,13 +45,14 @@ class BgOverlay extends WatchUi.Drawable {
} }
function draw(dc as Dc) as Void { function draw(dc as Dc) as Void {
var w = dc.getWidth();
dc.setColor(c1, Graphics.COLOR_TRANSPARENT); dc.setColor(c1, Graphics.COLOR_TRANSPARENT);
dc.fillPolygon([[x+w, y], [x, y], [x-d, y+h], [x+w, y+h]]); dc.fillPolygon([[w, y], [x, y], [x-d, y+h], [w, y+h]]);
dc.setColor(c2, Graphics.COLOR_TRANSPARENT); dc.setColor(c2, Graphics.COLOR_TRANSPARENT);
dc.setPenWidth(1); dc.setPenWidth(1);
dc.drawLine(x+w, y, x, y); dc.drawLine(w, y, x, y);
dc.drawLine(x, y, x-d, y+h); dc.drawLine(x, y, x-d, y+h);
dc.drawLine(x-d, y+h, x+w, y+h); dc.drawLine(x-d, y+h, w, y+h);
} }
} }