summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzakk4223 <zakk@rsdio.com>2024-06-11 11:00:50 -0400
committerGitHub <noreply@github.com>2024-06-11 17:00:50 +0200
commitb17381eb819d784146ec40d81d30a2b33a8a4e64 (patch)
tree07c8901c2868fd75a5b580661fc988fdda329e57 /src
parent811429bfd4a46f33c7788580f72038b0c3c1c2b1 (diff)
groupbar: Don't apply monitor scale twice to groupbar text (#6411)
Diffstat (limited to 'src')
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp
index 731fce04..a87dba31 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.cpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.cpp
@@ -172,10 +172,10 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a) {
.emplace_back(std::make_unique<CTitleTex>(m_dwGroupMembers[WINDOWINDEX].lock(),
Vector2D{m_fBarWidth * pMonitor->scale, (*PTITLEFONTSIZE + 2 * BAR_TEXT_PAD) * pMonitor->scale}, pMonitor->scale))
.get();
- rect.y += ((rect.height - pTitleTex->textHeight) / 2.0) * pMonitor->scale;
- rect.height = (pTitleTex->textHeight) * pMonitor->scale;
- rect.width = pTitleTex->textWidth * pMonitor->scale;
- rect.x += m_fBarWidth / 2.0 - (pTitleTex->textWidth / 2.0) * pMonitor->scale;
+ rect.y += (rect.height - pTitleTex->textHeight) / 2.0;
+ rect.height = pTitleTex->textHeight;
+ rect.width = pTitleTex->textWidth;
+ rect.x += (m_fBarWidth * pMonitor->scale) / 2.0 - (pTitleTex->textWidth / 2.0);
rect.round();
g_pHyprOpenGL->renderTexture(pTitleTex->tex, &rect, 1.f);