-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
Add new Checkbox
block
#4336
Add new Checkbox
block
#4336
Conversation
Compile Times benchmarkNote, that these numbers may fluctuate on the CI servers, so take them with a grain of salt. All benchmark results are based on the mean time and negative percent mean faster than the base branch. Note, that GLMakie + WGLMakie run on an emulated GPU, so the runtime benchmark is much slower. Results are from running: using_time = @ctime using Backend
# Compile time
create_time = @ctime fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @ctime Makie.colorbuffer(display(fig))
# Runtime
create_time = @benchmark fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @benchmark Makie.colorbuffer(fig)
|
+100 for a checkbox block! |
Updated styling a bit. Note that the radio buttons here are not part of the PR, you can build them as in the above code snippet but I'm not clear yet on a good convenience API for that. checkbox.mp4 |
Description
This is such a basic building block of GUIs, but nobody has bothered to implement it. There's
Toggle
but that is not very space efficient for larger assemblies, it was meant more for one big toggle button like "make the simulation go", not for turning many settings on or off. Also, a checkbox is better for implementing radio buttons, which can be a good alternative for aMenu
.Bildschirmaufnahme.2024-09-08.um.19.28.43.mov
This is an example with a manual implementation of radio buttons. I'm not sure yet what a good API for radio buttons would be, as I'd want the layout completely flexible, rather I'd want to be able to turn a couple of selection boxes into a radio group on demand.
Type of change
Delete options that do not apply:
Checklist