refactor(app): replace nested settings submenu with in-app overlay

The Impostazioni menu now opens a single overlay (same pattern as
address/server overlays) instead of nested OS popup menus, which are
slow to respond under WSLg.

The overlay groups language (RadioButton) and unit (RadioButton) in one
panel, with a button to open the server overlay. Esc and backdrop tap
close it. OpenServerSettings() closes the settings overlay first so the
two overlays never stack.
This commit is contained in:
2026-06-12 09:09:25 +02:00
parent 28cb4ce6ae
commit 51c87a7dc9
3 changed files with 98 additions and 42 deletions
+17 -2
View File
@@ -231,16 +231,31 @@ public partial class MainWindowViewModel : ViewModelBase
[ObservableProperty]
private bool useSsl = true;
/// <summary>Overlay impostazioni server: aperto da menu Impostazioni → Server.</summary>
/// <summary>Overlay impostazioni server: aperto dall'overlay Impostazioni.</summary>
[ObservableProperty]
private bool isServerSettingsOpen;
[RelayCommand]
private void OpenServerSettings() => IsServerSettingsOpen = true;
private void OpenServerSettings()
{
IsSettingsOpen = false;
IsServerSettingsOpen = true;
}
[RelayCommand]
private void CloseServerSettings() => IsServerSettingsOpen = false;
/// <summary>Overlay impostazioni (lingua, unità, server): in-app per evitare
/// i popup di menu annidati, lenti su WSLg.</summary>
[ObservableProperty]
private bool isSettingsOpen;
[RelayCommand]
private void OpenSettings() => IsSettingsOpen = true;
[RelayCommand]
private void CloseSettings() => IsSettingsOpen = false;
[ObservableProperty]
private string connectionStatus = Loc.Tr("conn.none");