1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:17:35 +00:00

WindowServer+LibGfx: Added Crosshair cursor

This commit is contained in:
Uma Sankar Yedida 2020-10-30 22:36:32 +05:30 committed by Andreas Kling
parent ddad7575a9
commit 9ccae7a908
7 changed files with 11 additions and 0 deletions

View file

@ -56,6 +56,8 @@ RefPtr<Cursor> Cursor::create(Gfx::StandardCursor standard_cursor)
return nullptr;
case Gfx::StandardCursor::Arrow:
return WindowManager::the().arrow_cursor();
case Gfx::StandardCursor::Crosshair:
return WindowManager::the().crosshair_cursor();
case Gfx::StandardCursor::IBeam:
return WindowManager::the().i_beam_cursor();
case Gfx::StandardCursor::ResizeHorizontal:

View file

@ -126,6 +126,7 @@ void WindowManager::reload_config(bool set_screen)
m_move_cursor = get_cursor("Move");
m_drag_cursor = get_cursor("Drag");
m_wait_cursor = get_cursor("Wait");
m_crosshair_cursor = get_cursor("Crosshair");
}
const Gfx::Font& WindowManager::font() const

View file

@ -124,6 +124,7 @@ public:
const Cursor& active_cursor() const;
const Cursor& arrow_cursor() const { return *m_arrow_cursor; }
const Cursor& crosshair_cursor() const { return *m_crosshair_cursor; }
const Cursor& hand_cursor() const { return *m_hand_cursor; }
const Cursor& help_cursor() const { return *m_help_cursor; }
const Cursor& resize_horizontally_cursor() const { return *m_resize_horizontally_cursor; }
@ -260,6 +261,7 @@ private:
RefPtr<Cursor> m_move_cursor;
RefPtr<Cursor> m_drag_cursor;
RefPtr<Cursor> m_wait_cursor;
RefPtr<Cursor> m_crosshair_cursor;
InlineLinkedList<Window> m_windows_in_order;