mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 19:45:58 +01:00
groupbar: Don't apply monitor scale twice to groupbar text (#6411)
This commit is contained in:
parent
811429bfd4
commit
b17381eb81
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue