1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

HexEditor: Convert panels to DynamicWidgetContainer

This lets the user swap them around and pop them out as separate windows
as desired. We do lose the ability to individually resize them though,
until DynamicWidgetContainer supports that.
This commit is contained in:
Sam Atkins 2024-02-06 16:08:14 +00:00 committed by Sam Atkins
parent 6850ef9014
commit a5d11c0a26
3 changed files with 23 additions and 9 deletions

View file

@ -56,10 +56,13 @@ ErrorOr<void> HexEditorWidget::setup()
m_annotations_container = *find_descendant_of_type_named<GUI::Widget>("annotations_container");
m_search_results = *find_descendant_of_type_named<GUI::TableView>("search_results");
m_search_results_container = *find_descendant_of_type_named<GUI::Widget>("search_results_container");
m_side_panel_container = *find_descendant_of_type_named<GUI::Widget>("side_panel_container");
m_side_panel_container = *find_descendant_of_type_named<GUI::DynamicWidgetContainer>("side_panel_container");
m_value_inspector_container = *find_descendant_of_type_named<GUI::Widget>("value_inspector_container");
m_value_inspector = *find_descendant_of_type_named<GUI::TableView>("value_inspector");
// FIXME: Set this in GML once the compiler supports it.
m_side_panel_container->set_container_with_individual_order(true);
m_value_inspector->on_activation = [this](GUI::ModelIndex const& index) {
if (!index.is_valid())
return;