refactor: Improve Editor Management and UI Consistency

- Removed PushID and PopID calls in EditorManager to prevent ID stack corruption, relying on window titles for uniqueness.
- Updated ImGui window size and position settings to use FirstUseEver for maximizing on first open, enhancing user experience.
- Replaced AgentUI::PopPanelStyle with ImGui::PopStyleColor in multiple locations for consistency in style management.
- Ensured all EditorCard instances consistently call End after Begin, improving code clarity and preventing potential rendering issues.
This commit is contained in:
scawful
2025-10-06 00:33:10 -04:00
parent 5dca8ecc79
commit dd56addd5e
9 changed files with 287 additions and 118 deletions

View File

@@ -555,7 +555,7 @@ void AgentChatWidget::RenderHistory() {
}
}
ImGui::EndChild();
AgentUI::PopPanelStyle();
ImGui::PopStyleColor(); // Pop the color we pushed at line 531
last_history_size_ = history.size();
}
@@ -1342,8 +1342,8 @@ void AgentChatWidget::RenderCollaborationPanel() {
}
ImGui::EndChild();
AgentUI::PopPanelStyle();
ImGui::PopStyleVar(2);
ImGui::PopStyleColor(); // Pop the ChildBg color from line 1091
ImGui::PopStyleVar(2); // Pop the 2 StyleVars from lines 1082-1083
ImGui::PopID(); // CollabPanel
}
@@ -1666,7 +1666,7 @@ void AgentChatWidget::RenderAgentConfigPanel() {
}
ImGui::EndChild();
AgentUI::PopPanelStyle();
ImGui::PopStyleColor(); // Pop the ChildBg color from line 1609
}
void AgentChatWidget::RenderZ3EDCommandPanel() {
@@ -1749,9 +1749,9 @@ void AgentChatWidget::RenderZ3EDCommandPanel() {
}
ImGui::EndChild();
AgentUI::PopPanelStyle();
ImGui::PopStyleColor(); // Pop the ChildBg color from line 1677
ImGui::PopID(); // FIX: Pop the Z3EDCmdPanel ID
ImGui::PopID(); // Pop the Z3EDCmdPanel ID
}
void AgentChatWidget::RenderRomSyncPanel() {
@@ -1848,7 +1848,7 @@ void AgentChatWidget::RenderRomSyncPanel() {
}
ImGui::EndChild();
AgentUI::PopPanelStyle();
ImGui::PopStyleColor(); // Pop the ChildBg color from line 1758
}
void AgentChatWidget::RenderSnapshotPreviewPanel() {
@@ -1898,7 +1898,7 @@ void AgentChatWidget::RenderSnapshotPreviewPanel() {
}
ImGui::EndChild();
AgentUI::PopPanelStyle();
ImGui::PopStyleColor(); // Pop the ChildBg color from line 1860
}
void AgentChatWidget::RenderProposalManagerPanel() {
@@ -2094,7 +2094,7 @@ void AgentChatWidget::RenderHarnessPanel() {
}
ImGui::EndChild();
AgentUI::PopPanelStyle();
ImGui::PopStyleColor(); // Pop the ChildBg color from line 1982
ImGui::PopID();
}