mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 01:59:14 +03:00
LibGUI: Register TextEditor "mode" property
This makes it possible to construct a read-only (or display-only) TextEditor in GML: @GUI::TextEditor { mode: "ReadOnly" text: "Well hello friends! :^)" }
This commit is contained in:
parent
1e70986d19
commit
750a608441
Notes:
sideshowbarker
2024-07-19 00:26:58 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/750a6084413 Pull-request: https://github.com/SerenityOS/serenity/pull/4626 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/devsh0
@ -55,6 +55,10 @@ TextEditor::TextEditor(Type type)
|
||||
: m_type(type)
|
||||
{
|
||||
REGISTER_STRING_PROPERTY("text", text, set_text);
|
||||
REGISTER_ENUM_PROPERTY("mode", mode, set_mode, Mode,
|
||||
{ Editable, "Editable" },
|
||||
{ ReadOnly, "ReadOnly" },
|
||||
{ DisplayOnly, "DisplayOnly" });
|
||||
|
||||
set_focus_policy(GUI::FocusPolicy::StrongFocus);
|
||||
set_accepts_emoji_input(true);
|
||||
|
Loading…
Reference in New Issue
Block a user