iris: separate layout allocation from lengths
This commit is contained in:
1 parent
2b9d8c49a0
commit
1f15125992
17 files changed
+395
-168
No files matched your search
@@ -1,4 +1,4 @@
|
||||
use crate::{Axis, Len, Painter, Size};
|
||||
use crate::{Axis, LayoutLen, Painter, Size};
|
||||
use std::any::Any;
|
||||
|
||||
mod data;
|
||||
@@ -28,7 +28,7 @@ pub enum ChildOrder {
|
||||
pub trait Widget: Any {
|
||||
fn draw(&mut self, painter: &mut Painter);
|
||||
|
||||
fn size_hint(&self, _axis: Axis) -> Option<Len> {
|
||||
fn size_hint(&self, _axis: Axis) -> Option<LayoutLen> {
|
||||
None
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ impl Widget for () {
|
||||
true
|
||||
}
|
||||
|
||||
fn size_hint(&self, _axis: Axis) -> Option<Len> {
|
||||
Some(Len::ZERO)
|
||||
fn size_hint(&self, _axis: Axis) -> Option<LayoutLen> {
|
||||
Some(LayoutLen::ZERO)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user