Skip to content

Fix tooltip positioning and size for multi-column tooltips#9806

Open
majochem wants to merge 6 commits intoPathOfBuildingCommunity:devfrom
majochem:bug/ui/hoverTooltipScaling
Open

Fix tooltip positioning and size for multi-column tooltips#9806
majochem wants to merge 6 commits intoPathOfBuildingCommunity:devfrom
majochem:bug/ui/hoverTooltipScaling

Conversation

@majochem
Copy link
Copy Markdown
Contributor

Description of the problem being solved:

  1. Hover tooltips that require multiple columns (usually item comparisons), do not always correctly reposition to the maximum amount of content on screen, which hides a lot of valuable information

  2. Multi-column tooltips generally often waste horizontal space, because they inherit the width from the first columns, which can be much wider, e.g. for unique items with long mods

This PR makes two changes to address that behavior:

  1. Tooltips are moved to the left as much as necessary (and possible) in order to fully fit into the viewPort
  2. Any additional columns beyond the first, now recalculate their required width in order to waste less space

Steps taken to verify a working solution:

  • I tested this on my own monitors (one 3440x1440 and two 1920x1080) at various UI scaling options (both OS and PoB internal scaling), as well as individually resized windows and encountered no issues
  • Having said that, I haven't done a lot of UI PRs, so there might be some niche edge cases that I overlooked

Limitations:

  • This PR doesn't (yet) solve the issues of too many columns to physically fit on the screen. I am looking into that, but will likely put it into separate PRs and in the meantime it does at least mitigate the issue somewhat.

Link to a build that showcases this PR:

https://pobb.in/P0OpEhfbjoHc
(Just random build, not specifically generated for this issue)

Before vs After Screenshot 1:

Hover tooltip cut off
image

Repositioned and no longer cut off
image

Before vs After Screenshot 2:

Static tooltip wasting space (trying to add Abberath's Hooves)
image

Second column only as wide as needed for the text
image

If tooltips with more than 1 column overflow the viewport they are now
moved to the left, as much as needed and the viewport allows
Tooltip column size previously blindly copied the width of the first
column, which could lead to massive waste of space for uniques with very
long mods.
Disclaimer:
I had an AI generate the texts for this one, as it's just busy work, but
I did check the output for correctness and I do find the annotations
generally helpful.

You can totally leave out this commit though, if you prefer
@LocalIdentity LocalIdentity added user-interface Changes that only affect the UI pob2 Label for features that should be ported over to PoB-PoE2 labels Apr 22, 2026
@majochem majochem marked this pull request as ready for review April 22, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pob2 Label for features that should be ported over to PoB-PoE2 user-interface Changes that only affect the UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants