mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Base+WindowServer+LibGfx: Add new DragCopy Cursor
The purpose of this cursor is to indicate if a current dragged object (file, Spreadsheet cell) can be dropped onto a widget.
This commit is contained in:
parent
06102ff9af
commit
e5674d9666
Notes:
sideshowbarker
2024-07-17 08:38:37 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/e5674d9666 Pull-request: https://github.com/SerenityOS/serenity/pull/14957
10 changed files with 8 additions and 0 deletions
|
@ -13,6 +13,7 @@ Move=move.png
|
|||
Hand=hand.x8y4.png
|
||||
Help=help.x1y1.png
|
||||
Drag=drag.png
|
||||
DragCopy=drag-copy.x7y7.png
|
||||
Wait=wait.f14t100.png
|
||||
Crosshair=crosshair.png
|
||||
Eyedropper=eyedropper.x2y2.png
|
||||
|
|
BIN
Base/res/cursor-themes/Dark/drag-copy.x7y7-2x.png
Normal file
BIN
Base/res/cursor-themes/Dark/drag-copy.x7y7-2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 467 B |
BIN
Base/res/cursor-themes/Dark/drag-copy.x7y7.png
Normal file
BIN
Base/res/cursor-themes/Dark/drag-copy.x7y7.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 188 B |
|
@ -13,6 +13,7 @@ Move=move.png
|
|||
Hand=hand.x8y4.png
|
||||
Help=help.x1y1.png
|
||||
Drag=drag.png
|
||||
DragCopy=drag-copy.x7y7.png
|
||||
Wait=wait.f14t100.png
|
||||
Crosshair=crosshair.png
|
||||
Eyedropper=eyedropper.x2y2.png
|
||||
|
|
BIN
Base/res/cursor-themes/Default/drag-copy.x7y7-2x.png
Normal file
BIN
Base/res/cursor-themes/Default/drag-copy.x7y7-2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 469 B |
BIN
Base/res/cursor-themes/Default/drag-copy.x7y7.png
Normal file
BIN
Base/res/cursor-themes/Default/drag-copy.x7y7.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 188 B |
|
@ -23,6 +23,7 @@ enum class StandardCursor {
|
|||
Hand,
|
||||
Help,
|
||||
Drag,
|
||||
DragCopy,
|
||||
Move,
|
||||
Wait,
|
||||
Disallowed,
|
||||
|
|
|
@ -103,6 +103,8 @@ RefPtr<Cursor> Cursor::create(Gfx::StandardCursor standard_cursor)
|
|||
return WindowManager::the().help_cursor();
|
||||
case Gfx::StandardCursor::Drag:
|
||||
return WindowManager::the().drag_cursor();
|
||||
case Gfx::StandardCursor::DragCopy:
|
||||
return WindowManager::the().drag_copy_cursor();
|
||||
case Gfx::StandardCursor::Move:
|
||||
return WindowManager::the().move_cursor();
|
||||
case Gfx::StandardCursor::Wait:
|
||||
|
|
|
@ -2278,6 +2278,7 @@ void WindowManager::apply_cursor_theme(String const& theme_name)
|
|||
reload_cursor(m_disallowed_cursor, "Disallowed");
|
||||
reload_cursor(m_move_cursor, "Move");
|
||||
reload_cursor(m_drag_cursor, "Drag");
|
||||
reload_cursor(m_drag_copy_cursor, "DragCopy");
|
||||
reload_cursor(m_wait_cursor, "Wait");
|
||||
reload_cursor(m_crosshair_cursor, "Crosshair");
|
||||
reload_cursor(m_eyedropper_cursor, "Eyedropper");
|
||||
|
|
|
@ -149,6 +149,7 @@ public:
|
|||
Cursor const& disallowed_cursor() const { return *m_disallowed_cursor; }
|
||||
Cursor const& move_cursor() const { return *m_move_cursor; }
|
||||
Cursor const& drag_cursor() const { return *m_drag_cursor; }
|
||||
Cursor const& drag_copy_cursor() const { return *m_drag_copy_cursor; }
|
||||
Cursor const& wait_cursor() const { return *m_wait_cursor; }
|
||||
Cursor const& eyedropper_cursor() const { return *m_eyedropper_cursor; }
|
||||
Cursor const& zoom_cursor() const { return *m_zoom_cursor; }
|
||||
|
@ -390,6 +391,7 @@ private:
|
|||
RefPtr<Cursor> m_disallowed_cursor;
|
||||
RefPtr<Cursor> m_move_cursor;
|
||||
RefPtr<Cursor> m_drag_cursor;
|
||||
RefPtr<Cursor> m_drag_copy_cursor;
|
||||
RefPtr<Cursor> m_wait_cursor;
|
||||
RefPtr<Cursor> m_crosshair_cursor;
|
||||
RefPtr<Cursor> m_eyedropper_cursor;
|
||||
|
|
Loading…
Reference in a new issue