Is there a way to change the text size from the values
argument within Spinner
? I've found that I can change the height and width of the dropdown boxes and change the size of the "label" (Layer). But is there a way to change the text size of both heads
and all
?
Spinner:
id: spinner_lry
text: 'Layer'
values:['heads', 'all']
size_hint_y: None
height: 50
font_size: 20
Yes, the options in a
Spinner
are displayed using theSpinnerOption
class (just aButton
) by default. You can set a different class to display the options usingoption_cls
atribute, and specify thefont_size
for that class, like this in yourkv
:If you want the options to inherit the
font_size
of theSpinner
, you can define a newSpinner
class extension:The new
on_font_size()
method adjust thefont_size
of the options whenever thefont_size
ofMpSpinner
changes. You also need to adjust yourkv
:This uses the new
MySpinner
class and theMyOption
class now adjusts itsheight
based on itstexture_size
.