-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
implement vertical slider orientation #875
Conversation
I've skimmed through it, and overall it looks good! Will review properly when I find the time. |
Ok, made review changes and moved the value below the slider. Also added a new method This implementation will arrange the slider, value, and then label in a vertical layout. We could further group the value and label onto one horizontal line. |
I'm having some issues with the keyboard step functionality of Slider, but I experience them on the current master branch also. These could probably be resolved in a separate PR. |
ui.label("Slider orientation:"); | ||
ui.radio_value(vertical, false, "Horizontal"); | ||
ui.radio_value(vertical, true, "Vertical"); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The f32, usize etc are also possible
line below belongs together with the i32/f64
switch above
This PR implements a vertical orientation for
Slider
. Closes #589.What's new
SliderOrientation
with variantsHorizontal
andVertical
.orientation
to set the slider orientationnew_vertical
andfrom_get_set_vertical
to instantiate with vertical orientation.What's changed
orientation
instead. Some functions and parameters are renamed (e.g.x_range
->position_range
).Slider
which match on the Slider's orientation.Alternatives
.orientation
mutator function (instead of changing or creating constructor functions).