fix: pad the tab list around the wordmark - #48
Conversation
Vanilla sizes the dark box from player rows, not the header, so the logo overflowed short names. Stretch rows to the wordmark width and give the glyph space on every side. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3490599c3d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const val LOGO_HEIGHT = 32 | ||
| const val LOGO_TEXTURE_WIDTH = 256 | ||
| const val LOGO_TEXTURE_HEIGHT = 52 | ||
| const val LOGO_ADVANCE = LOGO_TEXTURE_WIDTH * LOGO_HEIGHT / LOGO_TEXTURE_HEIGHT |
There was a problem hiding this comment.
Include the bitmap glyph's rounded advance
When a player row is shorter than the logo, this calculates 157 px by truncating 256 * 32 / 52, but Minecraft rounds the scaled bitmap width and adds the bitmap glyph's built-in 1 px advance (the same spacing TabBadge cancels), giving this full-width texture a 159 px advance. Consequently TabName pads rows two pixels narrower than the padded header, so the wordmark can still overhang the row-sized background this change is intended to widen; derive HEADER_WIDTH from the font's actual rounded glyph advance instead.
Useful? React with 👍 / 👎.
Pull Request
Description
The vanilla tab list sizes its dark box from player rows, not the header, so the Grounds wordmark overflowed on the left and right and sat flush against the names. Stretch each display name to the wordmark width and put space above, below, and beside the glyph.
Type of Change
Related Issues
Testing
Checklist
Made with Cursor