-
-
Notifications
You must be signed in to change notification settings - Fork 842
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
core: Render yellow rectangular highlight on keyboard focus #15717
Conversation
Plus the little rectangle on the bottom left is now rotated as it should be. The little block under its chin looks more different though... 🤔 |
Ah, I see! Then perhaps we should compare more frames, to also test the animation? Now that there is support for that... :) Not in scope of this PR of course. |
bae7965
to
46df652
Compare
8fd032e
to
97398a2
Compare
97398a2
to
1d28b18
Compare
} | ||
|
||
let bounds = focus.world_bounds().grow(-Self::HIGHLIGHT_WIDTH / 2); | ||
let mut drawing = Drawing::new(); |
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.
Using Drawing for this is going to be a little expensive on the rendering side, but realistically this isn't going to be hit enough to be noticed (I hope?)
Ideally we have a draw command that's "draw box outline" later, and let the render backend optimise that. It can make it screen-pixel perfect too, which would be nice.
Not something you need to change for this PR - just a comment!
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.
Looks cool! Thank you!
1d28b18
to
7fbae4f
Compare
This patch implements rendering of the yellow rectangle around a focused element after pressing Tab. Focus tracker which is responsible for keeping track of the current focus is now also responsible for keeping track of the highlight and rendering thereof.
7fbae4f
to
ebef447
Compare
Related to #5443.
This patch implements rendering of the yellow rectangle around a focused element after pressing Tab.