Last active
October 22, 2023 09:05
-
-
Save 15cm/ee723a4fc3d54d4a95c08f11928d3f6f to your computer and use it in GitHub Desktop.
Yazi ueberzugpp scale patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/adaptor/src/ueberzug.rs b/adaptor/src/ueberzug.rs | |
index 27d891b..24f5e31 100644 | |
--- a/adaptor/src/ueberzug.rs | |
+++ b/adaptor/src/ueberzug.rs | |
@@ -47,10 +47,10 @@ impl Ueberzug { | |
if let Some((path, rect)) = cmd { | |
let s = format!( | |
r#"{{"action":"add","identifier":"yazi","x":{},"y":{},"max_width":{},"max_height":{},"path":"{}"}}{}"#, | |
- rect.x, | |
- rect.y, | |
- rect.width, | |
- rect.height, | |
+ (rect.x + 1) / 2, | |
+ (rect.y + 1) / 2, | |
+ (rect.width + 1) / 2, | |
+ (rect.height + 1) / 2, | |
path.to_string_lossy(), | |
"\n" | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment