Styling fixes for paper displays (#514)

This commit is contained in:
Shadowtrance
2026-03-15 02:40:29 +10:00
committed by GitHub
parent aa7530e515
commit e560cc7df2
15 changed files with 58 additions and 33 deletions
+13 -6
View File
@@ -133,8 +133,6 @@ class NotesApp final : public App {
lv_dropdown_set_text(uiDropDownMenu, "Menu");
lv_dropdown_set_symbol(uiDropDownMenu, LV_SYMBOL_DOWN);
lv_dropdown_set_selected_highlight(uiDropDownMenu, false);
lv_obj_set_style_border_color(uiDropDownMenu, lv_color_hex(0xFAFAFA), LV_PART_MAIN);
lv_obj_set_style_border_width(uiDropDownMenu, 1, LV_PART_MAIN);
lv_obj_align(uiDropDownMenu, LV_ALIGN_RIGHT_MID, 0, 0);
lv_obj_add_event_cb(uiDropDownMenu,
[](lv_event_t* e) {
@@ -153,24 +151,33 @@ class NotesApp final : public App {
lv_obj_set_height(wrapper, LV_PCT(100));
lv_obj_set_style_pad_all(wrapper, 0, LV_PART_MAIN);
lv_obj_set_style_pad_row(wrapper, 0, LV_PART_MAIN);
lv_obj_set_style_border_width(wrapper, 0, 0);
lv_obj_set_style_border_width(wrapper, 0, LV_PART_MAIN);
lv_obj_remove_flag(wrapper, LV_OBJ_FLAG_SCROLLABLE);
uiNoteText = lv_textarea_create(wrapper);
lv_obj_set_width(uiNoteText, LV_PCT(100));
lv_obj_set_height(uiNoteText, LV_PCT(86));
lv_textarea_set_password_mode(uiNoteText, false);
lv_obj_set_style_bg_color(uiNoteText, lv_color_hex(0x262626), LV_PART_MAIN);
if (lv_display_get_color_format(lv_obj_get_display(parent)) != LV_COLOR_FORMAT_L8) {
lv_obj_set_style_bg_color(uiNoteText, lv_color_hex(0x262626), LV_PART_MAIN);
}
lv_textarea_set_placeholder_text(uiNoteText, "Notes...");
lv_obj_t* footer = lv_obj_create(wrapper);
lv_obj_set_flex_flow(footer, LV_FLEX_FLOW_ROW);
lv_obj_set_flex_align(footer, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
lv_obj_set_style_bg_color(footer, lv_color_hex(0x262626), LV_PART_MAIN);
if (lv_display_get_color_format(lv_obj_get_display(parent)) == LV_COLOR_FORMAT_L8) {
lv_obj_set_style_bg_color(footer, lv_color_hex(0xEEEEEE), LV_PART_MAIN);
lv_obj_set_style_border_width(footer, 1, LV_PART_MAIN);
lv_obj_set_style_border_color(footer, lv_theme_get_color_secondary(footer), LV_PART_MAIN);
lv_obj_set_style_border_side(footer, LV_BORDER_SIDE_TOP, LV_PART_MAIN);
} else {
lv_obj_set_style_bg_color(footer, lv_color_hex(0x262626), LV_PART_MAIN);
lv_obj_set_style_border_width(footer, 0, LV_PART_MAIN);
}
lv_obj_set_width(footer, LV_PCT(100));
lv_obj_set_height(footer, LV_PCT(14));
lv_obj_set_style_pad_all(footer, 0, LV_PART_MAIN);
lv_obj_set_style_border_width(footer, 0, 0);
lv_obj_remove_flag(footer, LV_OBJ_FLAG_SCROLLABLE);
uiCurrentFileName = lv_label_create(footer);