Nuklear icon indicating copy to clipboard operation
Nuklear copied to clipboard

Modify Appearance of Option/Checkbox

Open RobertLemmens opened this issue 2 years ago • 5 comments

This is basically https://github.com/vurtun/nuklear/pull/653 from zhouxs1023 so all credit there. Followed the discussion #222 and this is something I also need so ported the change from zhouxs1023 to here because I have some time today.

tested it out and looks good to me. check_and_radio

RobertLemmens avatar Jun 17 '22 11:06 RobertLemmens

I wonder how is it with radios? Both shall behave visually "the same".

Also thinking about this I am not sure whether the originating issue lies simply within a reversed boolean coming from the checkbox/radio widgets. If we reversed the boolean meaning then I think the current style in master branch would be OK, right?

dumblob avatar Jun 17 '22 12:06 dumblob

Yes radio also looks the same, here is a selected radio: nuklear_radio

I honestly think that this is much better compared to the old styling (especially radio): check_old

It is much more clear that it is selected because of the visible border around the inset fill, like there is a "container", and there's something visibly inside of it (selected). the darker fill in the old one confuses me allot

If we take a look at other radio implementations around the web they usually all behave in this PRs way making it extremely clear to the user what is going on: radio_example radio_example2 radio_example3

when it is a fill color it is usually paired with some other visual indicator, like a dot or a checkmark like here: fill_example

Checkbox is more often done with a real checkmark but I think we should just keep it in sync with radio instead of adding a real checkmark. User can add image for this for now.

RobertLemmens avatar Jun 17 '22 13:06 RobertLemmens

I do think however that the background also impacts this allot!

RobertLemmens avatar Jun 17 '22 13:06 RobertLemmens

I like this change, but it looks a bit off-center on some of the other demos... Could likely be something else that's affecting that :thinking: This is x11_rawfb

Before

Screenshot at 2022-07-30 17-47-31

After

Screenshot at 2022-07-09 13-30-10

RobLoach avatar Jul 09 '22 17:07 RobLoach

I should check that one too, I really prefer the PR style of checkboxes and radios on default nk style.

It seems the OpenGL rendering is ok, but not API related ones (at least on X11). I've tried with x11_xft and the result is so so

demo

I need to check this deeper to see why this happens. Also, a check on Windows GDI(+) backends should be done (but not by me)

riri avatar Nov 13 '23 17:11 riri