| Summary: | toolbarlayout is not layout compatible | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kirigami | Reporter: | Harald Sitter <sitter> |
| Component: | general | Assignee: | Marco Martin <notmart> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | ahiemstra, nate |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | Not decided | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Can confirm. I've run into this minor annoyance while implementing layouts with ActionToolBar in the past as well. `Layout` attached properties are inaccessible from C++ without some really awkward code, as the required type is a private class in QtQuick. So it is pretty much impossible to support those. That said, a custom attached property could be added for this, which I've started doing in other places. I just haven't had much of a reason to add it to ToolBarLayout so far. |
SUMMARY Most notably it doesn't honor individual alignment, causing much sadness because you can't have a toolbar where a number of buttons are left and the remainder right aligned. I may be doing it wrong though (: ``` Kirigami.ActionToolBar { alignment: Qt.AlignRight actions: [ Kirigami.Action { Layout.alignment : Qt.AlignLeft id: advancedAction checkable: true iconName: "code-context" text: i18nc("@action:button", "Show backtrace content (advanced)") }, Kirigami.Action { enabled: trace !== "" iconName: "go-next" text: i18nc("@action:button", "Next") onTriggered: pageStack.push("qrc:/ui/BugzillaPage.qml") } ] } } ``` As a workaround one can have a rowlayout with two bars aligning right and left respectively - It is awkward though because collapsing into a burger menu is then undefined behavior (as to which bar collapses)