moretrim / ccHFM

Community Curated HFM
14 stars 3 forks source link

Way too big target box for the general stats tooltip in the military tab #133

Closed Jorde5212 closed 2 years ago

Jorde5212 commented 2 years ago

Trying to turn create/assign leaders on or off causes the tooltip for generals to appear. My mouse is down by auto create leaders in the sceenshot. image

moretrim commented 2 years ago

Context from the implementation in 06b8bee5f776375cbbd1abea15d169ac57ee17d2:

Limitations

[…]

  • In the country military screen, the list of leaders "leaks" one of its tooltips in the area just under it. This happens when the cursor is inspecting elements under the list (or the space between them) i.e. the "Create General/Admiral" buttons or the leader management checkboxes. In these areas the tooltip for the last leader entry "sticks" around.

    This is not straightforward to fix. At a (very approximate) guess, the use of long localisation strings for trait descriptions is interacting poorly with the machinery in charge of text wraparound. The tooltip is only seemingly kept in check with fixedsize = yes and a tight height somewhere around the original maxHeight = 20. Unfortunately this results in a truncated, elided trait description even though the necessary UI real estate is here. No maxHeight was found (with or without a fixed size) that could accommodate trait descriptions without leaking the last tooltip.

    We keep the leaky, sticky tooltip as it does not prevent use of the UI elements below. On top of that, these buttons & checkboxes are rarely used in a typical game in my experience save perhaps for the "Create General" button.

(We also document the situation in the Changelog/Feature list, but it’s harder to link to.)

I would welcome any PR to remedy the situation, e.g. any of the following:

UI modding being fiddly as it is though, there is currently no plan for us to investigate further. I should note that the leaky tooltips are annoying but not completely in the way: the checkboxes are still usable.