aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers/WLClasses.cpp
diff options
context:
space:
mode:
authorend-4 <[email protected]>2024-04-04 22:41:09 +0700
committerGitHub <[email protected]>2024-04-04 16:41:09 +0100
commit9b8ef9206d9687fd2280cff5c0e6d5fe6abb395a (patch)
treebbdf730ae624514fef8d7c4479afd0c22dc06709 /src/helpers/WLClasses.cpp
parent846162cce16b78a3d5c23225a7d5733e52a24ec0 (diff)
downloadHyprland-9b8ef9206d9687fd2280cff5c0e6d5fe6abb395a.tar.gz
Hyprland-9b8ef9206d9687fd2280cff5c0e6d5fe6abb395a.zip
layers: separate anim configs for open/close (#5421)
Diffstat (limited to 'src/helpers/WLClasses.cpp')
-rw-r--r--src/helpers/WLClasses.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/helpers/WLClasses.cpp b/src/helpers/WLClasses.cpp
index 084a719d..6135098a 100644
--- a/src/helpers/WLClasses.cpp
+++ b/src/helpers/WLClasses.cpp
@@ -3,9 +3,9 @@
#include "../Compositor.hpp"
SLayerSurface::SLayerSurface() {
- alpha.create(g_pConfigManager->getAnimationPropertyConfig("fadeLayers"), this, AVARDAMAGE_ENTIRE);
- realPosition.create(g_pConfigManager->getAnimationPropertyConfig("layers"), this, AVARDAMAGE_ENTIRE);
- realSize.create(g_pConfigManager->getAnimationPropertyConfig("layers"), this, AVARDAMAGE_ENTIRE);
+ alpha.create(g_pConfigManager->getAnimationPropertyConfig("fadeLayersIn"), this, AVARDAMAGE_ENTIRE);
+ realPosition.create(g_pConfigManager->getAnimationPropertyConfig("layersIn"), this, AVARDAMAGE_ENTIRE);
+ realSize.create(g_pConfigManager->getAnimationPropertyConfig("layersIn"), this, AVARDAMAGE_ENTIRE);
alpha.registerVar();
realPosition.registerVar();
realSize.registerVar();
@@ -61,6 +61,15 @@ void SLayerSurface::applyRules() {
void SLayerSurface::startAnimation(bool in, bool instant) {
const auto ANIMSTYLE = animationStyle.value_or(realPosition.m_pConfig->pValues->internalStyle);
+ if (in) {
+ realPosition.m_pConfig = g_pConfigManager->getAnimationPropertyConfig("layersIn");
+ realSize.m_pConfig = g_pConfigManager->getAnimationPropertyConfig("layersIn");
+ alpha.m_pConfig = g_pConfigManager->getAnimationPropertyConfig("fadeLayersIn");
+ } else {
+ realPosition.m_pConfig = g_pConfigManager->getAnimationPropertyConfig("layersOut");
+ realSize.m_pConfig = g_pConfigManager->getAnimationPropertyConfig("layersOut");
+ alpha.m_pConfig = g_pConfigManager->getAnimationPropertyConfig("fadeLayersOut");
+ }
if (ANIMSTYLE.starts_with("slide")) {
// get closest edge