Include alignment in the container layout hash

This commit is contained in:
Imbris 2021-12-06 14:27:24 -05:00
parent 26d053ab38
commit f86d96be0f
2 changed files with 4 additions and 2 deletions

View file

@ -37,7 +37,7 @@ impl From<Vertical> for Alignment {
} }
/// The horizontal [`Alignment`] of some resource. /// The horizontal [`Alignment`] of some resource.
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Horizontal { pub enum Horizontal {
/// Align left /// Align left
Left, Left,
@ -50,7 +50,7 @@ pub enum Horizontal {
} }
/// The vertical [`Alignment`] of some resource. /// The vertical [`Alignment`] of some resource.
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Vertical { pub enum Vertical {
/// Align top /// Align top
Top, Top,

View file

@ -226,6 +226,8 @@ where
self.height.hash(state); self.height.hash(state);
self.max_width.hash(state); self.max_width.hash(state);
self.max_height.hash(state); self.max_height.hash(state);
self.horizontal_alignment.hash(state);
self.vertical_alignment.hash(state);
self.content.hash_layout(state); self.content.hash_layout(state);
} }