Skip to content

Commit 3f5ec5b

Browse files
authored
Merge pull request #1140 from Imberflur/hash-container-align
Include alignment in the container layout hash
2 parents 26d053a + f86d96b commit 3f5ec5b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/src/alignment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl From<Vertical> for Alignment {
3737
}
3838

3939
/// The horizontal [`Alignment`] of some resource.
40-
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
40+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4141
pub enum Horizontal {
4242
/// Align left
4343
Left,
@@ -50,7 +50,7 @@ pub enum Horizontal {
5050
}
5151

5252
/// The vertical [`Alignment`] of some resource.
53-
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
53+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
5454
pub enum Vertical {
5555
/// Align top
5656
Top,

native/src/widget/container.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ where
226226
self.height.hash(state);
227227
self.max_width.hash(state);
228228
self.max_height.hash(state);
229+
self.horizontal_alignment.hash(state);
230+
self.vertical_alignment.hash(state);
229231

230232
self.content.hash_layout(state);
231233
}

0 commit comments

Comments
 (0)