Skip to content

Padding simply does not work #8829

@tresabhi

Description

@tresabhi

Bug Description

My goal is to creative a center aligned button with some padding using the following code:

export component AppWindow inherits Window {
    HorizontalLayout {
        alignment: center;
        VerticalLayout {
            alignment: center;
            Rectangle {
                background: #ab4aba;
                border-radius: 64px;
                padding: 16px;
                Text {
                    font-size: 16px;
                    text: "Button";
                }
            }
        }
    }
}

However, this is what I get:

This is what I expected:

Reproducible Code (if applicable)

Environment Details

  • Slint Version: 1.8.0
  • Platform/OS: Windows 11
  • Programming Language: Rust
  • Backend/Renderer: winit (I believe)

Product Impact

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    need triagingIssue that the owner of the area still need to triage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions