Implement hash_layout for pane_grid::TitleBar

This commit is contained in:
Héctor Ramón Jiménez 2020-08-19 01:59:31 +02:00
parent 2a46ed8753
commit bbc6e91429
2 changed files with 15 additions and 1 deletions

View file

@ -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,