From 4510764f348d1a7c4cca613925ee22acfa38b388 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 30 Jun 2022 20:02:04 +0200 Subject: finally fix scaled snapshots --- src/helpers/MiscFunctions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/helpers/MiscFunctions.cpp') diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 067a351f..cb1d88d6 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -114,8 +114,8 @@ std::string getFormat(const char *fmt, ...) { } void scaleBox(wlr_box* box, float scale) { - box->width = std::round((box->x + box->width) * scale) - std::round(box->x * scale); - box->height = std::round((box->y + box->height) * scale) - std::round(box->y * scale); + box->width = std::round(box->width * scale); + box->height = std::round(box->height * scale); box->x = std::round(box->x * scale); box->y = std::round(box->y * scale); } -- cgit v1.2.3