-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(DevTools): Focus follower #12813
feat(DevTools): Focus follower #12813
Conversation
0850159
to
2787233
Compare
You can test this PR using the following package version. |
You can test this PR using the following package version. |
if (FocusHighlighter is IBrush brush | ||
&& element is InputElement input | ||
&& TopLevel.GetTopLevel(input) is { } topLevel | ||
&& topLevel.GetType().FullName != "Avalonia.Diagnostics.Views.MainWindow") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this project, you can simply check with "is Avalonia.Diagnostics.Views.MainWindow". Why do you need reflection?
You can test this PR using the following package version. |
While this PR looks good to me, we can try to reuse normal FocusAdorner. As a possible implementation, I am thinking about adding this toggle property to AdornerLayer class. Which can be read on this condition Avalonia/src/Avalonia.Controls/Control.cs Lines 406 to 407 in ae765e6
The same DevTools toggle can also override AdornerLayer.DefaultFocusAdorner property to make it more visible as well. What do you think? |
I'll try. |
You can test this PR using the following package version. |
What does the pull request do?
Added Focus Highlighter item to DevTools Overlays menu, which allows you to highlight the currently focused item with the specified color.
What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes #12241