mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00
Improve sixtyfps::Image::size() API for consistency
Make size() return an unsigned integer size type instead of floats. cc #431
This commit is contained in:
parent
d16a335bc4
commit
f31f4201c6
11 changed files with 84 additions and 81 deletions
|
@ -9,7 +9,7 @@ use alloc::boxed::Box;
|
|||
use alloc::rc::Rc;
|
||||
use alloc::string::String;
|
||||
|
||||
use crate::graphics::{Image, Size};
|
||||
use crate::graphics::{Image, IntSize};
|
||||
use crate::window::Window;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
|
@ -63,7 +63,7 @@ pub trait Backend: Send + Sync {
|
|||
/// Send an user event to from another thread that should be run in the GUI event loop
|
||||
fn post_event(&'static self, event: Box<dyn FnOnce() + Send>);
|
||||
|
||||
fn image_size(&'static self, image: &Image) -> Size;
|
||||
fn image_size(&'static self, image: &Image) -> IntSize;
|
||||
|
||||
fn duration_since_start(&'static self) -> core::time::Duration {
|
||||
#[cfg(feature = "std")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue