Always fill stepped parameter sliders from left
This commit is contained in:
parent
aa3e6282b7
commit
1971273cb6
|
@ -474,11 +474,11 @@ impl<'a, P: Param> Widget<ParamMessage, Renderer> for ParamSlider<'a, P> {
|
||||||
} else {
|
} else {
|
||||||
// We'll visualize the difference between the current value and the default value
|
// We'll visualize the difference between the current value and the default value
|
||||||
let current_value = self.param.normalized_value();
|
let current_value = self.param.normalized_value();
|
||||||
// For boolean values alawys have filled be true and not filled be false, otherwise it
|
// For discrete alawys fill the bar from the left because it otherwise looks a bit
|
||||||
// looks super confusing
|
// jarring when any any value after the first one is the defautl
|
||||||
let fill_start_x = util::remap_rect_x_t(
|
let fill_start_x = util::remap_rect_x_t(
|
||||||
&bounds,
|
&bounds,
|
||||||
if self.param.step_count() == Some(1) {
|
if self.param.step_count().is_some() {
|
||||||
0.0
|
0.0
|
||||||
} else {
|
} else {
|
||||||
self.setter.default_normalized_param_value(self.param)
|
self.setter.default_normalized_param_value(self.param)
|
||||||
|
|
Loading…
Reference in a new issue