mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-08 02:05:57 +01:00
calculate zoom_center based on monitor scale (#2482)
This commit is contained in:
parent
bca3068db2
commit
003993337a
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ void CHyprOpenGLImpl::end() {
|
|||
|
||||
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.mouseZoomUseMouse ? g_pInputManager->getMouseCoordsInternal() - m_RenderData.pMonitor->vecPosition : m_RenderData.pMonitor->vecTransformedSize / 2.f) * m_RenderData.pMonitor->scale;
|
||||
monbox.x -= ZOOMCENTER.x;
|
||||
monbox.y -= ZOOMCENTER.y;
|
||||
scaleBox(&monbox, m_RenderData.mouseZoomFactor);
|
||||
|
|
Loading…
Reference in a new issue