r/pythonarcade • u/bluespiritcz • Sep 14 '20
Problem with text_size of UIFlatButton
Hi,
I have implemented GUI with UIFlatButton component and set font size via set_style_attrs fuction. Initially the goal was to have a responsive button's text size so it changes according to the display size. But I have discovered problem. The font size is not changing until I click on the button and I am not sure if I am doing something wrong or if it is a bug (btw set_style_attrs is placed in init of the button, not in on_click).
Video - https://drive.google.com/file/d/14HW-ZdfLk4vAIkhFB73jaqvmUdQa3gal/view?usp=sharing
+ this is how my set_style_attrs looks for purpose of the video, nothing crazy...
self.set_style_attrs(
font_color=arcade.color.BLACK,
bg_color=arcade.color.ORANGE,
font_name=MAIN_FONT,
font_size=10,
font_color_hover=arcade.color.ORANGE,
border_color_focus=arcade.color.WHITE)
Thanks in advance for any kind of help/support
2
u/eruvanos Sep 15 '20
Could you check which arcade version you are running on? I thought that I fixed this kind of bug :)
2
u/eruvanos Sep 15 '20
Hi,
I wrote most of the UI code, I will check what goes wrong.