1
0
Fork 0
forked from wry/wry

render: compute image width/height in single function call

This commit is contained in:
Julian Orth 2024-02-03 23:27:22 +01:00
parent db9c382002
commit 4ba8550da8
7 changed files with 18 additions and 18 deletions

View file

@ -194,7 +194,7 @@ impl OutputNode {
};
ws.title_texture.set(Some(title.clone()));
let mut x = pos + 1;
let mut width = title.texture.width();
let (mut width, _) = title.texture.size();
if let Some(scale) = scale {
width = (width as f64 / scale).round() as _;
}
@ -253,7 +253,7 @@ impl OutputNode {
break 'set_status;
}
};
let mut width = title.texture.width();
let (mut width, _) = title.texture.size();
if let Some(scale) = scale {
width = (width as f64 / scale).round() as _;
}