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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user