mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibGUI: Register the "text" property on GUI::Label
This commit is contained in:
parent
d3adbed231
commit
a5878175e2
2 changed files with 4 additions and 1 deletions
|
@ -38,6 +38,8 @@ Label::Label(const StringView& text)
|
||||||
set_frame_thickness(0);
|
set_frame_thickness(0);
|
||||||
set_frame_shadow(Gfx::FrameShadow::Plain);
|
set_frame_shadow(Gfx::FrameShadow::Plain);
|
||||||
set_frame_shape(Gfx::FrameShape::NoFrame);
|
set_frame_shape(Gfx::FrameShape::NoFrame);
|
||||||
|
|
||||||
|
REGISTER_STRING_PROPERTY("text", text, set_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
Label::~Label()
|
Label::~Label()
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/JsonObject.h>
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
#include <LibCore/Object.h>
|
#include <LibCore/Object.h>
|
||||||
#include <LibGUI/Application.h>
|
#include <LibGUI/Application.h>
|
||||||
|
@ -38,7 +39,7 @@
|
||||||
#include <LibGfx/Rect.h>
|
#include <LibGfx/Rect.h>
|
||||||
#include <LibGfx/StandardCursor.h>
|
#include <LibGfx/StandardCursor.h>
|
||||||
|
|
||||||
#define REGISTER_WIDGET(namespace_, class_name) \
|
#define REGISTER_WIDGET(namespace_, class_name) \
|
||||||
extern GUI::WidgetClassRegistration registration_##class_name; \
|
extern GUI::WidgetClassRegistration registration_##class_name; \
|
||||||
GUI::WidgetClassRegistration registration_##class_name(#namespace_ "::" #class_name, []() { return namespace_::class_name::construct(); });
|
GUI::WidgetClassRegistration registration_##class_name(#namespace_ "::" #class_name, []() { return namespace_::class_name::construct(); });
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue