Merge pull request #1140 from Imberflur/hash-container-align
Include alignment in the container layout hash
This commit is contained in:
commit
3f5ec5b20a
2 changed files with 4 additions and 2 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue