Remove hash_layout method from Widget trait
This commit is contained in:
parent
9fe5080153
commit
1313c94e3b
35 changed files with 105 additions and 636 deletions
|
|
@ -5,11 +5,10 @@ use crate::mouse;
|
|||
use crate::overlay;
|
||||
use crate::renderer;
|
||||
use crate::{
|
||||
Alignment, Clipboard, Element, Hasher, Layout, Length, Padding, Point,
|
||||
Rectangle, Shell, Widget,
|
||||
Alignment, Clipboard, Element, Layout, Length, Padding, Point, Rectangle,
|
||||
Shell, Widget,
|
||||
};
|
||||
|
||||
use std::hash::Hash;
|
||||
use std::u32;
|
||||
|
||||
/// A container that distributes its contents horizontally.
|
||||
|
|
@ -198,23 +197,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
fn hash_layout(&self, state: &mut Hasher) {
|
||||
struct Marker;
|
||||
std::any::TypeId::of::<Marker>().hash(state);
|
||||
|
||||
self.width.hash(state);
|
||||
self.height.hash(state);
|
||||
self.max_width.hash(state);
|
||||
self.max_height.hash(state);
|
||||
self.align_items.hash(state);
|
||||
self.spacing.hash(state);
|
||||
self.padding.hash(state);
|
||||
|
||||
for child in &self.children {
|
||||
child.widget.hash_layout(state);
|
||||
}
|
||||
}
|
||||
|
||||
fn overlay(
|
||||
&mut self,
|
||||
layout: Layout<'_>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue