Skip to content

Commit ab84fc1

Browse files
trevarjJamie C. Driver
authored andcommitted
ui: scroll status bar unit id on tall narrow screens
1 parent d4517f4 commit ab84fc1

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

main/gui.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ static void make_status_bar(void)
196196
status_bar.battery_update_counter = 0;
197197
}
198198

199+
gui_view_node_t* gui_status_bar_title(void) { return status_bar.title; }
200+
199201
gui_event_t gui_get_click_event(void) { return gui_click_event; }
200202

201203
void gui_set_click_event(const bool use_wheel_click)

main/gui.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ void gui_set_activity_title(gui_activity_t* activity, const char* title);
461461

462462
gui_activity_t* gui_current_activity(void);
463463
gui_activity_t* gui_display_splash(void);
464+
gui_view_node_t* gui_status_bar_title(void);
464465

465466
void gui_wheel_click(void);
466467
void gui_front_click(void);

main/process/dashboard.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2722,6 +2722,12 @@ void dashboard_process(void* process_ptr)
27222722
JADE_ASSERT(status_text);
27232723
JADE_ASSERT(label);
27242724

2725+
#if HOME_SCREEN_DEEP_STATUS_BAR && (CONFIG_DISPLAY_WIDTH <= 280)
2726+
gui_view_node_t* status_bar_title = gui_status_bar_title();
2727+
status_bar_title->activity = act_home; // FIXME: not sure this is ideal
2728+
gui_set_text_scroll(status_bar_title, TFT_BLACK);
2729+
#endif
2730+
27252731
// We may as well associate the long-lived event data with this activity also
27262732
wait_event_data_t* const event_data = gui_activity_make_wait_event_data(act_home);
27272733
JADE_ASSERT(event_data);

0 commit comments

Comments
 (0)