1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Slider, by default clamp to range (#789)

* Slider, by default clamp to range

* Update change log.
This commit is contained in:
Cristian Dinu
2021-10-12 15:15:32 -04:00
committed by GitHub
parent fc45b6fdf2
commit 1c4237097f
2 changed files with 3 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ impl<'a> Slider<'a> {
smallest_positive: 1e-6,
largest_finite: f64::INFINITY,
},
clamp_to_range: false,
clamp_to_range: true,
smart_aim: true,
show_value: true,
prefix: Default::default(),
@@ -163,7 +163,7 @@ impl<'a> Slider<'a> {
}
/// If set to `true`, all incoming and outgoing values will be clamped to the slider range.
/// Default: `false`.
/// Default: `true`.
pub fn clamp_to_range(mut self, clamp_to_range: bool) -> Self {
self.clamp_to_range = clamp_to_range;
self