Skip to content

[TabWidget] configure title alignment & strange naming #9473

@smir-ant

Description

@smir-ant

Feature Description

TabWidget has only 1 property(current-index) and 1 config option (title). This is a huge limitation.
But i'm here cuz title is left-align by default , but i think that add
in property <TextHorizontalAlignment> title-alignment: left;
and it will be more customizable:

text := Text {
    vertical-alignment: center;
    horizontal-alignment: root.title-alignment;  // instead of horizontal-alignment: left;
}

it will be work with doc example

TabWidget {
        Tab {
            title: "First";
            Rectangle { background: orange; }
        }

but now we can have

TabWidget {
        Tab {
            title: "First";
            title-alignment: center;
            Rectangle { background: orange; }
        }

p.s. I think it would be nice to add the font size config too!!!

and why is it named as TabWidget? why not Tabs?

we don't have ButtonWidget - its a Button, we don't have LineEditWidget - only LineEdit, but TabWidget...

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:widgetsImplementation of widgets (from std-widgets.slint) and their styles (mF,bS)need triagingIssue that the owner of the area still need to triage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions