Use f32 for scale_factor

This commit is contained in:
Héctor Ramón Jiménez 2025-09-02 23:29:22 +02:00
parent ad0e4c53cf
commit 74b792b608
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
14 changed files with 56 additions and 51 deletions

View file

@ -15,7 +15,7 @@ pub struct Screenshot {
pub size: Size<u32>,
/// The scale factor of the [`Screenshot`]. This can be useful when converting between widget
/// bounds (which are in logical pixels) to crop screenshots.
pub scale_factor: f64,
pub scale_factor: f32,
}
impl Debug for Screenshot {
@ -35,7 +35,7 @@ impl Screenshot {
pub fn new(
bytes: impl Into<Bytes>,
size: Size<u32>,
scale_factor: f64,
scale_factor: f32,
) -> Self {
Self {
bytes: bytes.into(),