malisipi/mui

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

Wajinn opened this issue · 2 comments

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- #5

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

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.