mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 13:41:59 -07:00
store scale and scale windows with monitor
This commit is contained in:
@@ -54,4 +54,11 @@ std::string getFormat(const char *fmt, ...) {
|
||||
va_end(args);
|
||||
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
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->x = std::round(box->x * scale);
|
||||
box->y = std::round(box->y * scale);
|
||||
}
|
Reference in New Issue
Block a user