mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 20:33:10 +00:00
Cursors: Add new Magnifying glass cursor
There are a few places in the system where this could be useful, such as PixelPaint and the MandelBrot demo. It seems general enough that it is probably useful to have it as a system-wide cursor rather than loading it manually each time.
This commit is contained in:
parent
30ce1d8562
commit
30e91ecff6
|
@ -16,3 +16,4 @@ Drag=drag.png
|
|||
Wait=wait.f14t100.png
|
||||
Crosshair=crosshair.png
|
||||
Eyedropper=eyedropper.x2y2.png
|
||||
Zoom=zoom.x0y0.png
|
BIN
Base/res/cursor-themes/Dark/zoom.x0y0.png
Normal file
BIN
Base/res/cursor-themes/Dark/zoom.x0y0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 527 B |
|
@ -16,3 +16,4 @@ Drag=drag.png
|
|||
Wait=wait.f14t100.png
|
||||
Crosshair=crosshair.png
|
||||
Eyedropper=eyedropper.x2y2.png
|
||||
Zoom=zoom.x0y0.png
|
BIN
Base/res/cursor-themes/Default/zoom.x0y0.png
Normal file
BIN
Base/res/cursor-themes/Default/zoom.x0y0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 617 B |
|
@ -27,6 +27,7 @@ enum class StandardCursor {
|
|||
Wait,
|
||||
Disallowed,
|
||||
Eyedropper,
|
||||
Zoom,
|
||||
__Count,
|
||||
};
|
||||
|
||||
|
|
|
@ -111,6 +111,8 @@ RefPtr<Cursor> Cursor::create(Gfx::StandardCursor standard_cursor)
|
|||
return WindowManager::the().disallowed_cursor();
|
||||
case Gfx::StandardCursor::Eyedropper:
|
||||
return WindowManager::the().eyedropper_cursor();
|
||||
case Gfx::StandardCursor::Zoom:
|
||||
return WindowManager::the().zoom_cursor();
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -2081,6 +2081,7 @@ void WindowManager::apply_cursor_theme(const String& theme_name)
|
|||
reload_cursor(m_wait_cursor, "Wait");
|
||||
reload_cursor(m_crosshair_cursor, "Crosshair");
|
||||
reload_cursor(m_eyedropper_cursor, "Eyedropper");
|
||||
reload_cursor(m_zoom_cursor, "Zoom");
|
||||
|
||||
Compositor::the().invalidate_cursor();
|
||||
m_config->write_entry("Mouse", "CursorTheme", theme_name);
|
||||
|
|
|
@ -151,6 +151,7 @@ public:
|
|||
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; }
|
||||
Cursor const& zoom_cursor() const { return *m_zoom_cursor; }
|
||||
|
||||
Gfx::Font const& font() const;
|
||||
Gfx::Font const& window_title_font() const;
|
||||
|
@ -366,6 +367,7 @@ private:
|
|||
RefPtr<Cursor> m_wait_cursor;
|
||||
RefPtr<Cursor> m_crosshair_cursor;
|
||||
RefPtr<Cursor> m_eyedropper_cursor;
|
||||
RefPtr<Cursor> m_zoom_cursor;
|
||||
|
||||
RefPtr<MultiScaleBitmaps> m_overlay_rect_shadow;
|
||||
|
||||
|
|
Loading…
Reference in a new issue