Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #27 #29

Merged
merged 1 commit into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/OneWare.Core/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected override AvaloniaObject CreateShell()
new NativeMenuItem
{
Header = "Settings",
Command = new RelayCommand(() => Container.Resolve<IWindowService>().Show(
Command = new AsyncRelayCommand(() => Container.Resolve<IWindowService>().ShowDialogAsync(
new ApplicationSettingsView
{
DataContext = Container.Resolve<ApplicationSettingsViewModel>()
Expand Down Expand Up @@ -216,7 +216,7 @@ protected override AvaloniaObject CreateShell()
{
Header = "Settings",
IconObservable = Current!.GetResourceObservable("Material.SettingsOutline"),
Command = new RelayCommand(() => windowService.Show(new ApplicationSettingsView
Command = new AsyncRelayCommand(() => windowService.ShowDialogAsync(new ApplicationSettingsView
{
DataContext = ContainerLocator.Container.Resolve<ApplicationSettingsViewModel>()
}))
Expand Down
4 changes: 2 additions & 2 deletions src/OneWare.Core/ViewModels/Windows/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ private void RemoveMenuItem(MenuItemViewModel menuItem)
_applicationCommandService.ApplicationCommands.RemoveMany(removals);
}

public void OpenSettings()
public Task OpenSettingsDialogAsync()
{
_windowService.Show(new ApplicationSettingsView
return _windowService.ShowDialogAsync(new ApplicationSettingsView
{
DataContext = ContainerLocator.Container.Resolve<ApplicationSettingsViewModel>()
});
Expand Down
2 changes: 1 addition & 1 deletion src/OneWare.Core/Views/Windows/MainView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</StackPanel>

<StackPanel DockPanel.Dock="Right" Classes="HToolBar" Name="RightButtons">
<Button ToolTip.Tip="Settings" Command="{Binding OpenSettings}">
<Button ToolTip.Tip="Settings" Command="{Binding OpenSettingsDialogAsync}">
<Image Source="{DynamicResource Material.SettingsOutline}" />
</Button>
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion src/OneWare.Core/Views/Windows/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</StackPanel>

<StackPanel DockPanel.Dock="Right" Classes="HToolBar" Name="RightButtons">
<Button ToolTip.Tip="Settings" Command="{Binding OpenSettings}">
<Button ToolTip.Tip="Settings" Command="{Binding OpenSettingsDialogAsync}">
<Image Source="{DynamicResource Material.SettingsOutline}" />
</Button>
</StackPanel>
Expand Down
Loading