Skip to content

Commit

Permalink
Don't apply monitor scale twice to groupbar text
Browse files Browse the repository at this point in the history
  • Loading branch information
zakk4223 committed Jun 10, 2024
1 parent ea2501d commit b04f13c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/render/decorations/CHyprGroupBarDecoration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b04f13c

Please sign in to comment.