This commit is contained in:
ickshonpe 2025-07-17 13:39:32 -04:00 committed by GitHub
commit 76fc981d25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -881,6 +881,11 @@ mod tests {
let result = Val::Px(10.).resolve(1., size, viewport_size).unwrap();
assert_eq!(result, 10.);
let result = Val::Px(10.).resolve(3., size, viewport_size).unwrap();
assert_eq!(result, 30.);
let result = Val::Px(10.).resolve(0.25, size, viewport_size).unwrap();
assert_eq!(result, 2.5);
}
#[test]

View File

@ -0,0 +1,6 @@
---
title: `Val::resolve` scale factor support
pull_requests: [18164]
---
`Val::resolve` now has a scale factor parameter. To resolve a `Val` to a logical value use a scale factor of `1.`.