LibGUI: Make the calendar widget scrollable

This commit is contained in:
implicitfield 2023-06-20 19:37:28 +04:00 committed by Ali Mohammad Pur
commit e504b63406
Notes: sideshowbarker 2024-07-17 08:38:37 +09:00
3 changed files with 20 additions and 1 deletions

View file

@ -83,6 +83,10 @@ ClockWidget::ClockWidget()
m_calendar = calendar_container.add<GUI::Calendar>();
m_selected_calendar_button->set_text(m_calendar->formatted_date().release_value_but_fixme_should_propagate_errors());
m_calendar->on_scroll = [&] {
update_selected_calendar_button();
};
m_calendar->on_tile_click = [&] {
m_selected_calendar_button->set_text(m_calendar->formatted_date().release_value_but_fixme_should_propagate_errors());
};