mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibGUI: Use widget override cursors in GUI::Splitter
This commit is contained in:
parent
f475fa3f54
commit
e2050ea0ce
Notes:
sideshowbarker
2024-07-19 02:46:59 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e2050ea0ce2
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue