Settings: group preferences and open from gear
Group App Settings by purpose and let right-click on the gear open settings directly while preserving the left-click menu. WPF event reference: https://learn.microsoft.com/en-us/dotnet/api/system.windows.uielement.previewmouserightbuttondown?view=windowsdesktop-10.0
This commit is contained in:
@@ -26,6 +26,14 @@ public partial class TopBar : UserControl
|
||||
_ = LoadAvatarImageAsync();
|
||||
}
|
||||
|
||||
private void GearButton_PreviewMouseRightButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
// Right-click goes straight to App Settings; the menu stays on left-click.
|
||||
e.Handled = true;
|
||||
if (DataContext is MainViewModel { OpenSettingsCommand: { } open } && open.CanExecute(null))
|
||||
open.Execute(null);
|
||||
}
|
||||
|
||||
private void GearButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// One menu (Settings / Bug / Feature / About), opened on click — moved up
|
||||
|
||||
Reference in New Issue
Block a user