Skip to content

Commit

Permalink
1.7.1
Browse files Browse the repository at this point in the history
- Free colors
- Add position of the weather icons
- Add zoom/size of the weather icons
  • Loading branch information
zRenard committed Aug 6, 2023
1 parent 879fbc3 commit c178e7f
Show file tree
Hide file tree
Showing 12 changed files with 408 additions and 236 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/.project
/bin/
4 changes: 4 additions & 0 deletions README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ Disponible sur Garmin ConnectIQ : https://apps.garmin.com/fr-FR/apps/4c058f81-a9
* Couleur du cercle d'inactivité.

## Historique des version
* 1.7.1
* (**nouveautés**) Couleurs libre (Vous pouvez personaliser les couleurs)
* (**nouveautés**) Ajout d'une options pour positionner la météo
* (**nouveautés**) Ajout du zomm de la méteo sous forme d'icone
* 1.7.0
* (**nouveautés**) Ajout de la méteo sous forme d'icones
* 1.6.1
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Available on Garmin ConnectIQ : https://apps.garmin.com/fr-FR/apps/4c058f81-a930
* Set inactivity circle color

## History
* 1.7.1
* (**new**) Free colors (you can define your own colors)
* (**new**) Add position of the weather icons
* (**new**) Add zoom/size of the weather icons
* 1.7.0
* (**new**) Add weather icons
* 1.6.1
Expand Down
2 changes: 1 addition & 1 deletion bin/zRenardWatch-settings.json

Large diffs are not rendered by default.

Binary file modified bin/zRenardWatch.prg
Binary file not shown.
496 changes: 272 additions & 224 deletions bin/zRenardWatch.prg.debug.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- 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="zRenardWatchApp" id="f952f59c9c1e4fc8b807177c63821408" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watchface" version="1.7.0">
<iq:application entry="zRenardWatchApp" id="f952f59c9c1e4fc8b807177c63821408" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watchface" version="1.7.1">
<iq:products>
<iq:product id="fenix5"/>
<iq:product id="fenix5plus"/>
Expand Down
13 changes: 11 additions & 2 deletions resources-fre/strings/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<strings>
<string id="AppName">zRenardWatch</string>

<string id="ColorFree">Libre (entrez un code dessous)</string>
<string id="BackgroundColorTitle">Couleur de fond</string>
<string id="ForegroundColorTitle">Couleur du texte</string>
<string id="ForegroundColorHoursTitle">Couleur du texte des heures</string>
<string id="ForegroundColorMinutesTitle">Couleur du texte des minutes</string>
<string id="HighLightColorTitle">Couleur de la date</string>
<string id="ShowYearTitle">Affiche l'année dans la date</string>

<string id="FontSizeTitle">Taille de la police de l'heure</string>
<string id="Small">Petite</string>
Expand All @@ -24,9 +26,13 @@
<string id="WeatherDayToday">Aujourd'hui</string>
<string id="WeatherDayTomorrow">Demain</string>
<string id="WeatherDaySmart">Intelligent (Aujourd'hui jusqu'a midi, puis Demain)</string>

<string id="WeatherRefreshRateMinutesTitle">Delai de mise à jour de la méteo (en minutes)</string>
<string id="WeatherRefreshRateMinutesError">Le delai doit être compris entre 5 et 240 minutes (4h)</string>
<string id="WeatherIconFactorTitle">Facteur de zoom de l'icone météo</string>
<string id="WeatherIconFactorError">la valeur doit etre entre 1 et 1.8</string>
<string id="WeatherIconLocationTitle">Position de l'icone météo</string>
<string id="Bottom">Centré en bas</string>
<string id="BottomHour">Sous l'heure</string>

<string id="BatteryLevelCriticalTitle">Le niveau minimum de la batterie qui declanche l'affichage d'une alerte</string>
<string id="BatteryLevelCriticalError">Le niveau doit etre entre 2 et 30</string>
Expand All @@ -50,5 +56,8 @@
<string id="ColorCyan">Cyan</string>
<string id="ColorGreen">Vert</string>
<string id="ColorYellow">Jaune</string>

<string id="ColorPurple">Violet</string>
<string id="ColorLightGreen">Vert clair</string>
<string id="ColorPink">Rose</string>
<string id="ColorTurquoise">Turquoise</string>
</strings>
18 changes: 18 additions & 0 deletions resources/settings/properties.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
<properties>
<property id="BackgroundColor" type="number">0x000000</property>
<property id="FreeBackgroundColor" type="string">0x000000</property>

