Skip to content

fix: use theme font in HUD studio search bar - #1223

Open
RedSavant wants to merge 1 commit into
Polyfrost:v1from
RedSavant:fix/hud-search-font
Open

RedSavant wants to merge 1 commit into
Polyfrost:v1from
RedSavant:fix/hud-search-font

Conversation

@RedSavant

Copy link
Copy Markdown

Description

The search bar in the HUD studio didn't use the theme font for typed text. Its BasicTextField was the only text field in the UI that didn't pass a fontFamily in its textStyle. Unlike Text, BasicTextField doesn't pick up the theme font on its own, so the placeholder rendered correctly while the typed text fell back to the default font. The gap is most visible with the Minecraft themes, where the rest of the panel is in the pixel font.

This PR adds fontFamily = theme.typography.family to the SearchBar text style in HudDesignStudio.kt, the same as every other text field. That SearchBar is used for both the HUD library search and the HUD settings search, so both are fixed.

Tested on 26.3-fabric with Minecraft Dark and PolyGlass Dark.

Before After
image image

Related Issue(s)

Closes #1179

Checklist

  • I made a clear description of what was changed
  • I stated why these changes were necessary
  • I updated documentation or said what needs to be updated (no documentation changes needed)
  • I made sure these changes are backwards compatible
  • This pull request is for one feature/bug fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

search bar in the hud popup/hud studio settings has a weird font

1 participant