mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 15:55:08 +00:00
LibGUI: Move the editing widget along with the content when scrolling.
This commit is contained in:
parent
568f3125f3
commit
9cab7a0707
5 changed files with 21 additions and 1 deletions
|
@ -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()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue