mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-10-01 07:38:28 +00:00
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
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user