1
Fork 0
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:
Andreas Kling 2019-04-06 04:08:09 +02:00
parent 22c204af66
commit f12573cb63
6 changed files with 40 additions and 13 deletions

View file

@ -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()));