Skip to content
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

fix(windows): show split tooltip before move #5230

Merged
merged 3 commits into from
Mar 9, 2024

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Mar 3, 2024

I believe #5189 is a Windows only bug. This PR fixes tooltips of splits appearing in the wrong position [after the first hover(?)] on Windows. The issue might also occur when a streamer goes offline and the thumbnail isn't shown, but I didn't test that.
While debugging, I noticed that even though we call adjustSize which, according to the documentation, adjusts the area its children occupy, the tooltip still has a larger size than expected. It's only adjusted when calling show() (if you want to reproduce this, try placing logpoints in QLayoutPrivate::doResize, QWidget::setGeometry, and QWidgetPrivate::setGeometry_sys).

For non-Windows platforms, nothing changes.
On Windows, the tooltip is now shown before it's moved. This is fine on Windows, as the new window doesn't become visible right after calling show() (only after processing some more events). Since a lot of the resizing/activating happens in show(), the window has the correct size afterward, and moveTo-ing it will place it at the desired position.
I don't know why we don't need to do this for the tooltips in ChannelView.

Fixes #5189. @8thony could you test the change? Make sure you place the window on some side of your screen.

I have a fix for the bug I mentioned in #5189 (comment) (it's one line), but I suppose it's better to do that separately.

Copy link
Contributor

@8thony 8thony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work the same as on 2.4.6, thanks

@pajlada pajlada merged commit ecad4b0 into Chatterino:master Mar 9, 2024
15 of 16 checks passed
@Nerixyz Nerixyz deleted the fix/more-tooltip-fun branch March 9, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split header tooltips sometimes show up in the wrong position
3 participants