diff --git a/src/App/ViewModels/MainWindowViewModel.cs b/src/App/ViewModels/MainWindowViewModel.cs
index d26841f..58dceb0 100644
--- a/src/App/ViewModels/MainWindowViewModel.cs
+++ b/src/App/ViewModels/MainWindowViewModel.cs
@@ -231,16 +231,31 @@ public partial class MainWindowViewModel : ViewModelBase
[ObservableProperty]
private bool useSsl = true;
- /// Overlay impostazioni server: aperto da menu Impostazioni → Server.
+ /// Overlay impostazioni server: aperto dall'overlay Impostazioni.
[ObservableProperty]
private bool isServerSettingsOpen;
[RelayCommand]
- private void OpenServerSettings() => IsServerSettingsOpen = true;
+ private void OpenServerSettings()
+ {
+ IsSettingsOpen = false;
+ IsServerSettingsOpen = true;
+ }
[RelayCommand]
private void CloseServerSettings() => IsServerSettingsOpen = false;
+ /// Overlay impostazioni (lingua, unità, server): in-app per evitare
+ /// i popup di menu annidati, lenti su WSLg.
+ [ObservableProperty]
+ private bool isSettingsOpen;
+
+ [RelayCommand]
+ private void OpenSettings() => IsSettingsOpen = true;
+
+ [RelayCommand]
+ private void CloseSettings() => IsSettingsOpen = false;
+
[ObservableProperty]
private string connectionStatus = Loc.Tr("conn.none");
diff --git a/src/App/Views/MainWindow.axaml b/src/App/Views/MainWindow.axaml
index 3f235c5..008b47c 100644
--- a/src/App/Views/MainWindow.axaml
+++ b/src/App/Views/MainWindow.axaml
@@ -30,46 +30,8 @@
-
+
@@ -498,5 +460,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/App/Views/MainWindow.axaml.cs b/src/App/Views/MainWindow.axaml.cs
index c048c6d..9759a4e 100644
--- a/src/App/Views/MainWindow.axaml.cs
+++ b/src/App/Views/MainWindow.axaml.cs
@@ -72,12 +72,20 @@ public partial class MainWindow : Window
vm.IsServerSettingsOpen = false;
}
+ private void OnSettingsOverlayBackdropTapped(object? sender, TappedEventArgs e)
+ {
+ if (!ReferenceEquals(e.Source, sender)) return;
+ if (DataContext is MainWindowViewModel vm)
+ vm.IsSettingsOpen = false;
+ }
+
protected override void OnKeyDown(KeyEventArgs e)
{
if (e.Key == Key.Escape && DataContext is MainWindowViewModel vm)
{
if (vm.AddressInfo is not null) { vm.AddressInfo = null; e.Handled = true; return; }
if (vm.IsServerSettingsOpen) { vm.IsServerSettingsOpen = false; e.Handled = true; return; }
+ if (vm.IsSettingsOpen) { vm.IsSettingsOpen = false; e.Handled = true; return; }
}
base.OnKeyDown(e);
}