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 tooltip & popup positioning #4740

Merged
merged 8 commits into from
Aug 5, 2023
Merged

Conversation

pajlada
Copy link
Member

@pajlada pajlada commented Jul 29, 2023

Description

This tries to ensure the tooltip & popups are created on the correct
monitor

Test steps

This PR Main branch
Emote tooltip
It shows up on the same screen as my cursor
Split header tooltip
It shows up on the same screen as my cursor
Usercard
It shows up on the same screen as my cursor
Emote popup
It shows up at the same place every time
regardless of where my Chatterino or cursor is
REFERENCE

TODO: Add proper test steps to ensure we get testing on all platforms

Tested on

Linux Wayland

UNTESTED This PR Main branch
Emote tooltip
It shows up on the same screen as my cursor
Split header tooltip
It shows up on the same screen as my cursor
Usercard
It shows up on the same screen as my cursor
Emote popup
It shows up at the same place every time
regardless of where my Chatterino or cursor is

Linux X11

by pajlada on Arch Linux This PR Main branch
Emote tooltip
It shows up on the same screen as my cursor
Split header tooltip
It shows up on the same screen as my cursor
Usercard
It shows up on the same screen as my cursor
Emote popup
It shows up at the same place every time
regardless of where my Chatterino or cursor is

macOS

UNTESTED This PR Main branch
Emote tooltip
It shows up on the same screen as my cursor
Split header tooltip
It shows up on the same screen as my cursor
Usercard
It shows up on the same screen as my cursor
Emote popup
It shows up at the same place every time
regardless of where my Chatterino or cursor is

Windows 100% zoom

UNTESTED This PR Main branch
Emote tooltip
It shows up on the same screen as my cursor
Split header tooltip
It shows up on the same screen as my cursor
Usercard
It shows up on the same screen as my cursor
Shows up on the same screen, but doesn't bind to the monitor Opens up on the wrong screen, but does get bound to the screen size
Emote popup
It shows up at the same place every time
regardless of where my Chatterino or cursor is

Windows >100% zoom

UNTESTED This PR Main branch
Emote tooltip
It shows up on the same screen as my cursor
Split header tooltip
It shows up on the same screen as my cursor
Usercard
It shows up on the same screen as my cursor
Shows up on the same screen, but doesn't bind to the monitor
Emote popup
It shows up at the same place every time
regardless of where my Chatterino or cursor is

Fixes #4733
Fixes #4572

This tries to ensure the tooltip & popups are created on the correct
monitor
@pajlada pajlada force-pushed the fix/tooltip-and-popup-positioning branch from 980ff04 to f9ec53f Compare July 30, 2023 10:48
@pajlada pajlada marked this pull request as ready for review July 30, 2023 10:48
@pajlada
Copy link
Member Author

pajlada commented Jul 30, 2023

Looking for testers with dual-monitor setups for the following platforms:
macOS
Linux Wayland
Windows 100% zoom
Windows >100% zoom

The test steps are outlined in the PR description, hopefully should be easy enough to follow along

@pajlada
Copy link
Member Author

pajlada commented Aug 5, 2023

The relevant platforms have been tested a bit, and with that I'm happy to merge this in.
This is not a perfect fix, but it will have fixed the most annoying things and not caused too many new annoying things.

The biggest change this does is: Don't move the widget multiple times upon showing

image

@pajlada pajlada enabled auto-merge August 5, 2023 10:13
@pajlada pajlada added this pull request to the merge queue Aug 5, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/widgets/helper/ChannelView.cpp Show resolved Hide resolved
Merged via the queue into master with commit 9e2eb0d Aug 5, 2023
15 of 16 checks passed
@pajlada pajlada deleted the fix/tooltip-and-popup-positioning branch August 5, 2023 12:17
Nerixyz pushed a commit to Nerixyz/chatterino2 that referenced this pull request Aug 12, 2023
* Fix tooltip & popup positioning

This tries to ensure the tooltip & popups are created on the correct
monitor

* Add changelog entry

* Clean up debug output

* Use the full frame geometry to figure out screen bound movements

* Remove the now-unused `setStayInScreenRect` function

* Change the UserInfoPopup offset to be based on its width & height
instead

* Remove more debug output
Nerixyz pushed a commit to Nerixyz/chatterino2 that referenced this pull request Aug 19, 2023
* Fix tooltip & popup positioning

This tries to ensure the tooltip & popups are created on the correct
monitor

* Add changelog entry

* Clean up debug output

* Use the full frame geometry to figure out screen bound movements

* Remove the now-unused `setStayInScreenRect` function

* Change the UserInfoPopup offset to be based on its width & height
instead

* Remove more debug output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant