Skip to content

Conversation

@HyperJeanJean
Copy link
Contributor

From my understanding, the algorithm that calculated the required width for those tooltips updated the current_width variable before checking if it has enough space to do so, leading to a current_width (and a largest_width) larger than the box_width. So tooltips that had a longer text than box_width had a chance to fit their text in a single line even though two lines should be required.

With that fix, current_width is updated after checking that there is enough space.

Before:
image

image

After:
image

image

As as side not, the original Caesar 3 tooltips do not have this issue (but they appear to be a bit more longer?) so I guess this is a Julius issue.

The algorithm that calculated the required width for those tooltips was
a bit buggy, it could calculate a width larger than normal.
Copy link
Owner

@bvschaik bvschaik left a comment

Choose a reason for hiding this comment

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

Good catch! I like that the measure and draw methods are now identical in structure again.

@bvschaik bvschaik merged commit 273a619 into bvschaik:master Oct 17, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants