mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-17 23:55:04 +00:00
Scrollable improvements
This commit is contained in:
parent
9373004c44
commit
b53c558335
@ -99,6 +99,7 @@ lv_obj_t* build_window_widget(lv_obj_t* content, WindowCreateWidgetsFn create_wi
|
|||||||
lv_obj_set_style_pad_all(widget, 0, LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_all(widget, 0, LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_width(widget, 0, LV_STATE_DEFAULT);
|
lv_obj_set_style_border_width(widget, 0, LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_radius(widget, 0, LV_STATE_DEFAULT);
|
lv_obj_set_style_radius(widget, 0, LV_STATE_DEFAULT);
|
||||||
|
lv_obj_remove_flag(widget, LV_OBJ_FLAG_SCROLLABLE);
|
||||||
if (create_widgets != nullptr) {
|
if (create_widgets != nullptr) {
|
||||||
create_widgets(widget, user_data);
|
create_widgets(widget, user_data);
|
||||||
}
|
}
|
||||||
@ -197,6 +198,8 @@ error_t window_manager_start(void) {
|
|||||||
lv_obj_set_style_pad_all(real_widget, 0, LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_all(real_widget, 0, LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_width(real_widget, 0, LV_STATE_DEFAULT);
|
lv_obj_set_style_border_width(real_widget, 0, LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_radius(real_widget, 0, LV_STATE_DEFAULT);
|
lv_obj_set_style_radius(real_widget, 0, LV_STATE_DEFAULT);
|
||||||
|
// See build_window_widget()'s identical call for why.
|
||||||
|
lv_obj_remove_flag(real_widget, LV_OBJ_FLAG_SCROLLABLE);
|
||||||
|
|
||||||
content_widget = (screen_init != nullptr) ? screen_init(real_widget) : nullptr;
|
content_widget = (screen_init != nullptr) ? screen_init(real_widget) : nullptr;
|
||||||
if (content_widget == nullptr) {
|
if (content_widget == nullptr) {
|
||||||
|
|||||||
@ -374,6 +374,7 @@ static lv_obj_t* windowManagerScreenInit(lv_obj_t* root) {
|
|||||||
lv_obj_set_style_bg_color(vertical_container, lv_color_black(), LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_color(vertical_container, lv_color_black(), LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_width(vertical_container, 0, LV_STATE_DEFAULT);
|
lv_obj_set_style_border_width(vertical_container, 0, LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_radius(vertical_container, 0, LV_STATE_DEFAULT);
|
lv_obj_set_style_radius(vertical_container, 0, LV_STATE_DEFAULT);
|
||||||
|
lv_obj_remove_flag(vertical_container, LV_OBJ_FLAG_SCROLLABLE);
|
||||||
|
|
||||||
lvgl::statusbar_create(vertical_container);
|
lvgl::statusbar_create(vertical_container);
|
||||||
|
|
||||||
@ -383,6 +384,7 @@ static lv_obj_t* windowManagerScreenInit(lv_obj_t* root) {
|
|||||||
lv_obj_set_width(app_container, LV_PCT(100));
|
lv_obj_set_width(app_container, LV_PCT(100));
|
||||||
lv_obj_set_flex_grow(app_container, 1);
|
lv_obj_set_flex_grow(app_container, 1);
|
||||||
lv_obj_set_flex_flow(app_container, LV_FLEX_FLOW_COLUMN);
|
lv_obj_set_flex_flow(app_container, LV_FLEX_FLOW_COLUMN);
|
||||||
|
lv_obj_remove_flag(app_container, LV_OBJ_FLAG_SCROLLABLE);
|
||||||
|
|
||||||
// Parented to root (not app_container/vertical_container) so it overlays on top of
|
// Parented to root (not app_container/vertical_container) so it overlays on top of
|
||||||
// everything, including the statusbar, regardless of which app is showing. Hidden until a
|
// everything, including the statusbar, regardless of which app is showing. Hidden until a
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user