LibGUI: Use widget override cursors in GUI::Splitter

This commit is contained in:
Andreas Kling 2020-09-11 14:22:27 +02:00
parent f475fa3f54
commit e2050ea0ce
Notes: sideshowbarker 2024-07-19 02:46:59 +09:00

View file

@ -62,12 +62,12 @@ void Splitter::override_cursor(bool do_override)
{
if (do_override) {
if (!m_overriding_cursor) {
window()->set_cursor(m_orientation == Orientation::Horizontal ? Gfx::StandardCursor::ResizeColumn : Gfx::StandardCursor::ResizeRow);
set_override_cursor(m_orientation == Orientation::Horizontal ? Gfx::StandardCursor::ResizeColumn : Gfx::StandardCursor::ResizeRow);
m_overriding_cursor = true;
}
} else {
if (m_overriding_cursor) {
window()->set_cursor(Gfx::StandardCursor::None);
set_override_cursor(Gfx::StandardCursor::None);
m_overriding_cursor = false;
}
}
@ -198,7 +198,7 @@ void Splitter::mouseup_event(MouseEvent& event)
m_first_resizee = nullptr;
m_second_resizee = nullptr;
if (!rect().contains(event.position()))
window()->set_cursor(Gfx::StandardCursor::None);
set_override_cursor(Gfx::StandardCursor::None);
}
}