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,9 +5,7 @@ use crate::overlay;
|
|||
use crate::renderer;
|
||||
use crate::widget::container;
|
||||
use crate::widget::pane_grid::TitleBar;
|
||||
use crate::{
|
||||
Clipboard, Element, Hasher, Layout, Point, Rectangle, Shell, Size,
|
||||
};
|
||||
use crate::{Clipboard, Element, Layout, Point, Rectangle, Shell, Size};
|
||||
|
||||
/// The content of a [`Pane`].
|
||||
///
|
||||
|
|
@ -236,14 +234,6 @@ where
|
|||
.max(title_bar_interaction)
|
||||
}
|
||||
|
||||
pub(crate) fn hash_layout(&self, state: &mut Hasher) {
|
||||
if let Some(title_bar) = &self.title_bar {
|
||||
title_bar.hash_layout(state);
|
||||
}
|
||||
|
||||
self.body.hash_layout(state);
|
||||
}
|
||||
|
||||
pub(crate) fn overlay(
|
||||
&mut self,
|
||||
layout: Layout<'_>,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use crate::widget::pane_grid::{
|
||||
Axis, Configuration, Direction, Node, Pane, Split,
|
||||
};
|
||||
use crate::{Hasher, Point, Rectangle, Size};
|
||||
use crate::{Point, Rectangle, Size};
|
||||
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
|
||||
|
|
@ -292,10 +292,4 @@ impl Internal {
|
|||
pub fn idle(&mut self) {
|
||||
self.action = Action::Idle;
|
||||
}
|
||||
|
||||
pub fn hash_layout(&self, hasher: &mut Hasher) {
|
||||
use std::hash::Hash;
|
||||
|
||||
self.layout.hash(hasher);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use crate::overlay;
|
|||
use crate::renderer;
|
||||
use crate::widget::container;
|
||||
use crate::{
|
||||
Clipboard, Element, Hasher, Layout, Padding, Point, Rectangle, Shell, Size,
|
||||
Clipboard, Element, Layout, Padding, Point, Rectangle, Shell, Size,
|
||||
};
|
||||
|
||||
/// The title bar of a [`Pane`].
|
||||
|
|
@ -157,17 +157,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn hash_layout(&self, hasher: &mut Hasher) {
|
||||
use std::hash::Hash;
|
||||
|
||||
self.content.hash_layout(hasher);
|
||||
self.padding.hash(hasher);
|
||||
|
||||
if let Some(controls) = &self.controls {
|
||||
controls.hash_layout(hasher);
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn layout(
|
||||
&self,
|
||||
renderer: &Renderer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue