mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 03:25:58 +01:00
groupbars: make gradients toggleable
This commit is contained in:
parent
d1ec314a03
commit
90cb5fb672
2 changed files with 4 additions and 1 deletions
|
@ -96,6 +96,7 @@ void CConfigManager::setDefaultVars() {
|
||||||
configValues["misc:allow_session_lock_restore"].intValue = 0;
|
configValues["misc:allow_session_lock_restore"].intValue = 0;
|
||||||
configValues["misc:render_titles_in_groupbar"].intValue = 1;
|
configValues["misc:render_titles_in_groupbar"].intValue = 1;
|
||||||
configValues["misc:groupbar_titles_font_size"].intValue = 8;
|
configValues["misc:groupbar_titles_font_size"].intValue = 8;
|
||||||
|
configValues["misc:groupbar_gradients"].intValue = 1;
|
||||||
|
|
||||||
configValues["debug:int"].intValue = 0;
|
configValues["debug:int"].intValue = 0;
|
||||||
configValues["debug:log_damage"].intValue = 0;
|
configValues["debug:log_damage"].intValue = 0;
|
||||||
|
|
|
@ -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 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 PTITLEFONTSIZE = &g_pConfigManager->getConfigValuePtr("misc:groupbar_titles_font_size")->intValue;
|
||||||
static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_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))
|
if (barsToDraw < 1 || m_pWindow->isHidden() || !g_pCompositor->windowValidMapped(m_pWindow))
|
||||||
return;
|
return;
|
||||||
|
@ -139,6 +140,7 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D&
|
||||||
|
|
||||||
refreshGradients();
|
refreshGradients();
|
||||||
|
|
||||||
|
if (*PGRADIENTS)
|
||||||
g_pHyprOpenGL->renderTexture((m_dwGroupMembers[i] == g_pCompositor->m_pLastWindow ? m_tGradientActive : m_tGradientInactive), &rect, 1.0);
|
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.y -= (*PTITLEFONTSIZE + 2 * BAR_TEXT_PAD) * 0.2 * pMonitor->scale;
|
||||||
|
|
Loading…
Reference in a new issue