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:
parent
c063a02979
commit
0f9be82826
23 changed files with 127 additions and 111 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue