Create iced_widget subcrate and re-organize the whole codebase

This commit is contained in:
Héctor Ramón Jiménez 2023-03-04 05:37:11 +01:00
parent c54409d171
commit 3a0d34c024
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
209 changed files with 1959 additions and 2183 deletions

View file

@ -12,8 +12,8 @@ use allocator::Allocator;
pub const SIZE: u32 = 2048;
use iced_graphics::image;
use iced_graphics::Size;
use crate::core::Size;
use crate::graphics::image;
use std::num::NonZeroU32;

View file

@ -1,7 +1,6 @@
use crate::core::Size;
use crate::image::atlas::{self, allocator};
use iced_graphics::Size;
#[derive(Debug)]
pub enum Allocation {
Partial {

View file

@ -46,10 +46,10 @@ impl Region {
(rectangle.min.x as u32, rectangle.min.y as u32)
}
pub fn size(&self) -> iced_graphics::Size<u32> {
pub fn size(&self) -> crate::core::Size<u32> {
let size = self.allocation.rectangle.size();
iced_graphics::Size::new(size.width as u32, size.height as u32)
crate::core::Size::new(size.width as u32, size.height as u32)
}
}

View file

@ -1,8 +1,7 @@
use crate::core::Size;
use crate::graphics::image;
use crate::image::atlas;
use iced_graphics::image;
use iced_graphics::Size;
#[derive(Debug)]
pub enum Entry {
Contiguous(atlas::Allocation),