mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 15:09:48 +01:00
shadow: correctly scale boxes
This commit is contained in:
parent
37d2840246
commit
c416880cf9
1 changed files with 4 additions and 2 deletions
|
@ -119,10 +119,12 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
|
||||||
windowBox.translate(-pMonitor->vecPosition + WORKSPACEOFFSET);
|
windowBox.translate(-pMonitor->vecPosition + WORKSPACEOFFSET);
|
||||||
withDecos.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
|
// add extents
|
||||||
windowBox.addExtents(extentss).scale(pMonitor->scale).round();
|
windowBox.scale(pMonitor->scale).round().addExtents(scaledExtentss);
|
||||||
|
|
||||||
if (windowBox.width < 1 || windowBox.height < 1)
|
if (windowBox.width < 1 || windowBox.height < 1)
|
||||||
return; // prevent assert failed
|
return; // prevent assert failed
|
||||||
|
|
Loading…
Reference in a new issue