diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-09-03 22:49:45 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-09-03 22:49:52 +0200 |
| commit | fbd2b4799d9c205cb0283432ef9ae3778ff68aa7 (patch) | |
| tree | 0a0218744729b4c63e698144a7f6a17cb9c5cab5 /src/render | |
| parent | 1664f81cae6bd0e159de835f09d4f0d7105fe07e (diff) | |
Fix some more crimes against humanity
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/decorations/CHyprGroupBarDecoration.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index 08e3540c..0823ea94 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -26,9 +26,9 @@ void CHyprGroupBarDecoration::updateWindow(CWindow* pWindow) { if (pWindow->m_vRealPosition.vec() + WORKSPACEOFFSET != m_vLastWindowPos || pWindow->m_vRealSize.vec() != m_vLastWindowSize) { // we draw 3px above the window's border with 3px - const auto BORDERSIZE = g_pConfigManager->getInt("general:border_size"); + const auto PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue; - m_seExtents.topLeft = Vector2D(0, BORDERSIZE + 3 + 3); + m_seExtents.topLeft = Vector2D(0, *PBORDERSIZE + 3 + 3); m_seExtents.bottomRight = Vector2D(); m_vLastWindowPos = pWindow->m_vRealPosition.vec() + WORKSPACEOFFSET; @@ -82,7 +82,10 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a) { if (rect.width <= 0 || rect.height <= 0) break; - CColor color = m_dwGroupMembers[i] == g_pCompositor->m_pLastWindow ? CColor(g_pConfigManager->getInt("dwindle:col.group_border_active")) : CColor(g_pConfigManager->getInt("dwindle:col.group_border")); + static auto *const PGROUPCOLACTIVE = &g_pConfigManager->getConfigValuePtr("dwindle:col.group_border_active")->intValue; + static auto *const PGROUPCOLINACTIVE = &g_pConfigManager->getConfigValuePtr("dwindle:col.group_border")->intValue; + + CColor color = m_dwGroupMembers[i] == g_pCompositor->m_pLastWindow ? CColor(*PGROUPCOLACTIVE) : CColor(*PGROUPCOLINACTIVE); color.a *= a; g_pHyprOpenGL->renderRect(&rect, color); |
