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:
Karol Kosek 2022-06-20 11:37:22 +02:00 committed by Sam Atkins
parent 06102ff9af
commit e5674d9666
Notes: sideshowbarker 2024-07-17 08:38:37 +09:00
10 changed files with 8 additions and 0 deletions

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

View file

@ -23,6 +23,7 @@ enum class StandardCursor {
Hand,
Help,
Drag,
DragCopy,
Move,
Wait,
Disallowed,

View file

@ -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:

View file

@ -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");

View file

@ -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;