From 136b429d7891918ed3a324fb1f4501679526476c Mon Sep 17 00:00:00 2001 From: Daan Steenbergen Date: Sun, 23 Feb 2025 22:13:38 +0100 Subject: [PATCH] fix: bool endianness in vertical/horizontal alignment attribute --- src/object_pool/object_attributes.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/object_pool/object_attributes.rs b/src/object_pool/object_attributes.rs index 3388473..d83fe84 100644 --- a/src/object_pool/object_attributes.rs +++ b/src/object_pool/object_attributes.rs @@ -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, }, } @@ -398,8 +398,8 @@ impl From 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], } } @@ -432,8 +432,8 @@ impl From 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], } }