mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
Add a slight hover highlight to GButton and WSButton. :^)
This commit is contained in:
parent
22c204af66
commit
f12573cb63
6 changed files with 40 additions and 13 deletions
|
@ -239,7 +239,7 @@ void WSWindowFrame::on_mouse_event(const WSMouseEvent& event)
|
|||
|
||||
for (auto& button : m_buttons) {
|
||||
if (button->relative_rect().contains(event.position()))
|
||||
return button->on_mouse_event(event);
|
||||
return button->on_mouse_event(event.translated(-button->relative_rect().location()));
|
||||
}
|
||||
if (event.type() == WSMessage::MouseDown && event.button() == MouseButton::Left)
|
||||
wm.start_window_drag(m_window, event.translated(rect().location()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue