-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Make hovered tabs be drawn with the unselected's width at minimum #82384
Make hovered tabs be drawn with the unselected's width at minimum #82384
Conversation
cdbeaa2
to
6a6402b
Compare
6a6402b
to
decae84
Compare
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 good to me. I wonder what other UI toolkits do in this case.
There is a small issue with the fact that we still use hover stylebox's margins, so the text alignment shifts. But I think this is fine for now so we fix the crash. Perhaps a bit of refactoring in TabBar
in the future would make hover behave more like focus to avoid these issues.
Thanks! |
@YuriSizov This is less an issue and more of "how it works". The text on tabs aren't drawn centered, they just take into account the |
@YeldhamDev I know, but if we are enforcing some styling from another stylebox, we should probably do it consistently and apply margins as well. This shouldn't be an issue for most, of course, since making them different size is pretty user-unfriendly in the first place. Which is why I'm only leaving it as a passing comment. But still, keeping some consistency would be nice. |
Remember when I said that |
Cherry-picked for 4.1.2. |
Fixes #81836. Supersedes #82344.
This PR also fixes a small bug I found that makes tabs still be hovered if mouse exits the window.