mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:17:35 +00:00
Cursors: Add new Eyedropper cursor
This can be used immediately in PixelPaint (separate commit), but I am adding this as a system-wide cursor since it may also be useful for other applications that want to use it.
This commit is contained in:
parent
81326ac8c7
commit
30ce1d8562
8 changed files with 8 additions and 0 deletions
|
@ -15,3 +15,4 @@ Help=help.x1y1.png
|
|||
Drag=drag.png
|
||||
Wait=wait.f14t100.png
|
||||
Crosshair=crosshair.png
|
||||
Eyedropper=eyedropper.x2y2.png
|
||||
|
|
BIN
Base/res/cursor-themes/Dark/eyedropper.x2y2.png
Normal file
BIN
Base/res/cursor-themes/Dark/eyedropper.x2y2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 716 B |
|
@ -15,3 +15,4 @@ Help=help.x1y1.png
|
|||
Drag=drag.png
|
||||
Wait=wait.f14t100.png
|
||||
Crosshair=crosshair.png
|
||||
Eyedropper=eyedropper.x2y2.png
|
||||
|
|
BIN
Base/res/cursor-themes/Default/eyedropper.x2y2.png
Normal file
BIN
Base/res/cursor-themes/Default/eyedropper.x2y2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 680 B |
|
@ -26,6 +26,7 @@ enum class StandardCursor {
|
|||
Move,
|
||||
Wait,
|
||||
Disallowed,
|
||||
Eyedropper,
|
||||
__Count,
|
||||
};
|
||||
|
||||
|
|
|
@ -109,6 +109,8 @@ RefPtr<Cursor> Cursor::create(Gfx::StandardCursor standard_cursor)
|
|||
return WindowManager::the().wait_cursor();
|
||||
case Gfx::StandardCursor::Disallowed:
|
||||
return WindowManager::the().disallowed_cursor();
|
||||
case Gfx::StandardCursor::Eyedropper:
|
||||
return WindowManager::the().eyedropper_cursor();
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -2080,6 +2080,7 @@ void WindowManager::apply_cursor_theme(const String& theme_name)
|
|||
reload_cursor(m_drag_cursor, "Drag");
|
||||
reload_cursor(m_wait_cursor, "Wait");
|
||||
reload_cursor(m_crosshair_cursor, "Crosshair");
|
||||
reload_cursor(m_eyedropper_cursor, "Eyedropper");
|
||||
|
||||
Compositor::the().invalidate_cursor();
|
||||
m_config->write_entry("Mouse", "CursorTheme", theme_name);
|
||||
|
|
|
@ -150,6 +150,7 @@ public:
|
|||
Cursor const& move_cursor() const { return *m_move_cursor; }
|
||||
Cursor const& drag_cursor() const { return *m_drag_cursor; }
|
||||
Cursor const& wait_cursor() const { return *m_wait_cursor; }
|
||||
Cursor const& eyedropper_cursor() const { return *m_eyedropper_cursor; }
|
||||
|
||||
Gfx::Font const& font() const;
|
||||
Gfx::Font const& window_title_font() const;
|
||||
|
@ -364,6 +365,7 @@ private:
|
|||
RefPtr<Cursor> m_drag_cursor;
|
||||
RefPtr<Cursor> m_wait_cursor;
|
||||
RefPtr<Cursor> m_crosshair_cursor;
|
||||
RefPtr<Cursor> m_eyedropper_cursor;
|
||||
|
||||
RefPtr<MultiScaleBitmaps> m_overlay_rect_shadow;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue