Allow using system backlight color

This commit is contained in:
2026-06-13 15:16:39 -04:00
parent 66831e4833
commit d067194cb5
6 changed files with 40 additions and 3 deletions
+10 -1
View File
@@ -218,7 +218,11 @@ static void accel_tap_handler(AccelAxisType axis, int32_t direction) {
static void apply_settings(bool first_run) {
// LED&BG
light_set_color(settings.ColorLED); // no-op on unsupported platforms
if (settings.UseCustomLED) {
light_set_color(settings.ColorLED); // no-op on unsupported platforms
} else {
light_set_system_color();
}
window_set_background_color(s_main_window, settings.ColorBG);
// TIME MG
@@ -381,6 +385,7 @@ static void inbox_received_handler(DictionaryIterator *iter, void *context) {
// CLAY SETTINGS
Tuple *track_bt_tuple = dict_find(iter, MESSAGE_KEY_CLAY_BT_INDICATOR);
Tuple *show_time_mg_tuple = dict_find(iter, MESSAGE_KEY_CLAY_SHOW_TIME_MG);
Tuple *use_custom_led_tuple = dict_find(iter, MESSAGE_KEY_CLAY_USE_CUSTOM_LED);
Tuple *date_timeout_tuple = dict_find(iter, MESSAGE_KEY_CLAY_DATE_TIMEOUT);
Tuple *low_fuel_percent_tuple = dict_find(iter, MESSAGE_KEY_CLAY_LOW_FUEL_PERCENT);
Tuple *color_led_tuple = dict_find(iter, MESSAGE_KEY_CLAY_LED_COLOR);
@@ -397,6 +402,9 @@ static void inbox_received_handler(DictionaryIterator *iter, void *context) {
if (show_time_mg_tuple) {
settings.ShowTimeMG = show_time_mg_tuple->value->uint8;
}
if (use_custom_led_tuple) {
settings.UseCustomLED = use_custom_led_tuple->value->uint8;
}
if (date_timeout_tuple) {
settings.DateTimeoutSecs = date_timeout_tuple->value->uint8;
}
@@ -438,6 +446,7 @@ static void init() {
} else {
settings.TrackBTStatus = false;
settings.ShowTimeMG = false;
settings.UseCustomLED = false;
settings.DateTimeoutSecs = 3;
settings.LowFuelPercent = 20;
settings.ColorLED = GColorWhite;