Implement `hash_layout` for `pane_grid::TitleBar`
This commit is contained in:
parent
2a46ed8753
commit
bbc6e91429
|
@ -183,6 +183,10 @@ where
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
use crate::layout;
|
||||
use crate::pane_grid;
|
||||
use crate::{Clipboard, Element, Event, Layout, Point, Rectangle, Size};
|
||||
use crate::{
|
||||
Clipboard, Element, Event, Hasher, Layout, Point, Rectangle, Size,
|
||||
};
|
||||
|
||||
/// The title bar of a [`Pane`].
|
||||
///
|
||||
|
@ -176,6 +178,14 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn hash_layout(&self, hasher: &mut Hasher) {
|
||||
use std::hash::Hash;
|
||||
|
||||
self.title.hash(hasher);
|
||||
self.title_size.hash(hasher);
|
||||
self.padding.hash(hasher);
|
||||
}
|
||||
|
||||
pub(crate) fn layout(
|
||||
&self,
|
||||
renderer: &Renderer,
|
||||
|
|
Loading…
Reference in New Issue