<property id="ForegroundColor" type="number">0xFFFFFF</property>
<property id="FreeForegroundColor" type="string">0xFFFFFF</property>

<property id="ForegroundColorHours" type="number">0xFFFFFF</property>
<property id="FreeForegroundColorHours" type="string">0xFFFFFF</property>

<property id="ForegroundColorMinutes" type="number">0xFFFFFF</property>
<property id="FreeForegroundColorMinutes" type="string">0xFFFFFF</property>

<property id="ShowYear" type="boolean">true</property>
<property id="ShowWeather" type="boolean">true</property>

<property id="WeatherIconColor" type="number">1</property>
<property id="WeatherDay" type="number">2</property>
<property id="WeatherRefreshRateMinutes" type="number">30</property>
<property id="WeatherIconFactor" type="float">1</property>
<property id="WeatherIconLocation" type="number">0</property>

<property id="HighLightColor" type="number">0xFF5500</property>
<property id="FreeHighLightColor" type="string">0xFF5500</property>

<property id="MoveDisplayType" type="number">1</property>
<property id="FontSize" type="number">1</property>
<property id="ShowNotification" type="boolean">true</property>
Expand All @@ -17,6 +32,9 @@
<property id="BatteryLevelCritical" type="number">15</property>
<property id="ShowMove" type="boolean">true</property>
<property id="MoveDisplayType" type="number">1</property>

<property id="MoveCircleColor" type="number">0xFFFFFF</property>
<property id="FreeMoveCircleColor" type="string">0xFFFFFF</property>

<property id="MoveCircleWidth" type="number">2</property>
</properties>
62 changes: 60 additions & 2 deletions resources/settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<setting propertyKey="@Properties.BackgroundColor" title="@Strings.BackgroundColorTitle">
<settingConfig type="list">
<listEntry value="-1">@Strings.ColorFree</listEntry>
<listEntry value="0x000000">@Strings.ColorBlack</listEntry>
<listEntry value="0xFFFFFF">@Strings.ColorWhite</listEntry>
<listEntry value="0x555555">@Strings.ColorDarkGray</listEntry>
Expand All @@ -11,12 +12,20 @@
<listEntry value="0x00FF00">@Strings.ColorGreen</listEntry>
<listEntry value="0xFF5500">@Strings.ColorOrange</listEntry>
<listEntry value="0x00FFFF">@Strings.ColorCyan</listEntry>
<listEntry value="0xFFF200">@Strings.ColorYellow</listEntry>
<listEntry value="0x30d5c8">@Strings.ColorTurquoise</listEntry>
<listEntry value="0xFFF200">@Strings.ColorYellow</listEntry>
<listEntry value="0xAA00FF">@Strings.ColorPurple</listEntry>
<listEntry value="0x99EE99">@Strings.ColorLightGreen</listEntry>
<listEntry value="0xFF00FF">@Strings.ColorPink</listEntry>
</settingConfig>
</setting>

<setting propertyKey="@Properties.FreeBackgroundColor" title="@Strings.BackgroundColorTitle">
<settingConfig type="alphaNumeric" />
</setting>

<setting propertyKey="@Properties.ForegroundColorHours" title="@Strings.ForegroundColorHoursTitle">
<settingConfig type="list">
<listEntry value="-1">@Strings.ColorFree</listEntry>
<listEntry value="0x000000">@Strings.ColorBlack</listEntry>
<listEntry value="0xFFFFFF">@Strings.ColorWhite</listEntry>
<listEntry value="0x555555">@Strings.ColorDarkGray</listEntry>
Expand All @@ -26,12 +35,20 @@
<listEntry value="0x00FF00">@Strings.ColorGreen</listEntry>
<listEntry value="0xFF5500">@Strings.ColorOrange</listEntry>
<listEntry value="0x00FFFF">@Strings.ColorCyan</listEntry>
<listEntry value="0x30d5c8">@Strings.ColorTurquoise</listEntry>
<listEntry value="0xFFF200">@Strings.ColorYellow</listEntry>
<listEntry value="0xAA00FF">@Strings.ColorPurple</listEntry>
<listEntry value="0x99EE99">@Strings.ColorLightGreen</listEntry>
<listEntry value="0xFF00FF">@Strings.ColorPink</listEntry>
</settingConfig>
</setting>
<setting propertyKey="@Properties.FreeForegroundColorHours" title="@Strings.ForegroundColorHoursTitle">
<settingConfig type="alphaNumeric" />
</setting>

