Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify Appearance of Option/Checkbox #468

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

RobertLemmens
Copy link

This is basically vurtun/nuklear#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

@dumblob
Copy link
Member

dumblob commented Jun 17, 2022

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?

@RobertLemmens
Copy link
Author

RobertLemmens commented Jun 17, 2022

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
Copy link
Author

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

@RobLoach RobLoach changed the title Feature/checkbox indicator Modify Appearance of Option/Checkbox Jul 9, 2022
@RobLoach
Copy link
Contributor

RobLoach commented Jul 9, 2022

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 🤔 This is x11_rawfb

Before

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

After

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

@riri
Copy link
Contributor

riri commented Nov 13, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants