mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibGUI: Brighten icons when hovering items in item views
View classes now track their hovered item and paint them in a slightly brighter shade to liven up the user interface. :^)
This commit is contained in:
@@ -193,7 +193,16 @@ void AbstractView::mousedown_event(MouseEvent& event)
|
||||
|
||||
void AbstractView::mousemove_event(MouseEvent& event)
|
||||
{
|
||||
if (!model() || !m_might_drag)
|
||||
if (!model())
|
||||
return ScrollableWidget::mousemove_event(event);
|
||||
|
||||
auto hovered_index = index_at_event_position(event.position());
|
||||
if (m_hovered_index != hovered_index) {
|
||||
m_hovered_index = hovered_index;
|
||||
update();
|
||||
}
|
||||
|
||||
if (!m_might_drag)
|
||||
return ScrollableWidget::mousemove_event(event);
|
||||
|
||||
if (!(event.buttons() & MouseButton::Left) || m_selection.is_empty()) {
|
||||
|
||||
Reference in New Issue
Block a user