From bdc71e087f70528fb9f4f8d08562eb4973ee6772 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 3 Sep 2026 01:32:55 -0400 Subject: [PATCH] Add Gabbro-specific CHEF icons --- package.json | 20 +++-------- resources/{C.png => C~rect.png} | Bin resources/C~round.png | Bin 0 -> 97 bytes resources/{E.png => E~rect.png} | Bin resources/E~round.png | Bin 0 -> 103 bytes resources/{F.png => F~rect.png} | Bin resources/F~round.png | Bin 0 -> 99 bytes resources/{H.png => H~rect.png} | Bin resources/H~round.png | Bin 0 -> 88 bytes src/c/main.c | 58 ++++++++++++-------------------- 10 files changed, 26 insertions(+), 52 deletions(-) rename resources/{C.png => C~rect.png} (100%) create mode 100644 resources/C~round.png rename resources/{E.png => E~rect.png} (100%) create mode 100644 resources/E~round.png rename resources/{F.png => F~rect.png} (100%) create mode 100644 resources/F~round.png rename resources/{H.png => H~rect.png} (100%) create mode 100644 resources/H~round.png diff --git a/package.json b/package.json index 78780c7..f8f9b59 100644 --- a/package.json +++ b/package.json @@ -67,40 +67,28 @@ "memoryFormat": "Smallest", "name": "E", "spaceOptimization": "storage", - "type": "bitmap", - "targetPlatforms": [ - "emery" - ] + "type": "bitmap" }, { "file": "F.png", "memoryFormat": "Smallest", "name": "F", "spaceOptimization": "storage", - "type": "bitmap", - "targetPlatforms": [ - "emery" - ] + "type": "bitmap" }, { "file": "C.png", "memoryFormat": "Smallest", "name": "C", "spaceOptimization": "storage", - "type": "bitmap", - "targetPlatforms": [ - "emery" - ] + "type": "bitmap" }, { "file": "H.png", "memoryFormat": "Smallest", "name": "H", "spaceOptimization": "storage", - "type": "bitmap", - "targetPlatforms": [ - "emery" - ] + "type": "bitmap" }, { "file": "0.png", diff --git a/resources/C.png b/resources/C~rect.png similarity index 100% rename from resources/C.png rename to resources/C~rect.png diff --git a/resources/C~round.png b/resources/C~round.png new file mode 100644 index 0000000000000000000000000000000000000000..68c851280a801c0e380a48fe14708426d979eae0 GIT binary patch literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xkYHHq`AGmsF_i@Q1v4;|O+IS@LyrTetv?rU7)YelF{r5}E*4w;Tfi literal 0 HcmV?d00001 diff --git a/resources/H.png b/resources/H~rect.png similarity index 100% rename from resources/H.png rename to resources/H~rect.png diff --git a/resources/H~round.png b/resources/H~round.png new file mode 100644 index 0000000000000000000000000000000000000000..5321c1d4bc8a9de932a8b05a4f8a517242104f5e GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xkYHHq`AGmsF_i@Q1v4;|O+IS@argb == new_color.argb) @@ -228,17 +216,17 @@ static void temp_fuel_mg_update_proc_helper(Layer *layer, GContext *ctx, bool is graphics_context_set_fill_color(ctx, settings.ColorBarsMG); graphics_context_set_antialiased(ctx, false); if (isFuel) { - graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset)), GOvalScaleModeFitCircle, s_bar_width + 2, DEG_TO_TRIGANGLE(s_bar_fuel_deg_top), DEG_TO_TRIGANGLE(s_bar_fuel_deg_bottom)); - // graphics_context_set_fill_color(ctx, settings.ColorBarsCool); - // graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset+2)), GOvalScaleModeFitCircle, s_bar_width - 2, DEG_TO_TRIGANGLE(s_bar_fuel_deg_top + 1), DEG_TO_TRIGANGLE(s_bar_fuel_deg_top + 2)); - // graphics_context_set_fill_color(ctx, settings.ColorBarsHot); - // graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset+2)), GOvalScaleModeFitCircle, s_bar_width - 2, DEG_TO_TRIGANGLE(s_bar_fuel_deg_bottom - 2), DEG_TO_TRIGANGLE(s_bar_fuel_deg_bottom - 1)); + graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset)), GOvalScaleModeFitCircle, s_bar_width + 2, DEG_TO_TRIGANGLE(s_bar_fuel_deg_top - 2), DEG_TO_TRIGANGLE(s_bar_fuel_deg_bottom + 2)); + graphics_context_set_fill_color(ctx, settings.ColorBarsCool); + graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset + 2)), GOvalScaleModeFitCircle, s_bar_width - 2, DEG_TO_TRIGANGLE(s_bar_fuel_deg_top - 1.5), DEG_TO_TRIGANGLE(s_bar_fuel_deg_top)); + graphics_context_set_fill_color(ctx, settings.ColorBarsHot); + graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset + 2)), GOvalScaleModeFitCircle, s_bar_width - 2, DEG_TO_TRIGANGLE(s_bar_fuel_deg_bottom), DEG_TO_TRIGANGLE(s_bar_fuel_deg_bottom + 1.5)); } else { - graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset)), GOvalScaleModeFitCircle, s_bar_width + 2, DEG_TO_TRIGANGLE(s_bar_temp_deg_bottom), DEG_TO_TRIGANGLE(s_bar_temp_deg_top)); - // graphics_context_set_fill_color(ctx, settings.ColorBarsCool); - // graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset+2)), GOvalScaleModeFitCircle, s_bar_width - 2, DEG_TO_TRIGANGLE(s_bar_temp_deg_bottom + 1), DEG_TO_TRIGANGLE(s_bar_temp_deg_bottom + 2)); - // graphics_context_set_fill_color(ctx, settings.ColorBarsHot); - // graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset+2)), GOvalScaleModeFitCircle, s_bar_width - 2, DEG_TO_TRIGANGLE(s_bar_temp_deg_top - 2), DEG_TO_TRIGANGLE(s_bar_temp_deg_top - 1)); + graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset)), GOvalScaleModeFitCircle, s_bar_width + 2, DEG_TO_TRIGANGLE(s_bar_temp_deg_bottom - 2), DEG_TO_TRIGANGLE(s_bar_temp_deg_top + 2)); + graphics_context_set_fill_color(ctx, settings.ColorBarsCool); + graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset + 2)), GOvalScaleModeFitCircle, s_bar_width - 2, DEG_TO_TRIGANGLE(s_bar_temp_deg_bottom - 1.5), DEG_TO_TRIGANGLE(s_bar_temp_deg_bottom)); + graphics_context_set_fill_color(ctx, settings.ColorBarsHot); + graphics_fill_radial(ctx, grect_inset(bounds, GEdgeInsets(s_bar_base_inset + 2)), GOvalScaleModeFitCircle, s_bar_width - 2, DEG_TO_TRIGANGLE(s_bar_temp_deg_top), DEG_TO_TRIGANGLE(s_bar_temp_deg_top + 1.5)); } } #endif @@ -585,6 +573,17 @@ static void main_window_load() { s_h_layer = bitmap_layer_create(GRect(s_temp_guage_x_pos, 3, 17, 14)); s_e_layer = bitmap_layer_create(GRect(s_fuel_guage_x_pos, PBL_DISPLAY_HEIGHT - 18, 17, 15)); s_f_layer = bitmap_layer_create(GRect(s_fuel_guage_x_pos, 3, 17, 14)); + s_temp_mg_layer = layer_create(GRect(s_temp_guage_x_pos - 1, 21, s_bar_width + 2, PBL_DISPLAY_HEIGHT - 43)); + s_fuel_mg_layer = layer_create(GRect(s_fuel_guage_x_pos - 1, 21, s_bar_width + 2, PBL_DISPLAY_HEIGHT - 43)); +#else + // TODO define constants for coords and dimesnions + s_c_layer = bitmap_layer_create(GRect(s_bar_base_inset + 38, PBL_DISPLAY_HEIGHT - 48, 10, 10)); + s_h_layer = bitmap_layer_create(GRect(s_bar_base_inset + 38, 38, 10, 10)); + s_e_layer = bitmap_layer_create(GRect(PBL_DISPLAY_WIDTH - s_bar_base_inset - 48, PBL_DISPLAY_HEIGHT - 48, 10, 10)); + s_f_layer = bitmap_layer_create(GRect(PBL_DISPLAY_WIDTH - s_bar_base_inset - 48, 38, 10, 10)); + s_temp_mg_layer = layer_create(GRect(0, 0, PBL_DISPLAY_WIDTH, PBL_DISPLAY_HEIGHT)); + s_fuel_mg_layer = layer_create(GRect(0, 0, PBL_DISPLAY_WIDTH, PBL_DISPLAY_HEIGHT)); +#endif bitmap_layer_set_bitmap(s_c_layer, s_c_icon); bitmap_layer_set_bitmap(s_h_layer, s_h_icon); bitmap_layer_set_bitmap(s_e_layer, s_e_icon); @@ -597,13 +596,6 @@ static void main_window_load() { layer_add_child(s_window_layer, bitmap_layer_get_layer(s_h_layer)); layer_add_child(s_window_layer, bitmap_layer_get_layer(s_e_layer)); layer_add_child(s_window_layer, bitmap_layer_get_layer(s_f_layer)); - - s_temp_mg_layer = layer_create(GRect(s_temp_guage_x_pos - 1, 21, s_bar_width + 2, PBL_DISPLAY_HEIGHT - 43)); - s_fuel_mg_layer = layer_create(GRect(s_fuel_guage_x_pos - 1, 21, s_bar_width + 2, PBL_DISPLAY_HEIGHT - 43)); -#else - s_temp_mg_layer = layer_create(GRect(0, 0, PBL_DISPLAY_WIDTH, PBL_DISPLAY_HEIGHT)); - s_fuel_mg_layer = layer_create(GRect(0, 0, PBL_DISPLAY_WIDTH, PBL_DISPLAY_HEIGHT)); -#endif layer_set_update_proc(s_temp_mg_layer, temp_mg_update_proc); layer_set_update_proc(s_fuel_mg_layer, fuel_mg_update_proc); layer_add_child(s_window_layer, s_temp_mg_layer); @@ -630,12 +622,10 @@ static void main_window_unload() { accel_tap_service_unsubscribe(); layer_destroy(s_fuel_mg_layer); layer_destroy(s_temp_mg_layer); -#if PBL_RECT bitmap_layer_destroy(s_f_layer); bitmap_layer_destroy(s_e_layer); bitmap_layer_destroy(s_h_layer); bitmap_layer_destroy(s_c_layer); -#endif if (s_digit_mg_super8_mini) { gbitmap_destroy(s_digit_mg_super8_mini); } @@ -737,12 +727,10 @@ static void init() { for (int i = 0; i < 10; ++i) { s_hour_bitmaps[i] = gbitmap_create_with_resource(s_digit_resource_ids[i]); } -#if PBL_RECT s_c_icon = gbitmap_create_with_resource(RESOURCE_ID_C); s_h_icon = gbitmap_create_with_resource(RESOURCE_ID_H); s_e_icon = gbitmap_create_with_resource(RESOURCE_ID_E); s_f_icon = gbitmap_create_with_resource(RESOURCE_ID_F); -#endif for (int i = 0; i < 4; ++i) { s_digit_fg_layers[i] = bitmap_layer_create(s_digit_grects[i]); @@ -780,12 +768,10 @@ static void deinit() { tick_timer_service_unsubscribe(); layer_destroy(s_fuel_layer); layer_destroy(s_temp_layer); -#if PBL_RECT gbitmap_destroy(s_f_icon); gbitmap_destroy(s_e_icon); gbitmap_destroy(s_h_icon); gbitmap_destroy(s_c_icon); -#endif for (int i = 0; i < 4; ++i) { bitmap_layer_destroy(s_digit_fg_layers[i]); }