From b39b5eecc541c1cc03d112329df93cb069584ad6 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Thu, 7 Aug 2025 02:11:04 +1000 Subject: [PATCH] more --- .../Components/IdeSettingsDialog.razor | 2 +- .../Components/SidebarIconButton.razor | 5 +++- src/SharpIDE.Photino/Layout/MainLayout.razor | 28 ++++--------------- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/src/SharpIDE.Photino/Components/IdeSettingsDialog.razor b/src/SharpIDE.Photino/Components/IdeSettingsDialog.razor index a8c0b88..1e5b519 100644 --- a/src/SharpIDE.Photino/Components/IdeSettingsDialog.razor +++ b/src/SharpIDE.Photino/Components/IdeSettingsDialog.razor @@ -4,7 +4,7 @@ - + diff --git a/src/SharpIDE.Photino/Components/SidebarIconButton.razor b/src/SharpIDE.Photino/Components/SidebarIconButton.razor index 149fa03..c99c8f4 100644 --- a/src/SharpIDE.Photino/Components/SidebarIconButton.razor +++ b/src/SharpIDE.Photino/Components/SidebarIconButton.razor @@ -1,4 +1,4 @@ - + @Text @@ -12,6 +12,9 @@ [Parameter, EditorRequired] public string? Text { get; set; } + [Parameter, EditorRequired] + public bool Selected { get; set; } + [Parameter] public EventCallback OnClick { get; set; } } diff --git a/src/SharpIDE.Photino/Layout/MainLayout.razor b/src/SharpIDE.Photino/Layout/MainLayout.razor index 6f69f8c..4f78906 100644 --- a/src/SharpIDE.Photino/Layout/MainLayout.razor +++ b/src/SharpIDE.Photino/Layout/MainLayout.razor @@ -29,9 +29,6 @@ - - - @@ -45,10 +42,10 @@ - + - - + +
@@ -90,16 +87,13 @@ @code { private bool _drawerOpen = true; - private bool _terminalDrawerOpen = false; - private bool _bottomDrawerOpen = true; + private bool _bottomDrawerOpen = false; private void DrawerToggle() => _drawerOpen = !_drawerOpen; - private void TerminalDrawerToggle() => _terminalDrawerOpen = !_terminalDrawerOpen; - private void BottomDrawerToggle() => _bottomDrawerOpen = !_bottomDrawerOpen; private string? _solutionFilePath; private SharpIdeSolutionModel? _solutionModel; private SharpIdeFile? _selectedFile; - private BottomPanelType? _selectedBottomPanel = BottomPanelType.Build; + private BottomPanelType? _selectedBottomPanel = null; private string MainContentHeight => _bottomDrawerOpen ? "70%" : "100%"; @@ -122,16 +116,6 @@ protected override async Task OnInitializedAsync() { await LoadSolutionFromInteractivePicker(AppState.IdeSettings.AutoOpenLastSolution); - if (AppState.IdeSettings.AutoOpenTerminalOnLaunch) - { - _ = Task.Run(async () => - { - // The mud drawer is a pain, has an initial state, and won't open if you try to open it before it has rendered (presumably using js) - await Task.Delay(125).ConfigureAwait(false); - _terminalDrawerOpen = true; - await InvokeAsync(StateHasChanged).ConfigureAwait(false); - }).ConfigureAwait(false); - } } private async Task LoadSolutionFromInteractivePicker() => await LoadSolutionFromInteractivePicker(false); @@ -155,7 +139,7 @@ private async Task RestoreSolution() => await MsBuildSolution(BuildType.Restore); private async Task MsBuildSolution(BuildType buildType) { - if (AppState.IdeSettings.OpenTerminalOnBuildRebuildRestore) _terminalDrawerOpen = true; + if (AppState.IdeSettings.OpenTerminalOnBuildRebuildRestore) SelectBuildPanel(); _cancellationTokenSource = new CancellationTokenSource(); await BuildService.MsBuildSolutionAsync(_solutionFilePath!, buildType, _cancellationTokenSource.Token); _cancellationTokenSource = null;