mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibGUI: Move the editing widget along with the content when scrolling.
This commit is contained in:
@@ -41,3 +41,15 @@ void GAbstractView::did_update_model()
|
||||
void GAbstractView::did_update_selection()
|
||||
{
|
||||
}
|
||||
|
||||
void GAbstractView::did_scroll()
|
||||
{
|
||||
update_edit_widget_position();
|
||||
}
|
||||
|
||||
void GAbstractView::update_edit_widget_position()
|
||||
{
|
||||
if (!m_edit_widget)
|
||||
return;
|
||||
m_edit_widget->set_relative_rect(m_edit_widget_content_rect.translated(-horizontal_scrollbar().value(), -vertical_scrollbar().value()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user