Enum nih_plug_vizia::widgets::ParamSliderStyle
source · pub enum ParamSliderStyle {
Centered,
FromLeft,
CurrentStep {
even: bool,
},
CurrentStepLabeled {
even: bool,
},
}
Expand description
How the ParamSlider
should display its values. Set this using
ParamSliderExt::set_style()
.
Variants§
Centered
Visualize the offset from the default value for continuous parameters with a default value at around half of its range, fill the bar from the left for discrete parameters and continuous parameters without centered default values.
FromLeft
Always fill the bar starting from the left.
CurrentStep
Show the current step instead of filling a portion of the bar, useful for discrete
parameters. Set even
to true
to distribute the ticks evenly instead of following the
parameter’s distribution. This can be desireable because discrete parameters have smaller
ranges near the edges (they’ll span only half the range, which can make the display look
odd).
CurrentStepLabeled
The same as CurrentStep
, but overlay the labels over the steps instead of showing the
active value. Only useful for discrete parameters with two, maybe three possible values.
Trait Implementations§
source§impl Clone for ParamSliderStyle
impl Clone for ParamSliderStyle
source§fn clone(&self) -> ParamSliderStyle
fn clone(&self) -> ParamSliderStyle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ParamSliderStyle
impl Debug for ParamSliderStyle
source§impl PartialEq<ParamSliderStyle> for ParamSliderStyle
impl PartialEq<ParamSliderStyle> for ParamSliderStyle
source§fn eq(&self, other: &ParamSliderStyle) -> bool
fn eq(&self, other: &ParamSliderStyle) -> bool
self
and other
values to be equal, and is used
by ==
.