<setting propertyKey="@Properties.ForegroundColorMinutes" title="@Strings.ForegroundColorMinutesTitle">
<settingConfig type="list">
<listEntry value="-1">@Strings.ColorFree</listEntry>
<listEntry value="0x000000">@Strings.ColorBlack</listEntry>
<listEntry value="0xFFFFFF">@Strings.ColorWhite</listEntry>
<listEntry value="0x555555">@Strings.ColorDarkGray</listEntry>
Expand All @@ -41,12 +58,20 @@
<listEntry value="0x00FF00">@Strings.ColorGreen</listEntry>
<listEntry value="0xFF5500">@Strings.ColorOrange</listEntry>
<listEntry value="0x00FFFF">@Strings.ColorCyan</listEntry>
<listEntry value="0x30d5c8">@Strings.ColorTurquoise</listEntry>
<listEntry value="0xFFF200">@Strings.ColorYellow</listEntry>
<listEntry value="0xAA00FF">@Strings.ColorPurple</listEntry>
<listEntry value="0x99EE99">@Strings.ColorLightGreen</listEntry>
<listEntry value="0xFF00FF">@Strings.ColorPink</listEntry>
</settingConfig>
</setting>
<setting propertyKey="@Properties.FreeForegroundColorMinutes" title="@Strings.ForegroundColorMinutesTitle">
<settingConfig type="alphaNumeric" />
</setting>

<setting propertyKey="@Properties.HighLightColor" title="@Strings.HighLightColorTitle">
<settingConfig type="list">
<listEntry value="-1">@Strings.ColorFree</listEntry>
<listEntry value="0x000000">@Strings.ColorBlack</listEntry>
<listEntry value="0xFFFFFF">@Strings.ColorWhite</listEntry>
<listEntry value="0x555555">@Strings.ColorDarkGray</listEntry>
Expand All @@ -56,9 +81,16 @@
<listEntry value="0x00FF00">@Strings.ColorGreen</listEntry>
<listEntry value="0xFF5500">@Strings.ColorOrange</listEntry>
<listEntry value="0x00FFFF">@Strings.ColorCyan</listEntry>
<listEntry value="0x30d5c8">@Strings.ColorTurquoise</listEntry>
<listEntry value="0xFFF200">@Strings.ColorYellow</listEntry>
<listEntry value="0xAA00FF">@Strings.ColorPurple</listEntry>
<listEntry value="0x99EE99">@Strings.ColorLightGreen</listEntry>
<listEntry value="0xFF00FF">@Strings.ColorPink</listEntry>
</settingConfig>
</setting>
<setting propertyKey="@Properties.FreeHighLightColor" title="@Strings.HighLightColorTitle">
<settingConfig type="alphaNumeric" />
</setting>

<setting propertyKey="@Properties.FontSize" title="@Strings.FontSizeTitle">
<settingConfig type="list">
Expand All @@ -73,6 +105,11 @@
<settingConfig type="boolean" />
</setting>


<setting propertyKey="@Properties.ShowYear" title="@Strings.ShowYearTitle">
<settingConfig type="boolean" />
</setting>

<setting propertyKey="@Properties.UseSleepMode" title="@Strings.UseSleepModeTitle">
<settingConfig type="boolean" />
</setting>
Expand Down Expand Up @@ -104,6 +141,17 @@
<settingConfig type="numeric" min="5" max="240" errorMessage="@Strings.WeatherRefreshRateMinutesError"/>
</setting>

<setting propertyKey="@Properties.WeatherIconFactor" title="@Strings.WeatherIconFactorTitle">
<settingConfig type="numeric" min="1" max="2.0" errorMessage="@Strings.WeatherIconFactorError"/>
</setting>

<setting propertyKey="@Properties.WeatherIconLocation" title="@Strings.WeatherIconLocationTitle">
<settingConfig type="list">
<listEntry value="0">@Strings.Bottom</listEntry>
<listEntry value="1">@Strings.BottomHour</listEntry>
</settingConfig>
</setting>

