diff --git a/HISTORY.md b/HISTORY.md index c68ab78..a031fda 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -53,3 +53,4 @@ | 3.5 | Added support for Edge 550, 850 & MTB, Fenix 8 Pro 47mm, GPSMAP H1, Instinct Crossover AMOLED, Venu 4 41mm & 45mm, & Venu X1 devices which also required an SDK update to 8.3.0. The simulation of the Edge 850 device was off, as it failed to update the display and text was the wrong colour, but the buttons menu items operated HA correctly. The assumption is the simulation model is buggy until someone [reports](https://github.com/house-of-abbey/GarminHomeAssistant/issues) otherwise. | | 3.6 | Added `numeric` menu item type thanks to [@thmichel](https://github.com/thmichel). This allows you to select a numeric value to set for an entity. Confirmations can now display a user supplied message. [Schema update](README.md#old-deprecated-formats) to keep pace with HomeAssistant and correct a previous decision. Schema changes for consistency. | | 3.7 | Bug fix for `numeric` menu items not working over Wi-Fi & LTE. | +| 3.8 | Added icon for `numeric` menu items and revised icons in general. | diff --git a/iconResize.cmd b/iconResize.cmd new file mode 100644 index 0000000..4ba803f --- /dev/null +++ b/iconResize.cmd @@ -0,0 +1,23 @@ +@echo off +rem ----------------------------------------------------------------------------------- +rem +rem Distributed under MIT Licence +rem See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE. +rem +rem ----------------------------------------------------------------------------------- +rem +rem GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely +rem tested on a Venu 2 device. The source code is provided at: +rem https://github.com/house-of-abbey/GarminHomeAssistant. +rem +rem J D Abbey & P A Abbey, 11 November 2025 +rem +rem Run the icon generation Python scripts +rem +rem ----------------------------------------------------------------------------------- + +REM change the current directory to the batch file's location +cd /d %~dp0 +python iconResize.py +python launcherIconResize.py +pause diff --git a/iconResize.py b/iconResize.py index 44e1f85..41cdb11 100644 --- a/iconResize.py +++ b/iconResize.py @@ -30,44 +30,32 @@ # #################################################################################### -from bs4 import BeautifulSoup, Comment +from bs4 import BeautifulSoup import os import shutil output_dir_prefix = 'resources-icons-' input_dir = output_dir_prefix + '48' -Doub = 0 -Sing = 1 -Half = 2 - -# Original icons for 416x416 screen size with 48x48 icons -original = (96, 48, 24) - -# The icons need to scale as a ratio of screen size 48:416 pixels -# -# Icon 55 53 48 46 42 37 32 30 28 26 24 21 19 18 -# Screen 480 454 416 390 360 320 280 260 240 218 208 176 166 156 - # Convert icons to different screen sizes by these parameters -lookup = { - # Doub Sing Half - # 0 1 2 - 480: (110, 55, 28), - 454: (106, 53, 27), -# 416: ( 96, 48, 24), - 390: ( 90, 46, 23), - 360: ( 84, 42, 21), - 320: ( 74, 38, 19), - 295: ( 68, 34, 17), # Especially for the instinct3amoled50mm device that clip the icons - 280: ( 64, 32, 16), - 260: ( 60, 30, 15), - 240: ( 56, 28, 14), - 218: ( 50, 26, 13), - 208: ( 48, 24, 12), - 176: ( 42, 21, 11), - 156: ( 36, 18, 9) -} +lookup = [ + 55, + 53, +# 48, + 46, + 42, + 38, + 34, # Especially for the instinct3amoled50mm device that clip the icons + 32, + 30, + 28, + 26, + 24, + "21-w", + 21, + "18-w", + 18 +] # Delete all but the original 48x48 icon directories for entry in os.listdir("."): @@ -75,8 +63,12 @@ for entry in os.listdir("."): shutil.rmtree(entry) # (Re-)Create the resized icon directories -for screen_size, icon_sizes in lookup.items(): - output_dir = output_dir_prefix + str(icon_sizes[Sing]) +for icon_size in lookup: + output_dir = output_dir_prefix + str(icon_size) + white = False + if isinstance(icon_size, str): + white = True + icon_size = int(icon_size.split("-")[0]) print("\nCreate directory:", output_dir) if os.path.exists(output_dir) and os.path.isdir(output_dir): shutil.rmtree(output_dir) @@ -87,16 +79,14 @@ for screen_size, icon_sizes in lookup.items(): with open(input_dir + "/" + entry, "r") as f: soup = BeautifulSoup(f.read(), features="xml") svg: BeautifulSoup = list(soup.children)[0] - h = int(svg.attrs["height"]) - if (h == original[Doub]): - svg.attrs["width"] = lookup[screen_size][Doub] - svg.attrs["height"] = lookup[screen_size][Doub] - elif (h == original[Sing]): - svg.attrs["width"] = lookup[screen_size][Sing] - svg.attrs["height"] = lookup[screen_size][Sing] - elif (h == original[Half]): - svg.attrs["width"] = lookup[screen_size][Half] - svg.attrs["height"] = lookup[screen_size][Half] + svg.attrs["width"] = icon_size + svg.attrs["height"] = icon_size + if white: + # Add white colour style + svg.find("style", id="colours").string = """ + .colour1 { color: #dddddd; } + .colour2 { color: #ffffff; } +""" with open(output_dir + "/" + entry, "wb") as o: o.write(svg.encode("utf-8") + b"\n") elif entry.endswith(".xml"): diff --git a/launcherIconResize.py b/launcherIconResize.py index da9e7ed..1d53941 100644 --- a/launcherIconResize.py +++ b/launcherIconResize.py @@ -42,7 +42,7 @@ input_dir = output_dir_prefix + '70-70' # Convert icons to different screen sizes by these parameters lookup = [26, 30, 33, 35, 36, 38, 40, 52, 54, 56, 60, 61, 62, 65, 68, 80] -# Delete all but the original 48x48 icon directories +# Delete all but the original 70x70 icon directories for entry in os.listdir("."): if entry.startswith(output_dir_prefix) and entry != input_dir: shutil.rmtree(entry) diff --git a/resources-icons-18-w/drawables.xml b/resources-icons-18-w/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-18-w/drawables.xml +++ b/resources-icons-18-w/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-18-w/error.svg b/resources-icons-18-w/error.svg index a457398..51f5fa4 100644 --- a/resources-icons-18-w/error.svg +++ b/resources-icons-18-w/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-18-w/group_type.svg b/resources-icons-18-w/group_type.svg index 8a67a91..c86fffa 100644 --- a/resources-icons-18-w/group_type.svg +++ b/resources-icons-18-w/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-18-w/info_type.svg b/resources-icons-18-w/info_type.svg index 65a4cc6..cfad615 100644 --- a/resources-icons-18-w/info_type.svg +++ b/resources-icons-18-w/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-18-w/numeric_type.svg b/resources-icons-18-w/numeric_type.svg new file mode 100644 index 0000000..9e8ad1b --- /dev/null +++ b/resources-icons-18-w/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-18-w/tap_type.svg b/resources-icons-18-w/tap_type.svg index 6d52a9a..bdcc546 100644 --- a/resources-icons-18-w/tap_type.svg +++ b/resources-icons-18-w/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-18/drawables.xml b/resources-icons-18/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-18/drawables.xml +++ b/resources-icons-18/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-18/error.svg b/resources-icons-18/error.svg index 5776799..119cbd8 100644 --- a/resources-icons-18/error.svg +++ b/resources-icons-18/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-18/group_type.svg b/resources-icons-18/group_type.svg index b0301c3..6ea5253 100644 --- a/resources-icons-18/group_type.svg +++ b/resources-icons-18/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-18/info_type.svg b/resources-icons-18/info_type.svg index 3d05232..a530bdd 100644 --- a/resources-icons-18/info_type.svg +++ b/resources-icons-18/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-18/numeric_type.svg b/resources-icons-18/numeric_type.svg new file mode 100644 index 0000000..a6bc5cf --- /dev/null +++ b/resources-icons-18/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-18/tap_type.svg b/resources-icons-18/tap_type.svg index f1a52ab..37253d9 100644 --- a/resources-icons-18/tap_type.svg +++ b/resources-icons-18/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-21-w/drawables.xml b/resources-icons-21-w/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-21-w/drawables.xml +++ b/resources-icons-21-w/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-21-w/error.svg b/resources-icons-21-w/error.svg index 2b21d69..e4b19d4 100644 --- a/resources-icons-21-w/error.svg +++ b/resources-icons-21-w/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-21-w/group_type.svg b/resources-icons-21-w/group_type.svg index 9996c00..0f65e83 100644 --- a/resources-icons-21-w/group_type.svg +++ b/resources-icons-21-w/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-21-w/info_type.svg b/resources-icons-21-w/info_type.svg index 4dcfba5..f8a6f4e 100644 --- a/resources-icons-21-w/info_type.svg +++ b/resources-icons-21-w/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-21-w/numeric_type.svg b/resources-icons-21-w/numeric_type.svg new file mode 100644 index 0000000..7921ba9 --- /dev/null +++ b/resources-icons-21-w/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-21-w/tap_type.svg b/resources-icons-21-w/tap_type.svg index 2fcd199..d4a51d0 100644 --- a/resources-icons-21-w/tap_type.svg +++ b/resources-icons-21-w/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-21/drawables.xml b/resources-icons-21/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-21/drawables.xml +++ b/resources-icons-21/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-21/error.svg b/resources-icons-21/error.svg index 48c2bf8..c1bb30f 100644 --- a/resources-icons-21/error.svg +++ b/resources-icons-21/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-21/group_type.svg b/resources-icons-21/group_type.svg index 53d262a..fb6f16c 100644 --- a/resources-icons-21/group_type.svg +++ b/resources-icons-21/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-21/info_type.svg b/resources-icons-21/info_type.svg index 4d21404..75497d5 100644 --- a/resources-icons-21/info_type.svg +++ b/resources-icons-21/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-21/numeric_type.svg b/resources-icons-21/numeric_type.svg new file mode 100644 index 0000000..d61cab6 --- /dev/null +++ b/resources-icons-21/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-21/tap_type.svg b/resources-icons-21/tap_type.svg index ce69b53..9ad97db 100644 --- a/resources-icons-21/tap_type.svg +++ b/resources-icons-21/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-24/drawables.xml b/resources-icons-24/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-24/drawables.xml +++ b/resources-icons-24/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-24/error.svg b/resources-icons-24/error.svg index 8ebdb16..8cc15e1 100644 --- a/resources-icons-24/error.svg +++ b/resources-icons-24/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-24/group_type.svg b/resources-icons-24/group_type.svg index 6ae1634..e35fd7b 100644 --- a/resources-icons-24/group_type.svg +++ b/resources-icons-24/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-24/info_type.svg b/resources-icons-24/info_type.svg index cdab733..2872a6d 100644 --- a/resources-icons-24/info_type.svg +++ b/resources-icons-24/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-24/numeric_type.svg b/resources-icons-24/numeric_type.svg new file mode 100644 index 0000000..73ccd73 --- /dev/null +++ b/resources-icons-24/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-24/tap_type.svg b/resources-icons-24/tap_type.svg index bf3d3d7..58c0133 100644 --- a/resources-icons-24/tap_type.svg +++ b/resources-icons-24/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-26/drawables.xml b/resources-icons-26/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-26/drawables.xml +++ b/resources-icons-26/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-26/error.svg b/resources-icons-26/error.svg index 26e38d6..77f182a 100644 --- a/resources-icons-26/error.svg +++ b/resources-icons-26/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-26/group_type.svg b/resources-icons-26/group_type.svg index c120aba..c0cf753 100644 --- a/resources-icons-26/group_type.svg +++ b/resources-icons-26/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-26/info_type.svg b/resources-icons-26/info_type.svg index a52188f..576518b 100644 --- a/resources-icons-26/info_type.svg +++ b/resources-icons-26/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-26/numeric_type.svg b/resources-icons-26/numeric_type.svg new file mode 100644 index 0000000..9798da4 --- /dev/null +++ b/resources-icons-26/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-26/tap_type.svg b/resources-icons-26/tap_type.svg index 87c41ad..c9101aa 100644 --- a/resources-icons-26/tap_type.svg +++ b/resources-icons-26/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-28/drawables.xml b/resources-icons-28/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-28/drawables.xml +++ b/resources-icons-28/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-28/error.svg b/resources-icons-28/error.svg index a66bb50..26249b3 100644 --- a/resources-icons-28/error.svg +++ b/resources-icons-28/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-28/group_type.svg b/resources-icons-28/group_type.svg index fd6eb11..58f0511 100644 --- a/resources-icons-28/group_type.svg +++ b/resources-icons-28/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-28/info_type.svg b/resources-icons-28/info_type.svg index f8a23be..1a85e51 100644 --- a/resources-icons-28/info_type.svg +++ b/resources-icons-28/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-28/numeric_type.svg b/resources-icons-28/numeric_type.svg new file mode 100644 index 0000000..e6554c8 --- /dev/null +++ b/resources-icons-28/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-28/tap_type.svg b/resources-icons-28/tap_type.svg index 64506f8..5a310a8 100644 --- a/resources-icons-28/tap_type.svg +++ b/resources-icons-28/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-30/drawables.xml b/resources-icons-30/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-30/drawables.xml +++ b/resources-icons-30/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-30/error.svg b/resources-icons-30/error.svg index 80de13d..525cb55 100644 --- a/resources-icons-30/error.svg +++ b/resources-icons-30/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-30/group_type.svg b/resources-icons-30/group_type.svg index c36b512..025f20f 100644 --- a/resources-icons-30/group_type.svg +++ b/resources-icons-30/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-30/info_type.svg b/resources-icons-30/info_type.svg index d21f4cf..45b0df1 100644 --- a/resources-icons-30/info_type.svg +++ b/resources-icons-30/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-30/numeric_type.svg b/resources-icons-30/numeric_type.svg new file mode 100644 index 0000000..0c66836 --- /dev/null +++ b/resources-icons-30/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-30/tap_type.svg b/resources-icons-30/tap_type.svg index 70f99b8..292f787 100644 --- a/resources-icons-30/tap_type.svg +++ b/resources-icons-30/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-32/drawables.xml b/resources-icons-32/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-32/drawables.xml +++ b/resources-icons-32/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-32/error.svg b/resources-icons-32/error.svg index 3e1eff5..816dc5b 100644 --- a/resources-icons-32/error.svg +++ b/resources-icons-32/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-32/group_type.svg b/resources-icons-32/group_type.svg index b1199a8..8f20961 100644 --- a/resources-icons-32/group_type.svg +++ b/resources-icons-32/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-32/info_type.svg b/resources-icons-32/info_type.svg index b62fabe..3c5e9ea 100644 --- a/resources-icons-32/info_type.svg +++ b/resources-icons-32/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-32/numeric_type.svg b/resources-icons-32/numeric_type.svg new file mode 100644 index 0000000..043893e --- /dev/null +++ b/resources-icons-32/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-32/tap_type.svg b/resources-icons-32/tap_type.svg index 5137c9f..0bf7030 100644 --- a/resources-icons-32/tap_type.svg +++ b/resources-icons-32/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-34/drawables.xml b/resources-icons-34/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-34/drawables.xml +++ b/resources-icons-34/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-34/error.svg b/resources-icons-34/error.svg index f015c3f..9124fb2 100644 --- a/resources-icons-34/error.svg +++ b/resources-icons-34/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-34/group_type.svg b/resources-icons-34/group_type.svg index 9b20a55..07ee952 100644 --- a/resources-icons-34/group_type.svg +++ b/resources-icons-34/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-34/info_type.svg b/resources-icons-34/info_type.svg index aa79943..8fcc6e6 100644 --- a/resources-icons-34/info_type.svg +++ b/resources-icons-34/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-34/numeric_type.svg b/resources-icons-34/numeric_type.svg new file mode 100644 index 0000000..8158de3 --- /dev/null +++ b/resources-icons-34/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-34/tap_type.svg b/resources-icons-34/tap_type.svg index cf998ef..25747ce 100644 --- a/resources-icons-34/tap_type.svg +++ b/resources-icons-34/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-38/drawables.xml b/resources-icons-38/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-38/drawables.xml +++ b/resources-icons-38/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-38/error.svg b/resources-icons-38/error.svg index b7e88e9..876a460 100644 --- a/resources-icons-38/error.svg +++ b/resources-icons-38/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-38/group_type.svg b/resources-icons-38/group_type.svg index 0dd07c3..2429826 100644 --- a/resources-icons-38/group_type.svg +++ b/resources-icons-38/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-38/info_type.svg b/resources-icons-38/info_type.svg index c1a797a..c0963d2 100644 --- a/resources-icons-38/info_type.svg +++ b/resources-icons-38/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-38/numeric_type.svg b/resources-icons-38/numeric_type.svg new file mode 100644 index 0000000..468a596 --- /dev/null +++ b/resources-icons-38/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-38/tap_type.svg b/resources-icons-38/tap_type.svg index 4473be2..b1d8013 100644 --- a/resources-icons-38/tap_type.svg +++ b/resources-icons-38/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-42/drawables.xml b/resources-icons-42/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-42/drawables.xml +++ b/resources-icons-42/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-42/error.svg b/resources-icons-42/error.svg index 4fe488b..f90c715 100644 --- a/resources-icons-42/error.svg +++ b/resources-icons-42/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-42/group_type.svg b/resources-icons-42/group_type.svg index 93b4995..d8f37c3 100644 --- a/resources-icons-42/group_type.svg +++ b/resources-icons-42/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-42/info_type.svg b/resources-icons-42/info_type.svg index bd0a6e7..5fb0efc 100644 --- a/resources-icons-42/info_type.svg +++ b/resources-icons-42/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-42/numeric_type.svg b/resources-icons-42/numeric_type.svg new file mode 100644 index 0000000..b5e2ef4 --- /dev/null +++ b/resources-icons-42/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-42/tap_type.svg b/resources-icons-42/tap_type.svg index 03f4f0e..dd9ec87 100644 --- a/resources-icons-42/tap_type.svg +++ b/resources-icons-42/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-46/drawables.xml b/resources-icons-46/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-46/drawables.xml +++ b/resources-icons-46/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-46/error.svg b/resources-icons-46/error.svg index 7e52e6d..18622f1 100644 --- a/resources-icons-46/error.svg +++ b/resources-icons-46/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-46/group_type.svg b/resources-icons-46/group_type.svg index 26c6b42..ff55b1b 100644 --- a/resources-icons-46/group_type.svg +++ b/resources-icons-46/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-46/info_type.svg b/resources-icons-46/info_type.svg index 7e28228..234f34e 100644 --- a/resources-icons-46/info_type.svg +++ b/resources-icons-46/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-46/numeric_type.svg b/resources-icons-46/numeric_type.svg new file mode 100644 index 0000000..bfda50f --- /dev/null +++ b/resources-icons-46/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-46/tap_type.svg b/resources-icons-46/tap_type.svg index b95b22d..a021725 100644 --- a/resources-icons-46/tap_type.svg +++ b/resources-icons-46/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-48/drawables.xml b/resources-icons-48/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-48/drawables.xml +++ b/resources-icons-48/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-48/error.svg b/resources-icons-48/error.svg index c864600..f6eea5b 100644 --- a/resources-icons-48/error.svg +++ b/resources-icons-48/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-48/group_type.svg b/resources-icons-48/group_type.svg index 322ef7d..a808fb2 100644 --- a/resources-icons-48/group_type.svg +++ b/resources-icons-48/group_type.svg @@ -1,7 +1,15 @@ - - - - - - + + + + + + + + + diff --git a/resources-icons-48/info_type.svg b/resources-icons-48/info_type.svg index 889ec4b..93d2421 100644 --- a/resources-icons-48/info_type.svg +++ b/resources-icons-48/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-48/numeric_type.svg b/resources-icons-48/numeric_type.svg new file mode 100644 index 0000000..f72babe --- /dev/null +++ b/resources-icons-48/numeric_type.svg @@ -0,0 +1,16 @@ + + + + + 1 + 2 + 3 + diff --git a/resources-icons-48/tap_type.svg b/resources-icons-48/tap_type.svg index 35d175c..3aa8193 100644 --- a/resources-icons-48/tap_type.svg +++ b/resources-icons-48/tap_type.svg @@ -1 +1,13 @@ - + + + + + + + + diff --git a/resources-icons-53/drawables.xml b/resources-icons-53/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-53/drawables.xml +++ b/resources-icons-53/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-53/error.svg b/resources-icons-53/error.svg index eb83c50..cd83137 100644 --- a/resources-icons-53/error.svg +++ b/resources-icons-53/error.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + diff --git a/resources-icons-53/group_type.svg b/resources-icons-53/group_type.svg index 42a64e1..2e53545 100644 --- a/resources-icons-53/group_type.svg +++ b/resources-icons-53/group_type.svg @@ -1,7 +1,15 @@ - - - - - - - \ No newline at end of file + + + + + + + + + + diff --git a/resources-icons-53/info_type.svg b/resources-icons-53/info_type.svg index 16b10d6..22ad459 100644 --- a/resources-icons-53/info_type.svg +++ b/resources-icons-53/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-53/numeric_type.svg b/resources-icons-53/numeric_type.svg new file mode 100644 index 0000000..f2dd2ea --- /dev/null +++ b/resources-icons-53/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-53/tap_type.svg b/resources-icons-53/tap_type.svg index 2dad00c..4f4d8f7 100644 --- a/resources-icons-53/tap_type.svg +++ b/resources-icons-53/tap_type.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + + diff --git a/resources-icons-55/drawables.xml b/resources-icons-55/drawables.xml index 33c0707..bfa0670 100644 --- a/resources-icons-55/drawables.xml +++ b/resources-icons-55/drawables.xml @@ -20,4 +20,5 @@ + diff --git a/resources-icons-55/error.svg b/resources-icons-55/error.svg index 47ef4c9..bd95e43 100644 --- a/resources-icons-55/error.svg +++ b/resources-icons-55/error.svg @@ -1 +1,16 @@ - + + + + + + + + + diff --git a/resources-icons-55/group_type.svg b/resources-icons-55/group_type.svg index 3596e4c..8fefa93 100644 --- a/resources-icons-55/group_type.svg +++ b/resources-icons-55/group_type.svg @@ -1,7 +1,15 @@ - - - - - - + + + + + + + + + diff --git a/resources-icons-55/info_type.svg b/resources-icons-55/info_type.svg index 7e33a82..4f81fda 100644 --- a/resources-icons-55/info_type.svg +++ b/resources-icons-55/info_type.svg @@ -1 +1,15 @@ - + + + + + + + + + diff --git a/resources-icons-55/numeric_type.svg b/resources-icons-55/numeric_type.svg new file mode 100644 index 0000000..09b281a --- /dev/null +++ b/resources-icons-55/numeric_type.svg @@ -0,0 +1,16 @@ + + + + +1 +2 +3 + diff --git a/resources-icons-55/tap_type.svg b/resources-icons-55/tap_type.svg index 913a870..729f4e2 100644 --- a/resources-icons-55/tap_type.svg +++ b/resources-icons-55/tap_type.svg @@ -1 +1,13 @@ - + + + + + + + + diff --git a/resources-launcher-68-68/launcher.svg b/resources-launcher-68-68/launcher.svg index 2d63153..3fdea64 100644 --- a/resources-launcher-68-68/launcher.svg +++ b/resources-launcher-68-68/launcher.svg @@ -1,4 +1,4 @@ - + - + \ No newline at end of file diff --git a/source/HomeAssistantMenuItemFactory.mc b/source/HomeAssistantMenuItemFactory.mc index d18ba58..23f8069 100644 --- a/source/HomeAssistantMenuItemFactory.mc +++ b/source/HomeAssistantMenuItemFactory.mc @@ -24,6 +24,7 @@ class HomeAssistantMenuItemFactory { private var mTapTypeIcon as WatchUi.Bitmap; private var mGroupTypeIcon as WatchUi.Bitmap; private var mInfoTypeIcon as WatchUi.Bitmap; + private var mNumericTypeIcon as WatchUi.Bitmap; private var mHomeAssistantService as HomeAssistantService; private static var instance; @@ -51,6 +52,12 @@ class HomeAssistantMenuItemFactory { :locY => WatchUi.LAYOUT_VALIGN_CENTER }); + mNumericTypeIcon = new WatchUi.Bitmap({ + :rezId => $.Rez.Drawables.NumericTypeIcon, + :locX => WatchUi.LAYOUT_HALIGN_CENTER, + :locY => WatchUi.LAYOUT_VALIGN_CENTER + }); + mHomeAssistantService = new HomeAssistantService(); } @@ -172,7 +179,7 @@ class HomeAssistantMenuItemFactory { for (var i = 0; i < keys.size(); i++) { options[keys[i]] = mMenuItemOptions.get(keys[i]); } - options[:icon] = mTapTypeIcon; + options[:icon] = mNumericTypeIcon; return new HomeAssistantNumericMenuItem( label, template, diff --git a/translate.cmd b/translate.cmd index 0b504fb..031e5fb 100644 --- a/translate.cmd +++ b/translate.cmd @@ -14,10 +14,6 @@ rem J D Abbey & P A Abbey, 28 December 2022 rem rem Run the automatic translation script. rem -rem Reference: -rem * Using Monkey C from the Command Line -rem https://developer.garmin.com/connect-iq/reference-guides/monkey-c-command-line-setup/ -rem rem ----------------------------------------------------------------------------------- rem 'pip' instructs us to add this to the PATH for 'websockets.exe' and 'httpx.exe'