WindowServer+LibGUI: Add "wait" cursor

This commit is contained in:
Linus Groh 2020-07-07 20:23:40 +01:00 committed by Andreas Kling
parent b8a8e417f1
commit 899dcba158
Notes: sideshowbarker 2024-07-19 05:01:16 +09:00
7 changed files with 8 additions and 0 deletions

View file

@ -19,6 +19,7 @@ Move=/res/cursors/move.png
Hand=/res/cursors/hand.png
Help=/res/cursors/help.png
Drag=/res/cursors/drag.png
Wait=/res/cursors/wait.png
[Input]
DoubleClickSpeed=250

BIN
Base/res/cursors/wait.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

@ -52,6 +52,7 @@ enum class StandardCursor {
Help,
Drag,
Move,
Wait,
};
class Window : public Core::Object {

View file

@ -78,6 +78,8 @@ RefPtr<Cursor> Cursor::create(StandardCursor standard_cursor)
return WindowManager::the().drag_cursor();
case StandardCursor::Move:
return WindowManager::the().move_cursor();
case StandardCursor::Wait:
return WindowManager::the().wait_cursor();
}
ASSERT_NOT_REACHED();
}

View file

@ -44,6 +44,7 @@ enum class StandardCursor {
Help,
Drag,
Move,
Wait,
};
class Cursor : public RefCounted<Cursor> {

View file

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

View file

@ -133,6 +133,7 @@ public:
const Cursor& disallowed_cursor() const { return *m_disallowed_cursor; }
const Cursor& move_cursor() const { return *m_move_cursor; }
const Cursor& drag_cursor() const { return *m_drag_cursor; }
const Cursor& wait_cursor() const { return *m_wait_cursor; }
void invalidate(const Gfx::IntRect&);
void invalidate();
@ -216,6 +217,7 @@ private:
RefPtr<Cursor> m_disallowed_cursor;
RefPtr<Cursor> m_move_cursor;
RefPtr<Cursor> m_drag_cursor;
RefPtr<Cursor> m_wait_cursor;
InlineLinkedList<Window> m_windows_in_order;