<setting propertyKey="@Properties.BatteryLevel" title="@Strings.BatteryLevelTitle">
<settingConfig type="numeric" min="5" max="95" errorMessage="@Strings.BatteryLevelError"/>
</setting>
Expand All @@ -121,8 +169,10 @@
<listEntry value="3">@Strings.MoveBottomIcons</listEntry>
</settingConfig>
</setting>

<setting propertyKey="@Properties.MoveCircleColor" title="@Strings.MoveCircleTitle">
<settingConfig type="list">
<listEntry value="-1">@Strings.ColorFree</listEntry>
<listEntry value="0x000000">@Strings.ColorBlack</listEntry>
<listEntry value="0xFFFFFF">@Strings.ColorWhite</listEntry>
<listEntry value="0x555555">@Strings.ColorDarkGray</listEntry>
Expand All @@ -132,9 +182,17 @@
<listEntry value="0x00FF00">@Strings.ColorGreen</listEntry>
<listEntry value="0xFF5500">@Strings.ColorOrange</listEntry>
<listEntry value="0x00FFFF">@Strings.ColorCyan</listEntry>
<listEntry value="0x30d5c8">@Strings.ColorTurquoise</listEntry>
<listEntry value="0xFFF200">@Strings.ColorYellow</listEntry>
<listEntry value="0xAA00FF">@Strings.ColorPurple</listEntry>
<listEntry value="0x99EE99">@Strings.ColorLightGreen</listEntry>
<listEntry value="0xFF00FF">@Strings.ColorPink</listEntry>
</settingConfig>
</setting>
<setting propertyKey="@Properties.FreeMoveCircleColor" title="@Strings.MoveCircleTitle">
<settingConfig type="alphaNumeric" />
</setting>

<setting propertyKey="@Properties.MoveCircleWidth" title="@Strings.MoveCircleWidthTitle">
<settingConfig type="numeric" min="1" max="6" errorMessage="@Strings.MoveCircleWidthError"/>
</setting>
Expand Down
16 changes: 13 additions & 3 deletions resources/strings/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<strings>
<string id="AppName">zRenardWatch</string>

<string id="ColorFree">Free (enter rgb code bellow)</string>
<string id="BackgroundColorTitle">Background Color</string>
<string id="ForegroundColorTitle">Foreground Color</string>
<string id="ForegroundColorHoursTitle">Foreground Color for Hours</string>
<string id="ForegroundColorMinutesTitle">Foreground Color for Minutes</string>
<string id="HighLightColorTitle">Date Color</string>
<string id="ShowYearTitle">Show year in date</string>

<string id="FontSizeTitle">Hours and minutes font size</string>
<string id="Small">Small</string>
Expand All @@ -26,7 +28,12 @@
<string id="WeatherDaySmart">Smart (Today before noon, Tomorrow after)</string>
<string id="WeatherRefreshRateMinutesTitle">Minimum refresh rate for weather (in minutes)</string>
<string id="WeatherRefreshRateMinutesError">Must be between 5 and 240 minutes (4h)</string>

<string id="WeatherIconFactorTitle">Zoom factor of the weather icon</string>
<string id="WeatherIconFactorError">Must be between 1 and 1.8</string>
<string id="WeatherIconLocationTitle">Position of the weather icon</string>
<string id="Bottom">Center at the bottom</string>
<string id="BottomHour">Bellow hour</string>

<string id="BatteryLevelCriticalTitle">Minimum Battery Level to display a warning</string>
<string id="BatteryLevelCriticalError">Must be between 2 and 30</string>

Expand All @@ -48,6 +55,9 @@
<string id="ColorOrange">Orange</string>
<string id="ColorCyan">Cyan</string>
<string id="ColorGreen">Green</string>
<string id="ColorYellow">Yellow</string>

