WindowServer+LibGUI: Add "resize row/column" cursors

This commit is contained in:
Linus Groh 2020-07-07 19:19:56 +01:00 committed by Andreas Kling
parent 2dd40aac4d
commit 62866208ee
8 changed files with 16 additions and 0 deletions

View file

@ -11,6 +11,8 @@ ResizeH=/res/cursors/resize-horizontal.png
ResizeV=/res/cursors/resize-vertical.png
ResizeDTLBR=/res/cursors/resize-diagonal-tlbr.png
ResizeDBLTR=/res/cursors/resize-diagonal-bltr.png
ResizeColumn=/res/cursors/resize-column.png
ResizeRow=/res/cursors/resize-row.png
IBeam=/res/cursors/i-beam.png
Disallowed=/res/cursors/disallowed.png
Move=/res/cursors/move.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -46,6 +46,8 @@ enum class StandardCursor {
ResizeVertical,
ResizeDiagonalTLBR,
ResizeDiagonalBLTR,
ResizeColumn,
ResizeRow,
Hand,
Drag,
Move,

View file

@ -66,6 +66,10 @@ RefPtr<Cursor> Cursor::create(StandardCursor standard_cursor)
return WindowManager::the().resize_diagonally_tlbr_cursor();
case StandardCursor::ResizeDiagonalBLTR:
return WindowManager::the().resize_diagonally_bltr_cursor();
case StandardCursor::ResizeColumn:
return WindowManager::the().resize_column_cursor();
case StandardCursor::ResizeRow:
return WindowManager::the().resize_row_cursor();
case StandardCursor::Hand:
return WindowManager::the().hand_cursor();
case StandardCursor::Drag:

View file

@ -38,6 +38,8 @@ enum class StandardCursor {
ResizeVertical,
ResizeDiagonalTLBR,
ResizeDiagonalBLTR,
ResizeColumn,
ResizeRow,
Hand,
Drag,
Move,

View file

@ -117,6 +117,8 @@ void WindowManager::reload_config(bool set_screen)
m_resize_vertically_cursor = get_cursor("ResizeV");
m_resize_diagonally_tlbr_cursor = get_cursor("ResizeDTLBR");
m_resize_diagonally_bltr_cursor = get_cursor("ResizeDBLTR");
m_resize_column_cursor = get_cursor("ResizeColumn");
m_resize_row_cursor = get_cursor("ResizeRow");
m_i_beam_cursor = get_cursor("IBeam");
m_disallowed_cursor = get_cursor("Disallowed");
m_move_cursor = get_cursor("Move");

View file

@ -126,6 +126,8 @@ public:
const Cursor& resize_vertically_cursor() const { return *m_resize_vertically_cursor; }
const Cursor& resize_diagonally_tlbr_cursor() const { return *m_resize_diagonally_tlbr_cursor; }
const Cursor& resize_diagonally_bltr_cursor() const { return *m_resize_diagonally_bltr_cursor; }
const Cursor& resize_column_cursor() const { return *m_resize_column_cursor; }
const Cursor& resize_row_cursor() const { return *m_resize_row_cursor; }
const Cursor& i_beam_cursor() const { return *m_i_beam_cursor; }
const Cursor& disallowed_cursor() const { return *m_disallowed_cursor; }
const Cursor& move_cursor() const { return *m_move_cursor; }
@ -206,6 +208,8 @@ private:
RefPtr<Cursor> m_resize_vertically_cursor;
RefPtr<Cursor> m_resize_diagonally_tlbr_cursor;
RefPtr<Cursor> m_resize_diagonally_bltr_cursor;
RefPtr<Cursor> m_resize_column_cursor;
RefPtr<Cursor> m_resize_row_cursor;
RefPtr<Cursor> m_i_beam_cursor;
RefPtr<Cursor> m_disallowed_cursor;
RefPtr<Cursor> m_move_cursor;