Fix SliderWithCallback not clamping the value before calling the callback

This commit is contained in:
Mikołaj Lubiak 2024-10-19 18:01:27 +02:00 committed by GitHub
parent 2887beff5b
commit 528c508584
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -421,7 +421,7 @@ public:
bool Focusable() const final { return true; }
void SetValue(Ref<T> val) {
value_() = val();
value_() = util::clamp(val(), min_(), max_());
callback_(value_());
}