1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +00:00

LibGUI: Support using a bitmap as override cursor

This commit is contained in:
Marco Cutecchia 2021-10-15 22:24:41 +02:00 committed by Andreas Kling
parent 4bfe060336
commit 116bb4888f
4 changed files with 46 additions and 26 deletions

View file

@ -9,6 +9,7 @@
#include <AK/EnumBits.h>
#include <AK/JsonObject.h>
#include <AK/String.h>
#include <AK/Variant.h>
#include <LibCore/Object.h>
#include <LibGUI/Event.h>
#include <LibGUI/FocusPolicy.h>
@ -272,8 +273,8 @@ public:
virtual Gfx::IntRect children_clip_rect() const;
Gfx::StandardCursor override_cursor() const { return m_override_cursor; }
void set_override_cursor(Gfx::StandardCursor);
AK::Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> override_cursor() const { return m_override_cursor; }
void set_override_cursor(AK::Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>>);
bool load_from_gml(const StringView&);
bool load_from_gml(const StringView&, RefPtr<Core::Object> (*unregistered_child_handler)(const String&));
@ -373,7 +374,7 @@ private:
WeakPtr<Widget> m_focus_proxy;
FocusPolicy m_focus_policy { FocusPolicy::NoFocus };
Gfx::StandardCursor m_override_cursor { Gfx::StandardCursor::None };
AK::Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> m_override_cursor { Gfx::StandardCursor::None };
};
inline Widget* Widget::parent_widget()