Explore Program.cs improvements for UI project#17
Merged
ivandrofly merged 93 commits intomainfrom Apr 10, 2026
Merged
Conversation
The _edited list was never populated, making the branch that checked it dead code. Removed the field, its initialization, and the unreachable branch in GeneratePreview. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…unnecessary variable and inline initialization
Update Portuguese (Brazil).json
Italian language update
- Rename MakeVerticalSeperator to MakeHorizontalSeparator (was creating a horizontal line via Height) - Rename MakeHorizontalSeperator to MakeVerticalSeparator (was creating a vertical line via Width) - Fix typo backgroud -> background in both method parameters - Update all call sites accordingly Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ine save logic - Added `Save` method for binary persistence. - Refactored `Save` logic to use a shared `WriteToStream` method. - Removed obsolete Ayato-specific handling in `BatchConverter`.
…rator-naming Fix incorrect naming and typos in UiUtil separator methods
…spect-image-matches-full-preview Fix full preview in Inspect image matches
Also try to optimize build a tiny bit
…player-fanpack :)
Italian language update
…ewModel Unsubscribe from Settings.PropertyChanged in Dispose() to prevent the handler from keeping the VM alive after the window is closed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Store handler reference and unsubscribe on window Closed to prevent the VM from keeping window UI elements alive after closing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nged-subscription-leaks Fix PropertyChanged subscription leaks in OcrWindow and BeautifyTimeCodesViewModel
…dited-field Remove unused _edited field from RemoveTextForHearingImpairedViewModel
Previously, Avalonia's logical Key enum could not distinguish between numpad keys (with NumLock off) and their non-numpad counterparts. For example, pressing NumPad7 with NumLock off would produce Key.Home — identical to the regular Home key — making it impossible to bind different shortcuts to the two keys. Root cause: Avalonia's Key enum represents *logical* keys. When NumLock is off, numpad 7 fires Key.Home, numpad 1 fires Key.End, numpad 0 fires Key.Insert, NumPadDecimal fires Key.Delete, etc. The logical key alone carries no information about whether the key originated from the numpad. Fix: Use KeyEventArgs.PhysicalKey, which reflects the actual hardware key regardless of NumLock state. All numpad physical keys in Avalonia are named with the "NumPad" prefix (NumPad0–NumPad9, NumPadDecimal, etc.), while their logical counterparts are not (Home, End, Insert, Delete, etc.). The new GetEffectiveKeyName() helper returns the PhysicalKey name when the physical key is a numpad key, and the logical Key name otherwise. Concretely: - Regular Home: PhysicalKey.Home → "Home" - NumPad7 (NumLock ON): PhysicalKey.NumPad7 → "NumPad7" - NumPad7 (NumLock OFF): PhysicalKey.NumPad7 → "NumPad7" ← was "Home" Changes: - ShortcutManager: added GetEffectiveKeyName(Key, PhysicalKey) static helper and a parallel _activeEffectiveNames: HashSet<string> that tracks pressed keys using the physical override for numpad. The existing _activeKeys: HashSet<Key> is preserved unchanged so callers that rely on the logical Key enum (e.g. AllowedSingleKeyShortcuts filtering, GetActiveKeys().Count checks) continue to work. The shortcut hash lookup in CheckShortcuts now iterates _activeEffectiveNames instead of _activeKeys. - GetKeyViewModel: when the user presses a key to record a shortcut binding, the stored key name is now derived via GetEffectiveKeyName() so that numpad 7 (either NumLock state) is recorded as "NumPad7" rather than "Home", matching what CheckShortcuts will see at runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace six separate `b.Instance != null` checks with a single early-return guard clause using pattern matching, reducing noise and improving readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.