diff options
author | 2021-12-07 12:03:11 +0700 | |
---|---|---|
committer | 2021-12-07 12:03:11 +0700 | |
commit | 3f5ec5b20a48aebd6bd3e22506b01a08feaccdfc (patch) | |
tree | 118fe5b79be0c4942bd1eb127377045d32320674 | |
parent | 26d053ab3887b73f854a1174864d0fec221c5c9b (diff) | |
parent | f86d96be0fd82b479967fda3f418bf47c80e5705 (diff) | |
download | iced-3f5ec5b20a48aebd6bd3e22506b01a08feaccdfc.tar.gz iced-3f5ec5b20a48aebd6bd3e22506b01a08feaccdfc.tar.bz2 iced-3f5ec5b20a48aebd6bd3e22506b01a08feaccdfc.zip |
Merge pull request #1140 from Imberflur/hash-container-align
Include alignment in the container layout hash
-rw-r--r-- | core/src/alignment.rs | 4 | ||||
-rw-r--r-- | native/src/widget/container.rs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/src/alignment.rs b/core/src/alignment.rs index 8c561d9d..73f41d3f 100644 --- a/core/src/alignment.rs +++ b/core/src/alignment.rs @@ -37,7 +37,7 @@ impl From<Vertical> for Alignment { } /// The horizontal [`Alignment`] of some resource. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum Horizontal { /// Align left Left, @@ -50,7 +50,7 @@ pub enum Horizontal { } /// The vertical [`Alignment`] of some resource. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum Vertical { /// Align top Top, diff --git a/native/src/widget/container.rs b/native/src/widget/container.rs index 756d9d1b..0c291788 100644 --- a/native/src/widget/container.rs +++ b/native/src/widget/container.rs @@ -226,6 +226,8 @@ where self.height.hash(state); self.max_width.hash(state); self.max_height.hash(state); + self.horizontal_alignment.hash(state); + self.vertical_alignment.hash(state); self.content.hash_layout(state); } |