diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2023-02-19 21:07:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-19 21:07:32 +0000 |
| commit | e5a4c0c986f72813e8822f31ed3d5fa6be1b6c13 (patch) | |
| tree | 8ce0ad44055c63e905303f49da61c9f44316170a /src/Compositor.cpp | |
| parent | 2363cc2572c8b1f99a3ac5ff4104067b0503a302 (diff) | |
Group/Tab Rework (#1580)
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 95366001..21937308 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1583,6 +1583,8 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) { // optimization static auto* const ACTIVECOL = (CGradientValueData*)g_pConfigManager->getConfigValuePtr("general:col.active_border")->data.get(); static auto* const INACTIVECOL = (CGradientValueData*)g_pConfigManager->getConfigValuePtr("general:col.inactive_border")->data.get(); + static auto* const GROUPACTIVECOL = (CGradientValueData*)g_pConfigManager->getConfigValuePtr("general:col.group_border_active")->data.get(); + static auto* const GROUPINACTIVECOL = (CGradientValueData*)g_pConfigManager->getConfigValuePtr("general:col.group_border")->data.get(); static auto* const PINACTIVEALPHA = &g_pConfigManager->getConfigValuePtr("decoration:inactive_opacity")->floatValue; static auto* const PACTIVEALPHA = &g_pConfigManager->getConfigValuePtr("decoration:active_opacity")->floatValue; static auto* const PFULLSCREENALPHA = &g_pConfigManager->getConfigValuePtr("decoration:fullscreen_opacity")->floatValue; @@ -1604,13 +1606,19 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) { const auto RENDERDATA = g_pLayoutManager->getCurrentLayout()->requestRenderHints(pWindow); if (RENDERDATA.isBorderGradient) setBorderColor(*RENDERDATA.borderGradient); - else - setBorderColor(pWindow == m_pLastWindow ? (pWindow->m_sSpecialRenderData.activeBorderColor.toUnderlying() >= 0 ? - CGradientValueData(CColor(pWindow->m_sSpecialRenderData.activeBorderColor.toUnderlying())) : - *ACTIVECOL) : - (pWindow->m_sSpecialRenderData.inactiveBorderColor.toUnderlying() >= 0 ? - CGradientValueData(CColor(pWindow->m_sSpecialRenderData.inactiveBorderColor.toUnderlying())) : - *INACTIVECOL)); + else { + if (pWindow == m_pLastWindow) { + const auto* const ACTIVECOLOR = !pWindow->m_sGroupData.pNextWindow ? ACTIVECOL : GROUPACTIVECOL; + setBorderColor(pWindow->m_sSpecialRenderData.activeBorderColor.toUnderlying() >= 0 ? + CGradientValueData(CColor(pWindow->m_sSpecialRenderData.activeBorderColor.toUnderlying())) : + *ACTIVECOLOR); + } else { + const auto* const INACTIVECOLOR = !pWindow->m_sGroupData.pNextWindow ? INACTIVECOL : GROUPINACTIVECOL; + setBorderColor(pWindow->m_sSpecialRenderData.inactiveBorderColor.toUnderlying() >= 0 ? + CGradientValueData(CColor(pWindow->m_sSpecialRenderData.inactiveBorderColor.toUnderlying())) : + *INACTIVECOLOR); + } + } // tick angle if it's not running (aka dead) if (!pWindow->m_fBorderAngleAnimationProgress.isBeingAnimated()) |
