mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00: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: 750a608441
Pull-request: https://github.com/SerenityOS/serenity/pull/4626
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/devsh0
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue