summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorIsaac Myhal <idmfoundinhim@gmail.com>2024-01-14 12:27:32 -0500
committerGitHub <noreply@github.com>2024-01-14 18:27:32 +0100
commitb6516bad0281efb55195e8db180aa2dcaf8b98e4 (patch)
treed51812e9eda1badd0782bc764afb9777da462537 /src/Compositor.cpp
parent13d9a637d61ffdd0cb23dda80f6a971f17e0f5b3 (diff)
config: Add border gradients to windowrulev2 (#4335)
* Add border gradients to windowrulev2 * windowrule border gradient: Use CVarList to parse * windowrule border gradient: No {} around short ifs
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 2b3fc7d3..b37e25b2 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1884,15 +1884,13 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) {
if (pWindow == m_pLastWindow) {
const auto* const ACTIVECOLOR =
!pWindow->m_sGroupData.pNextWindow ? (!pWindow->m_sGroupData.deny ? ACTIVECOL : NOGROUPACTIVECOL) : (GROUPLOCKED ? GROUPACTIVELOCKEDCOL : GROUPACTIVECOL);
- setBorderColor(pWindow->m_sSpecialRenderData.activeBorderColor.toUnderlying() >= 0 ?
- CGradientValueData(CColor(pWindow->m_sSpecialRenderData.activeBorderColor.toUnderlying())) :
- *ACTIVECOLOR);
+ setBorderColor(pWindow->m_sSpecialRenderData.activeBorderColor.toUnderlying().m_vColors.empty() ? *ACTIVECOLOR :
+ pWindow->m_sSpecialRenderData.activeBorderColor.toUnderlying());
} else {
const auto* const INACTIVECOLOR =
!pWindow->m_sGroupData.pNextWindow ? (!pWindow->m_sGroupData.deny ? INACTIVECOL : NOGROUPINACTIVECOL) : (GROUPLOCKED ? GROUPINACTIVELOCKEDCOL : GROUPINACTIVECOL);
- setBorderColor(pWindow->m_sSpecialRenderData.inactiveBorderColor.toUnderlying() >= 0 ?
- CGradientValueData(CColor(pWindow->m_sSpecialRenderData.inactiveBorderColor.toUnderlying())) :
- *INACTIVECOLOR);
+ setBorderColor(pWindow->m_sSpecialRenderData.inactiveBorderColor.toUnderlying().m_vColors.empty() ? *INACTIVECOLOR :
+ pWindow->m_sSpecialRenderData.inactiveBorderColor.toUnderlying());
}
}