Skip to content

Commit c43dbfc

Browse files
committed
Fix #135 (scaling on layout_center)
1 parent 87fb5e1 commit c43dbfc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyprland/plugins/layout_center.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ async def prepare_window(self, clients: list[ClientInfo] | None = None) -> None:
146146
height = monitor["height"] - (2 * margin[1])
147147
if is_rotated(cast(MonitorInfo, monitor)):
148148
width, height = height, width
149-
x += monitor["x"] + margin[0]
150-
y += monitor["y"] + margin[1]
149+
x += monitor["x"] + (margin[0] / scale)
150+
y += monitor["y"] + (margin[1] / scale)
151151
break
152152
await self.hyprctl(f"resizewindowpixel exact {int(width / scale)} {int(height / scale)},address:{addr}")
153-
await self.hyprctl(f"movewindowpixel exact {int(x / scale)} {int(y / scale)},address:{addr}")
153+
await self.hyprctl(f"movewindowpixel exact {int(x)} {int(y)},address:{addr}")
154154

155155
# Subcommands
156156

pyprland/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Package version."""
22

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

0 commit comments

Comments
 (0)