1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:47:45 +00:00

LibGfx: Move StandardCursor enum to LibGfx

This enum existed both in LibGUI and WindowServer which was silly and
error-prone.
This commit is contained in:
Andreas Kling 2020-09-10 19:25:13 +02:00
parent c063a02979
commit 0f9be82826
23 changed files with 127 additions and 111 deletions

View file

@ -209,9 +209,9 @@ void Editor::mousemove_event(GUI::MouseEvent& event)
auto ruler_line_rect = ruler_content_rect(text_position.line());
auto hovering_lines_ruler = (event.position().x() < ruler_line_rect.width());
if (hovering_lines_ruler && !is_in_drag_select())
window()->set_override_cursor(GUI::StandardCursor::Arrow);
window()->set_override_cursor(Gfx::StandardCursor::Arrow);
else if (m_hovering_editor)
window()->set_override_cursor(m_hovering_link && m_holding_ctrl ? GUI::StandardCursor::Hand : GUI::StandardCursor::IBeam);
window()->set_override_cursor(m_hovering_link && m_holding_ctrl ? Gfx::StandardCursor::Hand : Gfx::StandardCursor::IBeam);
for (auto& span : document().spans()) {
if (span.range.contains(m_previous_text_position) && !span.range.contains(text_position)) {

View file

@ -497,22 +497,22 @@ void VBForm::set_cursor_type_from_grabber(Direction grabber)
switch (grabber) {
case Direction::Up:
case Direction::Down:
window()->set_override_cursor(GUI::StandardCursor::ResizeVertical);
window()->set_override_cursor(Gfx::StandardCursor::ResizeVertical);
break;
case Direction::Left:
case Direction::Right:
window()->set_override_cursor(GUI::StandardCursor::ResizeHorizontal);
window()->set_override_cursor(Gfx::StandardCursor::ResizeHorizontal);
break;
case Direction::UpLeft:
case Direction::DownRight:
window()->set_override_cursor(GUI::StandardCursor::ResizeDiagonalTLBR);
window()->set_override_cursor(Gfx::StandardCursor::ResizeDiagonalTLBR);
break;
case Direction::UpRight:
case Direction::DownLeft:
window()->set_override_cursor(GUI::StandardCursor::ResizeDiagonalBLTR);
window()->set_override_cursor(Gfx::StandardCursor::ResizeDiagonalBLTR);
break;
case Direction::None:
window()->set_override_cursor(GUI::StandardCursor::None);
window()->set_override_cursor(Gfx::StandardCursor::None);
break;
}