mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +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:
committed by
Andreas Kling
parent
b79b70f197
commit
207409c925
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user