Skip to content

Commit

Permalink
Fix #135 (scaling on layout_center)
Browse files Browse the repository at this point in the history
  • Loading branch information
fdev31 committed Nov 6, 2024
1 parent 87fb5e1 commit c43dbfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pyprland/plugins/layout_center.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ async def prepare_window(self, clients: list[ClientInfo] | None = None) -> None:
height = monitor["height"] - (2 * margin[1])
if is_rotated(cast(MonitorInfo, monitor)):
width, height = height, width
x += monitor["x"] + margin[0]
y += monitor["y"] + margin[1]
x += monitor["x"] + (margin[0] / scale)
y += monitor["y"] + (margin[1] / scale)
break
await self.hyprctl(f"resizewindowpixel exact {int(width / scale)} {int(height / scale)},address:{addr}")
await self.hyprctl(f"movewindowpixel exact {int(x / scale)} {int(y / scale)},address:{addr}")
await self.hyprctl(f"movewindowpixel exact {int(x)} {int(y)},address:{addr}")

# Subcommands

Expand Down
2 changes: 1 addition & 1 deletion pyprland/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Package version."""

VERSION = "2.4.2-2"
VERSION = "2.4.2-3"

0 comments on commit c43dbfc

Please sign in to comment.