<string id="ColorYellow">Yellow</string>
<string id="ColorPurple">Purple</string>
<string id="ColorLightGreen">Light Green</string>
<string id="ColorPink">Pink</string>
<string id="ColorTurquoise">Turquoise</string>
</strings>
26 changes: 23 additions & 3 deletions source/zRenardWatchView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,15 @@ class zRenardWatchView extends WatchUi.WatchFace {
var width = dc.getWidth();
var height = dc.getHeight();
var bgC = Application.Properties.getValue("BackgroundColor");
if (bgC == -1) { bgC = Application.Properties.getValue("FreeBackgroundColor").toLongWithBase(16); }
var fgC = Application.Properties.getValue("ForegroundColor");
if (fgC == -1) { fgC = Application.Properties.getValue("FreeForegroundColor").toLongWithBase(16); }
var fgHC = Application.Properties.getValue("ForegroundColorHours");
if (fgHC == -1) { fgHC = Application.Properties.getValue("FreeForegroundColorHours").toLongWithBase(16); }
var fgMC = Application.Properties.getValue("ForegroundColorMinutes");
if (fgMC == -1) { fgMC = Application.Properties.getValue("FreeForegroundColorMinutes").toLongWithBase(16); }
var hlC = Application.Properties.getValue("HighLightColor");
if (hlC == -1) { hlC = Application.Properties.getValue("FreeHighLightColor").toLongWithBase(16); }
var fontSize = Application.Properties.getValue("FontSize");
var sleepMode = Application.Properties.getValue("UseSleepMode");
var ultraSleepMode = Application.Properties.getValue("UltraSleepMode");
Expand All @@ -51,6 +56,7 @@ class zRenardWatchView extends WatchUi.WatchFace {
var showMove = Application.Properties.getValue("ShowMove");
var moveDisplayType = Application.Properties.getValue("MoveDisplayType");
var moveCircleColor = Application.Properties.getValue("MoveCircleColor");
if (moveCircleColor == -1) { moveCircleColor = Application.Properties.getValue("FreeMoveCircleColor").toLongWithBase(16); }
var moveCircleWidth = Application.Properties.getValue("MoveCircleWidth");

var offSetBigFont = 0;
Expand Down Expand Up @@ -138,7 +144,11 @@ class zRenardWatchView extends WatchUi.WatchFace {
dc.setColor(hlC ,Graphics.COLOR_TRANSPARENT);
if (!sleepMode || (sleepMode && !sleepMode)) {
// Date if not in sleep mode (or sleep mode desactivated)
dc.drawText( (width / 2), (height /2)+60-20+offSetBigFont, Graphics.FONT_TINY, nowText.day_of_week+" "+myDay+" "+nowText.month+" "+nowText.year, Graphics.TEXT_JUSTIFY_CENTER);
if (Application.Properties.getValue("ShowYear")) {
dc.drawText( (width / 2), (height /2)+60-20+offSetBigFont, Graphics.FONT_TINY, nowText.day_of_week+" "+myDay+" "+nowText.month+" "+nowText.year, Graphics.TEXT_JUSTIFY_CENTER);
} else {
dc.drawText( (width / 2), (height /2)+60-20+offSetBigFont, Graphics.FONT_TINY, nowText.day_of_week+" "+myDay+" "+nowText.month, Graphics.TEXT_JUSTIFY_CENTER);
}
if (!System.getSystemStats().charging && battery <=batteryLevelCritical) {
dc.setColor(hlC, hlC);
dc.fillRectangle(0, 3*height/4+4+offSetBigFont, width, 20);
Expand All @@ -149,7 +159,7 @@ class zRenardWatchView extends WatchUi.WatchFace {
}

if (System.getSystemStats().charging ) {
dc.drawBitmap((width / 2)-20/2, height-20, ico_charge);
dc.drawBitmap((width / 2)-20/2, height-23, ico_charge);
} else {
if (showWeather) {
var defaultConditionIcon = 53; // default icon ? for unknow weather
Expand All @@ -162,7 +172,17 @@ class zRenardWatchView extends WatchUi.WatchFace {
if (ico_weather==null) {
ico_weather = weatherIcons.get(defaultConditionIcon);
}
dc.drawBitmap((width / 2)-20/2, height-20, ico_weather);
//dc.drawBitmap((width / 2)-20/2, height-20-3, ico_weather);
var ico_size=20*Application.Properties.getValue("WeatherIconFactor");
if (Application.Properties.getValue("WeatherIconLocation")==0) {
dc.drawScaledBitmap((width / 2)-ico_size/2,height-ico_size/2-13,ico_size,ico_size,ico_weather);
} else {
var weatherOffset=0;
if (fontSize==3) { weatherOffset = 20; } // Big font
if (fontSize==2) { weatherOffset = 17; } // Medium
if (fontSize==1) { weatherOffset = 3; } // Small
dc.drawScaledBitmap((width / 2)-50-ico_size/2,(height/2)+weatherOffset-ico_size/2+20,ico_size,ico_size,ico_weather);
}
}
}

Expand Down

0 comments on commit c178e7f

Please sign in to comment.