WindowServer+LibGUI: Add "wait" cursor
This commit is contained in:
parent
b8a8e417f1
commit
899dcba158
Notes:
sideshowbarker
2024-07-19 05:01:16 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/899dcba1581 Pull-request: https://github.com/SerenityOS/serenity/pull/2739
7 changed files with 8 additions and 0 deletions
|
@ -19,6 +19,7 @@ Move=/res/cursors/move.png
|
||||||
Hand=/res/cursors/hand.png
|
Hand=/res/cursors/hand.png
|
||||||
Help=/res/cursors/help.png
|
Help=/res/cursors/help.png
|
||||||
Drag=/res/cursors/drag.png
|
Drag=/res/cursors/drag.png
|
||||||
|
Wait=/res/cursors/wait.png
|
||||||
|
|
||||||
[Input]
|
[Input]
|
||||||
DoubleClickSpeed=250
|
DoubleClickSpeed=250
|
||||||
|
|
BIN
Base/res/cursors/wait.png
Executable file
BIN
Base/res/cursors/wait.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
|
@ -52,6 +52,7 @@ enum class StandardCursor {
|
||||||
Help,
|
Help,
|
||||||
Drag,
|
Drag,
|
||||||
Move,
|
Move,
|
||||||
|
Wait,
|
||||||
};
|
};
|
||||||
|
|
||||||
class Window : public Core::Object {
|
class Window : public Core::Object {
|
||||||
|
|
|
@ -78,6 +78,8 @@ RefPtr<Cursor> Cursor::create(StandardCursor standard_cursor)
|
||||||
return WindowManager::the().drag_cursor();
|
return WindowManager::the().drag_cursor();
|
||||||
case StandardCursor::Move:
|
case StandardCursor::Move:
|
||||||
return WindowManager::the().move_cursor();
|
return WindowManager::the().move_cursor();
|
||||||
|
case StandardCursor::Wait:
|
||||||
|
return WindowManager::the().wait_cursor();
|
||||||
}
|
}
|
||||||
ASSERT_NOT_REACHED();
|
ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ enum class StandardCursor {
|
||||||
Help,
|
Help,
|
||||||
Drag,
|
Drag,
|
||||||
Move,
|
Move,
|
||||||
|
Wait,
|
||||||
};
|
};
|
||||||
|
|
||||||
class Cursor : public RefCounted<Cursor> {
|
class Cursor : public RefCounted<Cursor> {
|
||||||
|
|
|
@ -124,6 +124,7 @@ void WindowManager::reload_config(bool set_screen)
|
||||||
m_disallowed_cursor = get_cursor("Disallowed");
|
m_disallowed_cursor = get_cursor("Disallowed");
|
||||||
m_move_cursor = get_cursor("Move");
|
m_move_cursor = get_cursor("Move");
|
||||||
m_drag_cursor = get_cursor("Drag");
|
m_drag_cursor = get_cursor("Drag");
|
||||||
|
m_wait_cursor = get_cursor("Wait");
|
||||||
}
|
}
|
||||||
|
|
||||||
const Gfx::Font& WindowManager::font() const
|
const Gfx::Font& WindowManager::font() const
|
||||||
|
|
|
@ -133,6 +133,7 @@ public:
|
||||||
const Cursor& disallowed_cursor() const { return *m_disallowed_cursor; }
|
const Cursor& disallowed_cursor() const { return *m_disallowed_cursor; }
|
||||||
const Cursor& move_cursor() const { return *m_move_cursor; }
|
const Cursor& move_cursor() const { return *m_move_cursor; }
|
||||||
const Cursor& drag_cursor() const { return *m_drag_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(const Gfx::IntRect&);
|
||||||
void invalidate();
|
void invalidate();
|
||||||
|
@ -216,6 +217,7 @@ private:
|
||||||
RefPtr<Cursor> m_disallowed_cursor;
|
RefPtr<Cursor> m_disallowed_cursor;
|
||||||
RefPtr<Cursor> m_move_cursor;
|
RefPtr<Cursor> m_move_cursor;
|
||||||
RefPtr<Cursor> m_drag_cursor;
|
RefPtr<Cursor> m_drag_cursor;
|
||||||
|
RefPtr<Cursor> m_wait_cursor;
|
||||||
|
|
||||||
InlineLinkedList<Window> m_windows_in_order;
|
InlineLinkedList<Window> m_windows_in_order;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue