groupbar: various visual improvements

added rounding, round at edges, and indicator height
This commit is contained in:
Vaxry 2025-01-31 13:32:36 +00:00
parent ac5668192e
commit 9c38287410
7 changed files with 121 additions and 22 deletions

View file

@ -9,10 +9,15 @@ void CRectPassElement::draw(const CRegion& damage) {
if (data.box.w <= 0 || data.box.h <= 0)
return;
if (!data.clipBox.empty())
g_pHyprOpenGL->m_RenderData.clipBox = data.clipBox;
if (data.color.a == 1.F || !data.blur)
g_pHyprOpenGL->renderRectWithDamage(data.box, data.color, damage, data.round, data.roundingPower);
else
g_pHyprOpenGL->renderRectWithBlur(data.box, data.color, data.round, data.roundingPower, data.blurA, data.xray);
g_pHyprOpenGL->m_RenderData.clipBox = {};
}
bool CRectPassElement::needsLiveBlur() {

View file

@ -10,6 +10,7 @@ class CRectPassElement : public IPassElement {
float roundingPower = 2.0f;
bool blur = false, xray = false;
float blurA = 1.F;
CBox clipBox;
};
CRectPassElement(const SRectData& data);

View file

@ -13,9 +13,13 @@ void CTexPassElement::draw(const CRegion& damage) {
CScopeGuard x = {[]() {
//
g_pHyprOpenGL->m_bEndFrame = false;
g_pHyprOpenGL->m_bEndFrame = false;
g_pHyprOpenGL->m_RenderData.clipBox = {};
}};
if (!data.clipBox.empty())
g_pHyprOpenGL->m_RenderData.clipBox = data.clipBox;
if (data.replaceProjection)
g_pHyprOpenGL->m_RenderData.monitorProjection = *data.replaceProjection;
g_pHyprOpenGL->renderTextureInternalWithDamage(data.tex, data.box, data.a, data.damage.empty() ? damage : data.damage, data.round, data.roundingPower, data.syncTimeline,

View file

@ -19,6 +19,7 @@ class CTexPassElement : public IPassElement {
SP<CSyncTimeline> syncTimeline;
int64_t syncPoint = 0;
std::optional<Mat3x3> replaceProjection;
CBox clipBox;
};
CTexPassElement(const SRenderData& data);