mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 23:49:49 +01:00
zoom: multiply by scale only on mouseZoomUseMouse (#2495)
This commit is contained in:
parent
7932e42507
commit
10fd75c833
1 changed files with 2 additions and 3 deletions
|
@ -158,9 +158,8 @@ void CHyprOpenGLImpl::end() {
|
|||
wlr_box monbox = {0, 0, m_RenderData.pMonitor->vecTransformedSize.x, m_RenderData.pMonitor->vecTransformedSize.y};
|
||||
|
||||
if (m_RenderData.mouseZoomFactor != 1.f) {
|
||||
const auto ZOOMCENTER = (m_RenderData.mouseZoomUseMouse ? g_pInputManager->getMouseCoordsInternal() - m_RenderData.pMonitor->vecPosition :
|
||||
m_RenderData.pMonitor->vecTransformedSize / 2.f) *
|
||||
m_RenderData.pMonitor->scale;
|
||||
const auto ZOOMCENTER = m_RenderData.mouseZoomUseMouse ? (g_pInputManager->getMouseCoordsInternal() - m_RenderData.pMonitor->vecPosition) * m_RenderData.pMonitor->scale :
|
||||
m_RenderData.pMonitor->vecTransformedSize / 2.f;
|
||||
monbox.x -= ZOOMCENTER.x;
|
||||
monbox.y -= ZOOMCENTER.y;
|
||||
scaleBox(&monbox, m_RenderData.mouseZoomFactor);
|
||||
|
|
Loading…
Reference in a new issue