diff options
author | vaxerski <[email protected]> | 2023-12-22 19:54:18 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-12-22 19:54:31 +0100 |
commit | c416880cf96aee783b6a00f356512e5d758e6056 (patch) | |
tree | ee02f43bedb62129ed4f7dd5a811d1399ac464ee | |
parent | 37d2840246af43a7141e2a036820fc3dec468f01 (diff) | |
download | Hyprland-c416880cf96aee783b6a00f356512e5d758e6056.tar.gz Hyprland-c416880cf96aee783b6a00f356512e5d758e6056.zip |
shadow: correctly scale boxes
-rw-r--r-- | src/render/decorations/CHyprDropShadowDecoration.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp index 5e70b639..0f848c61 100644 --- a/src/render/decorations/CHyprDropShadowDecoration.cpp +++ b/src/render/decorations/CHyprDropShadowDecoration.cpp @@ -119,10 +119,12 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D windowBox.translate(-pMonitor->vecPosition + WORKSPACEOFFSET); withDecos.translate(-pMonitor->vecPosition + WORKSPACEOFFSET); - auto extentss = withDecos.extentsFrom(windowBox); + auto scaledExtentss = withDecos.extentsFrom(windowBox); + scaledExtentss = scaledExtentss * pMonitor->scale; + scaledExtentss = scaledExtentss.round(); // add extents - windowBox.addExtents(extentss).scale(pMonitor->scale).round(); + windowBox.scale(pMonitor->scale).round().addExtents(scaledExtentss); if (windowBox.width < 1 || windowBox.height < 1) return; // prevent assert failed |