mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00: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
1 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue