RPTools / maptool

Virtual Tabletop for playing roleplaying games with remote players or face to face.
http://rptools.net
GNU Affero General Public License v3.0
796 stars 260 forks source link

Macro Tooltips are sometimes of the wrong width when the panel is docked #568

Open Merudo opened 5 years ago

Merudo commented 5 years ago

Describe the bug

The macro tooltips are of a width that can be too small (the last characters don't show up) or too big (there are empty space after the tooltip text).

Interestingly, this does not happen when the macro panel is not docked.

EDIT: I think the bug only happens when the dpi scaling (in Windows 10) is set to a value other than 100%. In my case, I use 125% scaling.

To Reproduce

  1. Give a macro the following tooltip WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW-End.
  2. Make sure the panel is docked into the UI.
  3. Move the mouse over the text and notice the whole tooltip doesn't fit and the end is dropped.

Alternatively, you can have the tooltip be

iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii-End.

and notice how there is a bunch of extra spaces after "End.".

Expected behavior The width of the tooltip fits its content perfectly.

Screenshot

MapTool Info

Desktop (please complete the following information):

Campaign https://mega.nz/#!DRhnwAJD!6g-33BZaYMkQb9S37LhlNlZmfXsrsTGgtjQkjXCGmA8

Phergus commented 5 years ago

If it only happens when scaling is enabled then it is likely to be a bug in Java or JIDE.

If you go to the High DPI settings for the program and tell it to use System does it still do it? HiDPISetting

Merudo commented 5 years ago

Yeah, "override high DPI scaling" fixes it.

The weird thing is, the bug only occurs for docked panels. Floating panels show proper tooltips.

Maybe someone implemented a fix / workaround for floating panels in maptool but forgot to also fix docked panels?

Phergus commented 5 years ago

That is weird. I don't recall the issue being brought up before. Suspect the majority of folks never use the tooltips.