summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-05-22 22:07:32 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-05-22 22:07:32 +0200
commit90cb5fb6724b4a1c2cb49f09ac101648c8077301 (patch)
treea7e04e2f77d11672d7f130c6d921ee2b72d93957 /src
parentd1ec314a03473124ffadf8dd8aea33c317dfc1d0 (diff)
groupbars: make gradients toggleable
Diffstat (limited to 'src')
-rw-r--r--src/config/ConfigManager.cpp1
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index b475bd4d..08da3d1c 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -96,6 +96,7 @@ void CConfigManager::setDefaultVars() {
configValues["misc:allow_session_lock_restore"].intValue = 0;
configValues["misc:render_titles_in_groupbar"].intValue = 1;
configValues["misc:groupbar_titles_font_size"].intValue = 8;
+ configValues["misc:groupbar_gradients"].intValue = 1;
configValues["debug:int"].intValue = 0;
configValues["debug:log_damage"].intValue = 0;
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp
index 1db7952c..382046fb 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.cpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.cpp
@@ -92,6 +92,7 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D&
static auto* const PRENDERTITLES = &g_pConfigManager->getConfigValuePtr("misc:render_titles_in_groupbar")->intValue;
static auto* const PTITLEFONTSIZE = &g_pConfigManager->getConfigValuePtr("misc:groupbar_titles_font_size")->intValue;
static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
+ static auto* const PGRADIENTS = &g_pConfigManager->getConfigValuePtr("misc:groupbar_gradients")->intValue;
if (barsToDraw < 1 || m_pWindow->isHidden() || !g_pCompositor->windowValidMapped(m_pWindow))
return;
@@ -139,7 +140,8 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D&
refreshGradients();
- g_pHyprOpenGL->renderTexture((m_dwGroupMembers[i] == g_pCompositor->m_pLastWindow ? m_tGradientActive : m_tGradientInactive), &rect, 1.0);
+ if (*PGRADIENTS)
+ g_pHyprOpenGL->renderTexture((m_dwGroupMembers[i] == g_pCompositor->m_pLastWindow ? m_tGradientActive : m_tGradientInactive), &rect, 1.0);
rect.y -= (*PTITLEFONTSIZE + 2 * BAR_TEXT_PAD) * 0.2 * pMonitor->scale;
rect.height = (*PTITLEFONTSIZE + 2 * BAR_TEXT_PAD) * pMonitor->scale;