refactor(editor): enhance UI coordination and menu management
- Updated EditorManager to include ShortcutManager in the UICoordinator initialization, improving UI responsiveness. - Refactored menu handling in MenuOrchestrator to delegate more responsibilities to UICoordinator, streamlining the UI flow. - Removed unused menu items and comments, clarifying the code structure and enhancing maintainability. Benefits: - Improves the organization of UI components, leading to a more efficient user experience. - Enhances clarity in the codebase by reducing clutter and focusing on essential functionalities.
This commit is contained in:
@@ -343,11 +343,6 @@ void MenuOrchestrator::AddHelpMenuItems() {
|
||||
menu_builder_
|
||||
.Item("Getting Started", ICON_MD_PLAY_ARROW,
|
||||
[this]() { OnShowGettingStarted(); })
|
||||
.Item("User Guide", ICON_MD_HELP,
|
||||
[this]() { OnShowUserGuide(); })
|
||||
.Item("Keyboard Shortcuts", ICON_MD_KEYBOARD,
|
||||
[this]() { OnShowKeyboardShortcuts(); })
|
||||
.Separator()
|
||||
.Item("Asar Integration", ICON_MD_CODE,
|
||||
[this]() { OnShowAsarIntegration(); })
|
||||
.Item("Build Instructions", ICON_MD_BUILD,
|
||||
@@ -548,8 +543,7 @@ void MenuOrchestrator::OnSwitchToEditor(EditorType editor_type) {
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowEditorSelection() {
|
||||
// Delegate to EditorManager
|
||||
// TODO: Draw editor selection via UICoordinator
|
||||
// Delegate to UICoordinator for editor selection dialog display
|
||||
if (editor_manager_) {
|
||||
if (auto* ui = editor_manager_->ui_coordinator()) {
|
||||
ui->ShowEditorSelection();
|
||||
@@ -558,8 +552,7 @@ void MenuOrchestrator::OnShowEditorSelection() {
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowDisplaySettings() {
|
||||
// Delegate to EditorManager
|
||||
// TODO: Draw display settings via UICoordinator
|
||||
// Delegate to UICoordinator for display settings popup
|
||||
if (editor_manager_) {
|
||||
if (auto* ui = editor_manager_->ui_coordinator()) {
|
||||
ui->ShowDisplaySettings();
|
||||
@@ -630,7 +623,7 @@ void MenuOrchestrator::OnSwitchToSession(size_t session_index) {
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowSessionSwitcher() {
|
||||
// TODO: Draw session switcher via UICoordinator
|
||||
// Delegate to UICoordinator for session switcher UI
|
||||
if (editor_manager_) {
|
||||
if (auto* ui = editor_manager_->ui_coordinator()) {
|
||||
ui->ShowSessionSwitcher();
|
||||
@@ -795,14 +788,6 @@ void MenuOrchestrator::OnShowAbout() {
|
||||
popup_manager_.Show("About");
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowKeyboardShortcuts() {
|
||||
popup_manager_.Show("Keyboard Shortcuts");
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowUserGuide() {
|
||||
popup_manager_.Show("User Guide");
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowGettingStarted() {
|
||||
popup_manager_.Show("Getting Started");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user