mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
LibGUI: Don't hover AbstractView indicies outside visible content
Fixes ComboBox ListView erroneously setting and scrolling to indicies just outside its inner rect when mousing along the bottom or top of the frame.
This commit is contained in:
parent
b79b70f197
commit
207409c925
Notes:
sideshowbarker
2024-07-16 22:17:03 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/207409c925 Pull-request: https://github.com/SerenityOS/serenity/pull/18177
@ -291,8 +291,10 @@ void AbstractView::mousemove_event(MouseEvent& event)
|
||||
if (!model())
|
||||
return AbstractScrollableWidget::mousemove_event(event);
|
||||
|
||||
auto hovered_index = index_at_event_position(event.position());
|
||||
set_hovered_index(hovered_index);
|
||||
if (widget_inner_rect().contains(event.position())) {
|
||||
auto hovered_index = index_at_event_position(event.position());
|
||||
set_hovered_index(hovered_index);
|
||||
}
|
||||
|
||||
auto data_type = m_model->drag_data_type();
|
||||
if (data_type.is_null())
|
||||
|
Loading…
Reference in New Issue
Block a user