mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-10 09:26:00 +01:00
don't decorate on only no gaps
This commit is contained in:
parent
e5d143b238
commit
695411f1bd
5 changed files with 11 additions and 0 deletions
|
@ -14,6 +14,7 @@ struct SWindowSpecialRenderData {
|
||||||
// set by the layout
|
// set by the layout
|
||||||
bool rounding = true;
|
bool rounding = true;
|
||||||
bool border = true;
|
bool border = true;
|
||||||
|
bool decorate = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SWindowAdditionalConfigData {
|
struct SWindowAdditionalConfigData {
|
||||||
|
|
|
@ -196,12 +196,14 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for
|
||||||
|
|
||||||
PWINDOW->m_sSpecialRenderData.rounding = false;
|
PWINDOW->m_sSpecialRenderData.rounding = false;
|
||||||
PWINDOW->m_sSpecialRenderData.border = false;
|
PWINDOW->m_sSpecialRenderData.border = false;
|
||||||
|
PWINDOW->m_sSpecialRenderData.decorate = false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PWINDOW->m_sSpecialRenderData.rounding = true;
|
PWINDOW->m_sSpecialRenderData.rounding = true;
|
||||||
PWINDOW->m_sSpecialRenderData.border = true;
|
PWINDOW->m_sSpecialRenderData.border = true;
|
||||||
|
PWINDOW->m_sSpecialRenderData.decorate = true;
|
||||||
|
|
||||||
const auto OFFSETTOPLEFT = Vector2D(DISPLAYLEFT ? *PGAPSOUT : *PGAPSIN,
|
const auto OFFSETTOPLEFT = Vector2D(DISPLAYLEFT ? *PGAPSOUT : *PGAPSIN,
|
||||||
DISPLAYTOP ? *PGAPSOUT : *PGAPSIN);
|
DISPLAYTOP ? *PGAPSOUT : *PGAPSIN);
|
||||||
|
|
|
@ -252,12 +252,14 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
|
||||||
|
|
||||||
PWINDOW->m_sSpecialRenderData.rounding = false;
|
PWINDOW->m_sSpecialRenderData.rounding = false;
|
||||||
PWINDOW->m_sSpecialRenderData.border = false;
|
PWINDOW->m_sSpecialRenderData.border = false;
|
||||||
|
PWINDOW->m_sSpecialRenderData.decorate = false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PWINDOW->m_sSpecialRenderData.rounding = true;
|
PWINDOW->m_sSpecialRenderData.rounding = true;
|
||||||
PWINDOW->m_sSpecialRenderData.border = true;
|
PWINDOW->m_sSpecialRenderData.border = true;
|
||||||
|
PWINDOW->m_sSpecialRenderData.decorate = true;
|
||||||
|
|
||||||
const auto OFFSETTOPLEFT = Vector2D(DISPLAYLEFT ? *PGAPSOUT : *PGAPSIN,
|
const auto OFFSETTOPLEFT = Vector2D(DISPLAYLEFT ? *PGAPSOUT : *PGAPSIN,
|
||||||
DISPLAYTOP ? *PGAPSOUT : *PGAPSIN);
|
DISPLAYTOP ? *PGAPSOUT : *PGAPSIN);
|
||||||
|
|
|
@ -56,6 +56,9 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a) {
|
||||||
if (m_pWindow->m_cRealShadowColor.col() == CColor(0, 0, 0, 0))
|
if (m_pWindow->m_cRealShadowColor.col() == CColor(0, 0, 0, 0))
|
||||||
return; // don't draw invisible shadows
|
return; // don't draw invisible shadows
|
||||||
|
|
||||||
|
if (!m_pWindow->m_sSpecialRenderData.decorate)
|
||||||
|
return;
|
||||||
|
|
||||||
static auto *const PSHADOWS = &g_pConfigManager->getConfigValuePtr("decoration:drop_shadow")->intValue;
|
static auto *const PSHADOWS = &g_pConfigManager->getConfigValuePtr("decoration:drop_shadow")->intValue;
|
||||||
static auto *const PSHADOWSIZE = &g_pConfigManager->getConfigValuePtr("decoration:shadow_range")->intValue;
|
static auto *const PSHADOWSIZE = &g_pConfigManager->getConfigValuePtr("decoration:shadow_range")->intValue;
|
||||||
static auto *const PROUNDING = &g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue;
|
static auto *const PROUNDING = &g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue;
|
||||||
|
|
|
@ -70,6 +70,9 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a) {
|
||||||
if (barsToDraw < 1 || m_pWindow->m_bHidden || !g_pCompositor->windowValidMapped(m_pWindow))
|
if (barsToDraw < 1 || m_pWindow->m_bHidden || !g_pCompositor->windowValidMapped(m_pWindow))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!m_pWindow->m_sSpecialRenderData.decorate)
|
||||||
|
return;
|
||||||
|
|
||||||
const int PAD = 2; //2px
|
const int PAD = 2; //2px
|
||||||
|
|
||||||
const int BARW = (m_vLastWindowSize.x - PAD * (barsToDraw - 1)) / barsToDraw;
|
const int BARW = (m_vLastWindowSize.x - PAD * (barsToDraw - 1)) / barsToDraw;
|
||||||
|
|
Loading…
Reference in a new issue