1
0
Fork 0
forked from wry/wry

fractional-scale: implement accurate rounding

This commit is contained in:
Julian Orth 2024-10-22 11:11:29 +02:00
parent cc426a0a4a
commit e2806a6337
5 changed files with 41 additions and 14 deletions

View file

@ -17,6 +17,7 @@ use {
PlaceholderNode, WorkspaceNode,
},
utils::{
array_to_tuple::ArrayToTuple,
clonecell::CloneCell,
copyhashmap::CopyHashMap,
hash_map_ext::HashMapExt,
@ -608,7 +609,7 @@ impl ToplevelData {
let (dw, dh) = self.desired_extents.get().size();
if let Some(ws) = self.workspace.get() {
let scale = ws.output.get().global.persistent.scale.get();
return scale.pixel_size(dw, dh);
return scale.pixel_size([dw, dh]).to_tuple();
};
(0, 0)
}