Skip to content

Commit

Permalink
fixup! fixup! feat(ui-widgets): add scrollarea
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Dec 7, 2024
1 parent fe78d2e commit fa18187
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/ui-widgets/src/scrollarea.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,13 @@ static void ui_scrollarea_init(ui_widget_t *w)
ui_widget_on(w, "touchup", ui_scrollarea_on_touch, NULL);
}

static void ui_scrollarea_destroy(ui_widget_t *w)
{
ui_scrollarea_t *that = ui_widget_get_data(w, ui_scrollarea_proto);

ui_mutation_observer_destroy(that->observer);
}

void ui_scrollarea_set_scroll_top(ui_widget_t *w, float value)
{
ui_scrollarea_t *that = ui_widget_get_data(w, ui_scrollarea_proto);
Expand Down Expand Up @@ -342,6 +349,7 @@ void ui_register_scrollarea(void)
{
ui_scrollarea_proto = ui_create_widget_prototype("scrollarea", NULL);
ui_scrollarea_proto->init = ui_scrollarea_init;
ui_scrollarea_proto->destroy = ui_scrollarea_destroy;

ui_scrollarea_content_proto =
ui_create_widget_prototype("scrollarea-content", NULL);
Expand Down

0 comments on commit fa18187

Please sign in to comment.