-
Notifications
You must be signed in to change notification settings - Fork 323
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 tooltips more visually pleasing #6097
Conversation
Two issues seem to be occurring simultaneously: - The Text component updates its width and height separately. The Label component, which is part of tooltips, wasn't listening to updates to the height. At the start, it's still set to the wrong value. - The baseline or height calculation of the M PLUS P1 font seems off. This difference is smaller. A separate issue was created for that: #6086
500ms seems to be the most frequently used delay before showing a tooltip. Since the fade-in/fade-out animation already takes some time, I've set the hide delay to 0.
b3388b2
to
6bf4b7a
Compare
I can't find it easily in the code - what was the cause of the text not being centered? What was the main change in the code allowing for it to be displayed nicely now? :) |
As I mentioned in the commit message, the Text component updates its width and height separately. The Label component, which is part of tooltips, wasn't listening to updates to the height, only to the width. So a change to the width would fire and the height would be set at that time, but an update to the height would happen afterwards which wasn't taken into account. |
Gotcha! It's hard to read commit messages, as there might be a lot of commits, so no one really does it here. Please include such info in the future in the PR description :) |
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.
QA: passed
Pull Request Description
Closes #6059: visually centering text and adding a longer delay before showing tooltips. See the commit messages for details.
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
./run ide build
.