Skip to content

Conversation

ZENEGIX
Copy link

@ZENEGIX ZENEGIX commented Feb 5, 2025

Bug description:
When trying to center a LabelComponent, the text is centered incorrectly

XML reproducer:

<owo-ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <components>
        <flow-layout direction="vertical" id="body">
            <children>
                <label>
                    <text>Groups</text>
                    <vertical-text-alignment>center</vertical-text-alignment>
                    <horizontal-text-alignment>center</horizontal-text-alignment>

                    <sizing>
                        <horizontal method="fill">20</horizontal>
                        <vertical method="fill">20</vertical>
                    </sizing>
                </label>
            </children>

            <surface>
                <flat>#C0101010</flat>
            </surface>
        </flow-layout>
    </components>
</owo-ui>

Actual behavior:
image

Expected behavior:
image

Fix note:
Double inflate fix this behaviour like in TextAreaComponent. Maybe its not optimal way to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant