mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:08:11 +00:00
LibGUI: Register more GML properties and widgets
Register "placeholder" for TextEditor and ComboBox; "models_only" for ComboBox; Vertical/HorizontalSeparator for SeparatorWidget
This commit is contained in:
parent
5806630cf4
commit
cf866cc75a
5 changed files with 48 additions and 2 deletions
|
@ -60,6 +60,9 @@ private:
|
|||
|
||||
ComboBox::ComboBox()
|
||||
{
|
||||
REGISTER_STRING_PROPERTY("placeholder", editor_placeholder, set_editor_placeholder);
|
||||
REGISTER_BOOL_PROPERTY("model_only", only_allow_values_from_model, set_only_allow_values_from_model);
|
||||
|
||||
set_min_width(32);
|
||||
set_fixed_height(22);
|
||||
|
||||
|
@ -144,6 +147,16 @@ ComboBox::~ComboBox()
|
|||
{
|
||||
}
|
||||
|
||||
void ComboBox::set_editor_placeholder(const StringView& placeholder)
|
||||
{
|
||||
m_editor->set_placeholder(placeholder);
|
||||
}
|
||||
|
||||
const String& ComboBox::editor_placeholder() const
|
||||
{
|
||||
return m_editor->placeholder();
|
||||
}
|
||||
|
||||
void ComboBox::navigate(AbstractView::CursorMovement cursor_movement)
|
||||
{
|
||||
auto previous_selected = m_list_view->cursor_index();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue