Skip to content

Commit

Permalink
6.6.0 - Results in dark mode now. Fixed HRV icon color during session…
Browse files Browse the repository at this point in the history
… and results.
  • Loading branch information
dliedke committed Jan 7, 2024
1 parent d11d4e1 commit a989fe6
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion Meditate/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. -->
<iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="3">
<iq:application entry="MeditateApp" id="9abb375dcf7c4ace87ff66f4f774f6c8" launcherIcon="@Drawables.launcherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watch-app" version="6.5.1">
<iq:application entry="MeditateApp" id="9abb375dcf7c4ace87ff66f4f774f6c8" launcherIcon="@Drawables.launcherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watch-app" version="6.6.0">
<iq:products>
<iq:product id="approachs62"/>
<iq:product id="approachs7042mm"/>
Expand Down
2 changes: 1 addition & 1 deletion Meditate/resources-deu/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<string id="HRVready">HRV Bereit</string>
<string id="HRVoff">HRV aus</string>

<string id="about_AppVersion">Meditate 6.5.1</string>
<string id="about_AppVersion">Meditate 6.6.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>

Expand Down
2 changes: 1 addition & 1 deletion Meditate/resources-por/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<string id="HRVready">VFC Pronto</string>
<string id="HRVoff">VFC Deslig.</string>

<string id="about_AppVersion">Meditate 6.5.1</string>
<string id="about_AppVersion">Meditate 6.6.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>

Expand Down
2 changes: 1 addition & 1 deletion Meditate/resources-spa/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<string id="HRVready">HRV Listo</string>
<string id="HRVoff">HRV apagado</string>

<string id="about_AppVersion">Meditate 6.5.1</string>
<string id="about_AppVersion">Meditate 6.6.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>

Expand Down
2 changes: 1 addition & 1 deletion Meditate/resources/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<string id="HRVready">HRV Ready</string>
<string id="HRVoff">HRV off</string>

<string id="about_AppVersion">Meditate 6.5.1</string>
<string id="about_AppVersion">Meditate 6.6.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>

Expand Down
6 changes: 3 additions & 3 deletions Meditate/source/summaryScreen/HeartRateGraphView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class HeartRateGraphView extends ScreenPicker.ScreenPickerView {
function onUpdate(dc) {

// Clear the screen
dc.setColor(Gfx.COLOR_TRANSPARENT, Gfx.COLOR_WHITE);
dc.setColor(Gfx.COLOR_TRANSPARENT, Gfx.COLOR_BLACK);
dc.clear();
ScreenPickerView.onUpdate(dc);

Expand All @@ -51,7 +51,7 @@ class HeartRateGraphView extends ScreenPicker.ScreenPickerView {
me.summaryModel.avgHr = "--";
}

dc.setColor(Gfx.COLOR_BLACK, Graphics.COLOR_TRANSPARENT);
dc.setColor(Gfx.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);

// Draw title text
dc.drawText(centerX,
Expand Down Expand Up @@ -166,7 +166,7 @@ class HeartRateGraphView extends ScreenPicker.ScreenPickerView {

// Draw lines and labels
dc.setPenWidth(1);
dc.setColor(Gfx.COLOR_BLACK, Graphics.COLOR_TRANSPARENT);
dc.setColor(Gfx.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);

var lineSpacing = graph_height / 4;

Expand Down
7 changes: 3 additions & 4 deletions Meditate/source/summaryScreen/RespirationRateGraphView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RespirationRateGraphView extends ScreenPicker.ScreenPickerView {
function onUpdate(dc) {

// Clear the screen
dc.setColor(Gfx.COLOR_TRANSPARENT, Gfx.COLOR_WHITE);
dc.setColor(Gfx.COLOR_TRANSPARENT, Gfx.COLOR_BLACK);
dc.clear();
ScreenPickerView.onUpdate(dc);

Expand All @@ -51,7 +51,7 @@ class RespirationRateGraphView extends ScreenPicker.ScreenPickerView {
me.summaryModel.avgRr = "--";
}

dc.setColor(Gfx.COLOR_BLACK, Graphics.COLOR_TRANSPARENT);
dc.setColor(Gfx.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);

// Draw title text
dc.drawText(centerX,
Expand Down Expand Up @@ -178,8 +178,7 @@ class RespirationRateGraphView extends ScreenPicker.ScreenPickerView {

// Draw lines and labels
dc.setPenWidth(1);
dc.setColor(Gfx.COLOR_BLACK, Graphics.COLOR_TRANSPARENT);

dc.setColor(Gfx.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);

var lineSpacing = graph_height / numberHorizontalLines;

Expand Down
64 changes: 34 additions & 30 deletions Meditate/source/summaryScreen/SummaryViewDelegate.mc
Original file line number Diff line number Diff line change
Expand Up @@ -129,30 +129,31 @@ class SummaryViewDelegate extends ScreenPicker.ScreenPickerDelegate {

private function createDetailsPageStress() {
var details = new ScreenPicker.DetailsModel();
details.color = Gfx.COLOR_BLACK;
details.backgroundColor = Gfx.COLOR_WHITE;
details.title = Ui.loadResource(Rez.Strings.SummaryStress);
details.titleColor = Gfx.COLOR_BLACK;
details.title = Ui.loadResource(Rez.Strings.SummaryStress);

details.color = Gfx.COLOR_WHITE;
details.backgroundColor = Gfx.COLOR_BLACK;
details.titleColor = Gfx.COLOR_WHITE;

if (me.mSummaryModel.stressStart!=null && me.mSummaryModel.stressEnd!=null) {

var lowStressIcon = new ScreenPicker.StressIcon({});
lowStressIcon.setLowStress();
details.detailLines[3].icon = lowStressIcon;
details.detailLines[3].value.color = Gfx.COLOR_BLACK;
details.detailLines[3].value.color = Gfx.COLOR_WHITE;
details.detailLines[3].value.text = Lang.format(Ui.loadResource(Rez.Strings.SummaryStressStart), [me.mSummaryModel.stressStart.format("%d")]);

lowStressIcon = new ScreenPicker.StressIcon({});
lowStressIcon.setLowStress();
details.detailLines[4].icon = lowStressIcon;
details.detailLines[4].value.color = Gfx.COLOR_BLACK;
details.detailLines[4].value.color = Gfx.COLOR_WHITE;
details.detailLines[4].value.text = Lang.format(Ui.loadResource(Rez.Strings.SummaryStressEnd), [me.mSummaryModel.stressEnd.format("%d")]);
}

var lowStressIcon = new ScreenPicker.StressIcon({});
lowStressIcon.setLowStress();
details.detailLines[2].icon = lowStressIcon;
details.detailLines[2].value.color = Gfx.COLOR_BLACK;
details.detailLines[2].value.color = Gfx.COLOR_WHITE;
details.detailLines[2].value.text = Lang.format("$1$ %", [me.mSummaryModel.stress]);

var summaryStressIconsXPos = App.getApp().getProperty("summaryStressIconsXPos");
Expand All @@ -166,13 +167,14 @@ class SummaryViewDelegate extends ScreenPicker.ScreenPickerDelegate {

private function createDetailsPageHrvRmssd() {
var details = new ScreenPicker.DetailsModel();
details.color = Gfx.COLOR_BLACK;
details.backgroundColor = Gfx.COLOR_WHITE;
details.title = Ui.loadResource(Rez.Strings.SummaryHRVRMSSD);
details.titleColor = Gfx.COLOR_BLACK;

details.title = Ui.loadResource(Rez.Strings.SummaryHRVRMSSD);

details.color = Gfx.COLOR_WHITE;
details.backgroundColor = Gfx.COLOR_BLACK;
details.titleColor = Gfx.COLOR_WHITE;

details.detailLines[3].icon = new ScreenPicker.HrvIcon({});
details.detailLines[3].value.color = Gfx.COLOR_BLACK;
details.detailLines[3].value.color = Gfx.COLOR_WHITE;
details.detailLines[3].value.text = Lang.format("$1$ ms", [me.mSummaryModel.hrvRmssd]);

var hrvIconsXPos = App.getApp().getProperty("summaryHrvIconsXPos");
Expand All @@ -186,23 +188,24 @@ class SummaryViewDelegate extends ScreenPicker.ScreenPickerDelegate {

private function createDetailsPageHrvPnnx() {
var details = new ScreenPicker.DetailsModel();
details.color = Gfx.COLOR_BLACK;
details.backgroundColor = Gfx.COLOR_WHITE;
details.title = Ui.loadResource(Rez.Strings.SummaryHRVpNNx);
details.titleColor = Gfx.COLOR_BLACK;

details.title = Ui.loadResource(Rez.Strings.SummaryHRVpNNx);

details.color = Gfx.COLOR_WHITE;
details.backgroundColor = Gfx.COLOR_BLACK;
details.titleColor = Gfx.COLOR_WHITE;

var hrvIcon = new ScreenPicker.HrvIcon({});
details.detailLines[2].icon = hrvIcon;
details.detailLines[2].value.color = Gfx.COLOR_BLACK;
details.detailLines[2].value.color = Gfx.COLOR_WHITE;
details.detailLines[2].value.text = "pNN20";

details.detailLines[3].value.color = Gfx.COLOR_BLACK;
details.detailLines[3].value.color = Gfx.COLOR_WHITE;
details.detailLines[3].value.text = Lang.format("$1$ %", [me.mSummaryModel.hrvPnn20]);

details.detailLines[4].icon = hrvIcon;
details.detailLines[4].value.color = Gfx.COLOR_BLACK;
details.detailLines[4].value.color = Gfx.COLOR_WHITE;
details.detailLines[4].value.text = "pNN50";
details.detailLines[5].value.color = Gfx.COLOR_BLACK;
details.detailLines[5].value.color = Gfx.COLOR_WHITE;
details.detailLines[5].value.text = Lang.format("$1$ %", [me.mSummaryModel.hrvPnn50]);

var hrvIconsXPos = App.getApp().getProperty("summaryHrvIconsXPos");
Expand All @@ -216,23 +219,24 @@ class SummaryViewDelegate extends ScreenPicker.ScreenPickerDelegate {

private function createDetailsPageHrvSdrr() {
var details = new ScreenPicker.DetailsModel();
details.color = Gfx.COLOR_BLACK;
details.backgroundColor = Gfx.COLOR_WHITE;
details.title = Ui.loadResource(Rez.Strings.SummaryHRVSDRR);
details.titleColor = Gfx.COLOR_BLACK;
details.title = Ui.loadResource(Rez.Strings.SummaryHRVSDRR);

details.color = Gfx.COLOR_WHITE;
details.backgroundColor = Gfx.COLOR_BLACK;
details.titleColor = Gfx.COLOR_WHITE;

var hrvIcon = new ScreenPicker.HrvIcon({});
details.detailLines[2].icon = hrvIcon;
details.detailLines[2].value.color = Gfx.COLOR_BLACK;
details.detailLines[2].value.color = Gfx.COLOR_WHITE;
details.detailLines[2].value.text = Ui.loadResource(Rez.Strings.SummaryHRVRMSSDFirst5min);

details.detailLines[3].value.color = Gfx.COLOR_BLACK;
details.detailLines[3].value.color = Gfx.COLOR_WHITE;
details.detailLines[3].value.text = Lang.format("$1$ ms", [me.mSummaryModel.hrvFirst5Min]);

details.detailLines[4].icon = hrvIcon;
details.detailLines[4].value.color = Gfx.COLOR_BLACK;
details.detailLines[4].value.color = Gfx.COLOR_WHITE;
details.detailLines[4].value.text = Ui.loadResource(Rez.Strings.SummaryHRVRMSSDLast5min);
details.detailLines[5].value.color = Gfx.COLOR_BLACK;
details.detailLines[5].value.color = Gfx.COLOR_WHITE;
details.detailLines[5].value.text = Lang.format("$1$ ms", [me.mSummaryModel.hrvLast5Min]);

var hrvIconsXPos = App.getApp().getProperty("summaryHrvIconsXPos");
Expand Down
7 changes: 2 additions & 5 deletions ScreenPicker/sources/HrvIcon.mc
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ module ScreenPicker {
icon[:font] = StatusIconFonts.fontAwesomeFreeSolid;
icon[:symbol] = StatusIconFonts.Rez.Strings.faHeartbeat;
if (icon[:color] == null) {
icon[:color] = HeartBeatGreenColor;
icon[:color] = HeartBeatRedColor;
}

Icon.initialize(icon);
}

const HeartBeatGreenColor = Gfx.COLOR_GREEN;

function setStatusDefault() {
me.setColor(HeartBeatGreenColor);
}
const HeartBeatRedColor = Gfx.COLOR_RED;

function setStatusOn() {
me.setColor(HeartBeatGreenColor);
Expand Down

0 comments on commit a989fe6

Please sign in to comment.