fix: explicitly add launcher buttons and power button to default group, declare stopScreensaverLocked, and disable idle screensaver timer on monochrome/RLCD screens
This commit is contained in:
@@ -54,6 +54,11 @@ class LauncherApp final : public App {
|
||||
lv_obj_set_style_outline_pad(apps_button, 2, LV_STATE_FOCUSED);
|
||||
lv_obj_set_style_outline_color(apps_button, lv_theme_get_color_primary(apps_button), LV_STATE_FOCUSED);
|
||||
|
||||
auto* default_group = lv_group_get_default();
|
||||
if (default_group) {
|
||||
lv_group_add_obj(default_group, apps_button);
|
||||
}
|
||||
|
||||
// create the image first
|
||||
auto* button_image = lv_image_create(apps_button);
|
||||
lv_obj_set_style_text_font(button_image, lvgl_get_launcher_icon_font(), LV_STATE_DEFAULT);
|
||||
@@ -218,6 +223,16 @@ public:
|
||||
lv_obj_set_style_shadow_width(power_button, 0, LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(power_button, 0, LV_PART_MAIN);
|
||||
|
||||
// Add high-contrast focus outline for monochrome / RLCD screens
|
||||
lv_obj_set_style_outline_width(power_button, 2, LV_STATE_FOCUSED);
|
||||
lv_obj_set_style_outline_pad(power_button, 2, LV_STATE_FOCUSED);
|
||||
lv_obj_set_style_outline_color(power_button, lv_theme_get_color_primary(power_button), LV_STATE_FOCUSED);
|
||||
|
||||
auto* default_group = lv_group_get_default();
|
||||
if (default_group) {
|
||||
lv_group_add_obj(default_group, power_button);
|
||||
}
|
||||
|
||||
auto* power_label = lv_label_create(power_button);
|
||||
lv_label_set_text(power_label, LV_SYMBOL_POWER);
|
||||
lv_obj_set_style_text_color(power_label, lv_theme_get_color_primary(parent), LV_STATE_DEFAULT);
|
||||
|
||||
Reference in New Issue
Block a user