malisipi / mui

A Cross-Platform UI Library
https://malisipi.github.io/mui/
Apache License 2.0
95 stars 9 forks source link

Suggesting text size option for buttons, checkbox, menu bar text, etc... #9

Closed Wajinn closed 1 year ago

Wajinn commented 1 year ago

Text size (text_size, tSize) appears to not work or be implemented yet. This option could be very useful with button, label, checkbox, and also elsewhere.

Text size is not implemented yet except labels. It will be available.

Creating a separate issue for text size, so that it will not be lost. Labels can be used as a kind of workaround, because they implement size, but can be problematic. For example, users having to put a label over a checkbox, to get the text size feature is not convenient.

Link to related- https://github.com/malisipi/mui/issues/5

malisipi commented 1 year ago

I added text_size support for button, checkbox, passwordbox, radio, switch and textbox. I will implement for menubar and other widgets (like progress) asap.

Wajinn commented 1 year ago

I will implement for menubar and other widgets (like progress) asap.

Looking great so far and provides greater flexibility.

Seems to be best to keep open until text sizes of progress bar, switch, and slider are finished too. They would also need modification too, because text of progress, switch, or slider may not fit with other text sizes the user has selected, and can look odd in proportion and in comparison to the whole user design.

Update:

Have tested the below changes over a week ago and seem to work fine, allowing more flexibility in size and look.

1) progress.v

Add changes to the function add_progress:

`tSize int` (added parameter)

`"tSize": WindowData{num: tSize}` (added to widget := {})

Add changes to the function draw_progress:

Change to `size: object["tSize"].num` from size: 20

2) switch.v

Add changes to the function add_switch:

`tSize int` (added parameter)

`"tSize": WindowData{num: tSize}` (added to widget := {})

Add changes to the function draw_switch:

Change to `size: object["tSize"].num` from size: 20

3) slider.v

Add changes to the function add_slider:

`tSize int` (added parameter)

`"tSize": WindowData{num: tSize}` (added to widget := {})

Add changes to the function draw_slider

Change to `size: object["tSize"].num` from size: 20

4) widgets.v

Add `args.text_size` where necessary.