UI OptionButton Font Size

Godot Version

4.3rc3

Question

i am trying to override an OptionButton’s font size. If i change Theme Overrides->Font Sizes it changes the selected item’s font size but not the size of the items in the list.

Try something like this:

$OptionButton.get_popup().add_theme_font_size_override("font_size", your_desired_font_size)

get_popup() in the docs:

add-theme-font-size-override in the docs:

Previous answers to similar questions:

I hope this helps.

1 Like

Just to confirm, there is no way to adjust this in the editor using overrides, correct?

I don’t think there is, not in the inspector. You can edit a custom theme in the editor though.

You can select ‘PopupMenu’ from the theme item selector, then click the font size button, add the font size attribute to the theme and adjust the font size from there.
image

Heyy, thats me! :smiley: