mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 12:58:13 +00:00
TextEditor: Move the "find" and "replace" widget containers to JSON GUI
This commit is contained in:
parent
6590eb8eb7
commit
8a7935a29f
2 changed files with 27 additions and 11 deletions
|
@ -40,7 +40,31 @@
|
||||||
"layout": {
|
"layout": {
|
||||||
"class": "GUI::VerticalBoxLayout",
|
"class": "GUI::VerticalBoxLayout",
|
||||||
"margins": [ 2, 2, 2, 4 ]
|
"margins": [ 2, 2, 2, 4 ]
|
||||||
}
|
},
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"class": "GUI::Widget",
|
||||||
|
"name": "find_widget",
|
||||||
|
"fill_with_background_color": true,
|
||||||
|
"horizontal_size_policy": "Fill",
|
||||||
|
"vertical_size_policy": "Fixed",
|
||||||
|
"preferred_height": 22,
|
||||||
|
"layout": {
|
||||||
|
"class": "GUI::HorizontalBoxLayout"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"class": "GUI::Widget",
|
||||||
|
"name": "replace_widget",
|
||||||
|
"fill_with_background_color": true,
|
||||||
|
"horizontal_size_policy": "Fill",
|
||||||
|
"vertical_size_policy": "Fixed",
|
||||||
|
"preferred_height": 22,
|
||||||
|
"layout": {
|
||||||
|
"class": "GUI::HorizontalBoxLayout"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"class": "GUI::StatusBar",
|
"class": "GUI::StatusBar",
|
||||||
|
|
|
@ -105,18 +105,10 @@ TextEditorWidget::TextEditorWidget()
|
||||||
m_find_replace_widget = *find_descendant_by_name("find_replace_widget");
|
m_find_replace_widget = *find_descendant_by_name("find_replace_widget");
|
||||||
m_find_replace_widget->set_visible(false);
|
m_find_replace_widget->set_visible(false);
|
||||||
|
|
||||||
m_find_widget = m_find_replace_widget->add<GUI::Widget>();
|
m_find_widget = *find_descendant_by_name("find_widget");
|
||||||
m_find_widget->set_fill_with_background_color(true);
|
|
||||||
m_find_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
|
||||||
m_find_widget->set_preferred_size(0, 22);
|
|
||||||
m_find_widget->set_layout<GUI::HorizontalBoxLayout>();
|
|
||||||
m_find_widget->set_visible(false);
|
m_find_widget->set_visible(false);
|
||||||
|
|
||||||
m_replace_widget = m_find_replace_widget->add<GUI::Widget>();
|
m_replace_widget = *find_descendant_by_name("replace_widget");
|
||||||
m_replace_widget->set_fill_with_background_color(true);
|
|
||||||
m_replace_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
|
||||||
m_replace_widget->set_preferred_size(0, 22);
|
|
||||||
m_replace_widget->set_layout<GUI::HorizontalBoxLayout>();
|
|
||||||
m_replace_widget->set_visible(false);
|
m_replace_widget->set_visible(false);
|
||||||
|
|
||||||
m_find_textbox = m_find_widget->add<GUI::TextBox>();
|
m_find_textbox = m_find_widget->add<GUI::TextBox>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue