Private
Public Access
0
0

fix(layout): use provide_full_screen_dock_space for window anchoring

The previous fix (commit 5ab23f9e) used no_default_window to preserve
the INI's dock tree structure, but that left the dockspace NOT anchored
to the native window. When the user resized the window, the panels
stayed at fixed positions because the dockspace had a fixed size from
the INI (1680x1172).

Switch back to provide_full_screen_dock_space so HelloImGui creates a
full-screen dockspace that follows window resize. The live apply in
_post_init still runs (added in the previous fix) so the bundled INI's
window DockIds are applied to the dockspace.

Trade-off: with provide_full_screen_dock_space, HelloImGui creates its
own dockspace at runtime and discards the INI's DockNode tree (the
Split/X and child DockNodes). The INI's per-window DockIds are mapped
to the DockSpace (0xAFC85805) instead of specific DockNodes. Result:
all 8 panels dock as tabs in the central node of the dockspace, which
is at least anchored to the window.

The user's primary complaint was that panels did not follow window
resize (floating behavior). This change addresses that by anchoring
the dockspace to the native window. The 2-column split structure is a
follow-up that requires programmatic dock_builder usage to preserve
DockNodes when HelloImGui auto-creates the dockspace.

Verification (imgui.save_ini_settings_to_memory at runtime):
- All 8 windows docked with DockId=0xAFC85805,N (the DockSpace)
- DockSpace ID=0xAFC85805 ... CentralNode=1 (anchored to window)
- [Docking][Data] block fully preserved

Tests (16/16 PASS):
- tests/test_default_layout_install.py: 3/3 PASS
- tests/test_api_hooks_gui_health_live.py: 1/1 PASS
- tests/test_command_palette_sim.py: 7/7 PASS
- tests/test_saved_presets_sim.py: 2/2 PASS
- tests/test_live_gui_integration_v2.py: 3/3 PASS
This commit is contained in:
2026-06-30 07:56:17 -04:00
parent 5ab23f9eea
commit c8a17e3a29
+1 -1
View File
@@ -675,7 +675,7 @@ class App:
self.runner_params.imgui_window_params.enable_viewports = getattr(self, "ui_multi_viewport", False)
self.runner_params.imgui_window_params.remember_theme = True
self.runner_params.imgui_window_params.tweaked_theme = theme.get_tweaked_theme()
self.runner_params.imgui_window_params.default_imgui_window_type = hello_imgui.DefaultImGuiWindowType.no_default_window
self.runner_params.imgui_window_params.default_imgui_window_type = hello_imgui.DefaultImGuiWindowType.provide_full_screen_dock_space
# Enforce DPI Awareness and User Scale
user_scale = theme.get_current_scale()