terrarium-earth / Heracles

A tree style questing mod allowing creators to set completable quests for their users
MIT License
35 stars 19 forks source link

Better Centering of Hermes' DocumentWidget within Heracles' display #145

Closed SubordinalBlue closed 12 months ago

SubordinalBlue commented 12 months ago

Tested at UI scales 2, 3, and 4.

When there are no tasks or rewards (and hence, no left margin), centering is dead on.

When there is a left margin... ...and UI scale is 3: centering is spot on. ...and UI scale is 2 or 4: centering is off by one font "pixel"; a forgivable amount for now.

Undocumented magic numbers are bad and unsatisfying though. How Hermes' is centering text, tags, and horizontal rules is a factor. (the later were measured down to the pixel in screen shots as a stand-in for Hermes' position and width)

This is the minimal change I could come up with staying within Heracles' code.

SubordinalBlue commented 12 months ago

Agreement when there is no left margin:

Screenshot 2023-11-28 at 10 19 42 PM Screenshot 2023-11-28 at 10 20 50 PM Screenshot 2023-11-28 at 10 20 03 PM
SubordinalBlue commented 12 months ago

Agreement and within one 'font pixel width' when a left margin is present:

Screenshot 2023-11-29 at 12 05 45 AM Screenshot 2023-11-29 at 12 05 19 AM Screenshot 2023-11-29 at 12 05 03 AM
SubordinalBlue commented 12 months ago

Closed. Proper solution is at hand. Will PR after cleaning up my work.