Fix subtitle editor focus border not following system accent color#11576
Merged
niksedk merged 1 commit intoJun 13, 2026
Merged
Conversation
The focused border brush for the AvaloniaEdit-based subtitle text box was hardcoded to Colors.DodgerBlue in both MakeTextEditor and MakeOriginalTextEditor. Every other focusable control in the app relies on Avalonia's Fluent theme to supply the system accent color automatically, so users who changed their accent saw a jarring blue border that stood out from the rest of the UI. Root cause: commit 39068ba (today) set FocusAdorner = null on the TextEditor and its inner TextArea in order to suppress Avalonia's default focus adorner and let the wrapper Border render the focus ring instead. Before that change the FocusAdorner was drawn by the Fluent theme using the system accent color and was the primary visible focus cue. Removing it left the hardcoded DodgerBlue Border as the only indicator, which does not follow the accent. Fix: add UiUtil.GetAccentBrush(), which resolves SystemAccentColor from the Fluent theme resource dictionary at call time (same Application.Current + ActualThemeVariant pattern used by GetBorderBrush). Replace both hardcoded SolidColorBrush(Colors.DodgerBlue) call sites with UiUtil.GetAccentBrush(). DodgerBlue is retained as the fallback for the rare case where the theme resource is unavailable during startup.
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.
The focused border brush for the AvaloniaEdit-based subtitle text box was hardcoded to Colors.DodgerBlue in both MakeTextEditor and MakeOriginalTextEditor. Every other focusable control in the app relies on Avalonia's Fluent theme to supply the system accent color automatically, so users who changed their accent saw a jarring blue border that stood out from the rest of the UI.
Root cause
Commit 39068ba (today) set FocusAdorner = null on the TextEditor and its inner TextArea in order to suppress Avalonia's default focus adorner and let the wrapper Border render the focus ring instead. Before that change the FocusAdorner was drawn by the Fluent theme using the system accent color and was the primary visible focus cue. Removing it left the hardcoded DodgerBlue Border as the only indicator, which does not follow the accent.
Fix
Add UiUtil.GetAccentBrush(), which resolves SystemAccentColor from the Fluent theme resource dictionary at call time (same Application.Current + ActualThemeVariant pattern used by GetBorderBrush). Replace both hardcoded SolidColorBrush(Colors.DodgerBlue) call sites with UiUtil.GetAccentBrush(). DodgerBlue is retained as the fallback for the rare case where the theme resource is unavailable during startup.
Before -> After