LibGUI: Use widget override cursors in GUI::ResizeCorner

This commit is contained in:
Andreas Kling 2020-09-11 14:47:38 +02:00
parent 8f5b92865d
commit 69adaf3308
Notes: sideshowbarker 2024-07-19 02:46:47 +09:00
2 changed files with 1 additions and 14 deletions

View file

@ -77,6 +77,7 @@ static const int s_resize_corner_bitmap_height = 16;
ResizeCorner::ResizeCorner()
{
set_override_cursor(Gfx::StandardCursor::ResizeDiagonalTLBR);
set_background_role(ColorRole::Button);
set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
set_preferred_size(16, 18);
@ -110,16 +111,4 @@ void ResizeCorner::mousedown_event(MouseEvent& event)
Widget::mousedown_event(event);
}
void ResizeCorner::enter_event(Core::Event& event)
{
window()->set_cursor(Gfx::StandardCursor::ResizeDiagonalTLBR);
Widget::enter_event(event);
}
void ResizeCorner::leave_event(Core::Event& event)
{
window()->set_cursor(Gfx::StandardCursor::None);
Widget::leave_event(event);
}
}

View file

@ -40,8 +40,6 @@ protected:
virtual void paint_event(PaintEvent&) override;
virtual void mousedown_event(MouseEvent&) override;
virtual void enter_event(Core::Event&) override;
virtual void leave_event(Core::Event&) override;
};
}