Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mod count text sometimes overlapping on filter buttons #798

Open
wants to merge 1 commit into
base: 1.21.3
Choose a base branch
from

Conversation

mt1006
Copy link
Contributor

@mt1006 mt1006 commented Nov 21, 2024

Fixes "Showing x mods" text overlapping on filter button with some (usually wide) window resolutions.
It's caused by button position being determined based on a string width during initialization (which was longer then usual, as mod list wasn't fully initialized, so it included "0/" prefix number of visible mods). Because of that, these buttons would be placed in the middle, despite text being visible, in cases where window is wide enough to fit shorter text (without "0/" prefix), but not wide enough to fit text with prefix.
This PR makes so that button size is determined on the size of text without "0/" prefix, which should be the shortest one and therefore fix the issue.

Example, before fix:

aaa

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.

1 participant