feat(workspace): implement contextual auto-switch layout based on MMA active tier
This commit is contained in:
@@ -972,6 +972,20 @@ class App:
|
||||
if imgui.begin_tab_item("External Tools")[0]:
|
||||
self._render_external_tools_panel()
|
||||
imgui.end_tab_item()
|
||||
if imgui.begin_tab_item("Workspace Layouts")[0]:
|
||||
imgui.text("Experimental: Auto-switch layout by Tier")
|
||||
ch, self.controller.ui_auto_switch_layout = imgui.checkbox("Enable Auto-Switch", self.controller.ui_auto_switch_layout)
|
||||
if self.controller.ui_auto_switch_layout:
|
||||
imgui.separator()
|
||||
imgui.text("Tier Bindings (select profile for each tier)")
|
||||
profiles = [""] + [p.name for p in self.controller.workspace_profiles.values()]
|
||||
for t in ["Tier 1", "Tier 2", "Tier 3", "Tier 4"]:
|
||||
curr = self.controller.ui_tier_layout_bindings.get(t, "")
|
||||
idx = profiles.index(curr) if curr in profiles else 0
|
||||
ch_combo, new_idx = imgui.combo(t, idx, profiles)
|
||||
if ch_combo:
|
||||
self.controller.ui_tier_layout_bindings[t] = profiles[new_idx]
|
||||
imgui.end_tab_item()
|
||||
imgui.end_tab_bar()
|
||||
imgui.end()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user