Skip to content

Commit

Permalink
fix: bool endianness in vertical/horizontal alignment attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
GwnDaan committed Feb 23, 2025
1 parent 9080c00 commit 136b429
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/object_pool/object_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ impl From<[bool; 2]> for HorizontalAlignment {
true => HorizontalAlignment::Middle,
},
true => match value[1] {
false => HorizontalAlignment::Middle,
false => HorizontalAlignment::Right,
true => HorizontalAlignment::Reserved,
},
}
Expand All @@ -398,8 +398,8 @@ impl From<HorizontalAlignment> for [bool; 2] {
fn from(value: HorizontalAlignment) -> Self {
match value {
HorizontalAlignment::Left => [false, false],
HorizontalAlignment::Middle => [false, true],
HorizontalAlignment::Right => [true, false],
HorizontalAlignment::Middle => [true, false],
HorizontalAlignment::Right => [false, true],
HorizontalAlignment::Reserved => [true, true],
}
}
Expand Down Expand Up @@ -432,8 +432,8 @@ impl From<VerticalAlignment> for [bool; 2] {
fn from(value: VerticalAlignment) -> Self {
match value {
VerticalAlignment::Top => [false, false],
VerticalAlignment::Middle => [false, true],
VerticalAlignment::Bottom => [true, false],
VerticalAlignment::Middle => [true, false],
VerticalAlignment::Bottom => [false, true],
VerticalAlignment::Reserved => [true, true],
}
}
Expand Down

0 comments on commit 136b429

Please sign in to comment.