File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 55#include < numbers>
66#include < print>
77
8- void ui::animated_float::update (float delta_t ) {
8+ void ui::animated_float::update (float delta_time ) {
99 if (easing == easing_type::mutation) {
10- if (destination != value) {
10+ if (destination != value || progress != 1 . f ) {
1111 value = destination;
1212 if (after_animate)
1313 after_animate.value ()(destination);
@@ -19,12 +19,12 @@ void ui::animated_float::update(float delta_t) {
1919 }
2020
2121 if (delay_timer < delay) {
22- delay_timer += delta_t ;
22+ delay_timer += delta_time ;
2323 _updated = false ;
2424 return ;
2525 }
2626
27- progress += delta_t / duration;
27+ progress += delta_time / duration;
2828
2929 if (progress < 0 .f ) {
3030 _updated = false ;
@@ -83,7 +83,7 @@ void ui::animated_float::reset_to(float dest) {
8383 value = dest;
8484 this ->from = dest;
8585 this ->destination = dest;
86- progress = 1 . f ;
86+ progress = 0 . 999999999f ; // to avoid lerp issues
8787 delay_timer = 0 .f ;
8888}
8989void ui::animated_float::set_easing (easing_type easing) {
Original file line number Diff line number Diff line change @@ -126,7 +126,9 @@ void acrylic_background_widget::update(update_context &ctx) {
126126
127127 rect_widget::update (ctx);
128128 dpi_scale = ctx.rt .dpi_scale ;
129- should_update = should_update || (width->updated () || height->updated () || radius->updated ());
129+ should_update = should_update ||
130+ (width->updated () || height->updated () || radius->updated () ||
131+ x->updated () || y->updated () || opacity->updated ());
130132 last_hwnd = nullptr ;
131133 if (use_dwm) {
132134 radius->reset_to (8 .f );
You can’t perform that action at this time.
0 commit comments