From 6dd892cc5a9b3db39997ce487722e17f9bf5ef6d Mon Sep 17 00:00:00 2001 From: gmipf Date: Sat, 27 Jun 2026 17:05:38 +0200 Subject: [PATCH] Fix language menu requiring two clicks in the Avalonia GUI The language MenuItems had no ToggleType, so clicking one never toggled its IsChecked state. The shared LanguageMenuItemClick handler reads IsChecked to tell a first selection from re-clicking the active language, so the first click only set IsChecked and returned; the language was applied only on the second click, and the active-language check mark never rendered. Add ToggleType="CheckBox" to the language items, mirroring the WPF GUI's IsCheckable="True" on the same items. This restores single-click switching and the check mark with no change to the handler. Co-Authored-By: Claude Opus 4.8 --- CHANGELIST.md | 1 + MPF.Avalonia/Windows/MainWindow.axaml | 29 ++++++++++++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 10dc145ff..774a5295c 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -4,6 +4,7 @@ - Resolve tilde-prefixed paths for binaries - Add feature to list path macros - Avoid possible unwanted filtering behavior +- Fix language menu requiring two clicks in the Avalonia GUI (gmipf) ### 3.8.1 (2026-06-26) diff --git a/MPF.Avalonia/Windows/MainWindow.axaml b/MPF.Avalonia/Windows/MainWindow.axaml index 8e0b8f81a..435edc2ef 100644 --- a/MPF.Avalonia/Windows/MainWindow.axaml +++ b/MPF.Avalonia/Windows/MainWindow.axaml @@ -70,19 +70,24 @@ + - - - - - - - - - - - - + + + + + + + + + + + +