From 261ad3735a64d73ea597d3b53dd1bff445b91c4e Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 10 Oct 2021 18:21:42 +0200 Subject: [PATCH] Very minor code consistency fix. --- .../src/components/ScrollIndicatorComponent.h | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/es-core/src/components/ScrollIndicatorComponent.h b/es-core/src/components/ScrollIndicatorComponent.h index 2cee0783e..04ef00143 100644 --- a/es-core/src/components/ScrollIndicatorComponent.h +++ b/es-core/src/components/ScrollIndicatorComponent.h @@ -87,24 +87,6 @@ public: scrollUp->setOpacity(0); } - if (downFadeIn) { - auto downFadeInFunc = [scrollDown](float t) { - scrollDown->setOpacity( - static_cast(glm::mix(0.0f, 1.0f, t) * 255)); - }; - scrollDown->setAnimation(new LambdaAnimation(downFadeInFunc, fadeInTime), 0, - nullptr, false); - } - - if (downFadeOut) { - auto downFadeOutFunc = [scrollDown](float t) { - scrollDown->setOpacity( - static_cast(glm::mix(0.0f, 1.0f, t) * 255)); - }; - scrollDown->setAnimation(new LambdaAnimation(downFadeOutFunc, fadeInTime), 0, - nullptr, true); - } - if (upFadeIn) { auto upFadeInFunc = [scrollUp](float t) { scrollUp->setOpacity( @@ -123,6 +105,24 @@ public: nullptr, true); } + if (downFadeIn) { + auto downFadeInFunc = [scrollDown](float t) { + scrollDown->setOpacity( + static_cast(glm::mix(0.0f, 1.0f, t) * 255)); + }; + scrollDown->setAnimation(new LambdaAnimation(downFadeInFunc, fadeInTime), 0, + nullptr, false); + } + + if (downFadeOut) { + auto downFadeOutFunc = [scrollDown](float t) { + scrollDown->setOpacity( + static_cast(glm::mix(0.0f, 1.0f, t) * 255)); + }; + scrollDown->setAnimation(new LambdaAnimation(downFadeOutFunc, fadeInTime), 0, + nullptr, true); + } + mPreviousScrollState = state; }); }