From db555b9ac9400eae19dc6ea91b1e529c29ef8795 Mon Sep 17 00:00:00 2001 From: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> Date: Tue, 12 Sep 2023 23:25:44 +0100 Subject: [PATCH] fix rounding modified: src/render/decorations/CHyprGroupBarDecoration.cpp Signed-off-by: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> --- src/render/decorations/CHyprGroupBarDecoration.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index 346393eb..de1fe77a 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -101,10 +101,10 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D& return; // Bottom left of groupbar - Vector2D pos = Vector2D(std::round(m_vLastWindowPos.x - pMonitor->vecPosition.x + offset.x + ROUNDING), - std::round(m_vLastWindowPos.y - pMonitor->vecPosition.y + offset.y) + + Vector2D pos = Vector2D(m_vLastWindowPos.x - pMonitor->vecPosition.x + offset.x + ROUNDING, + std::floor(m_vLastWindowPos.y) - pMonitor->vecPosition.y + offset.y + (m_bOnTop ? (m_bInternalBorder ? 0 : -BORDERSIZE) : - std::round(m_vLastWindowSize.y) + m_iBarInternalHeight + BAR_INTERNAL_PADDING + (m_bInternalBorder ? 0 : BORDERSIZE))); + std::floor(m_vLastWindowSize.y) + m_iBarInternalHeight + BAR_INTERNAL_PADDING + (m_bInternalBorder ? 0 : BORDERSIZE))); wlr_box barBox = {pos.x, pos.y - m_iBarHeight + (m_bOnTop ? -BAR_INTERNAL_PADDING : 0), BARW, m_iBarHeight}; wlr_box gradBox = {pos.x, pos.y - m_iBarHeight + (m_bOnTop ? -2 * BAR_INTERNAL_PADDING : -BAR_INTERNAL_PADDING) - m_iGradientHeight, BARW, m_iGradientHeight};