Changeset View
Changeset View
Standalone View
Standalone View
src/controls/ToolBarApplicationHeader.qml
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 89 | anchors { | |||
---|---|---|---|---|---|
90 | verticalCenter: parent.verticalCenter | 90 | verticalCenter: parent.verticalCenter | ||
91 | right: ctxActionsButton.visible ? ctxActionsButton.left : parent.right | 91 | right: ctxActionsButton.visible ? ctxActionsButton.left : parent.right | ||
92 | } | 92 | } | ||
93 | 93 | | |||
94 | readonly property bool toobig: delegateItem.width - titleTextMetrics.width - Units.gridUnit < buttonTextMetrics.requiredWidth | 94 | readonly property bool toobig: delegateItem.width - titleTextMetrics.width - Units.gridUnit < buttonTextMetrics.requiredWidth | ||
95 | 95 | | |||
96 | PrivateActionToolButton { | 96 | PrivateActionToolButton { | ||
97 | Layout.alignment: Qt.AlignVCenter | 97 | Layout.alignment: Qt.AlignVCenter | ||
98 | kirigamiAction: page && page.actions ? page.actions.left : null | 98 | action: page && page.actions ? page.actions.left : null | ||
99 | showText: !parent.toobig | 99 | showText: !parent.toobig | ||
100 | } | 100 | } | ||
101 | PrivateActionToolButton { | 101 | PrivateActionToolButton { | ||
102 | Layout.alignment: Qt.AlignVCenter | 102 | Layout.alignment: Qt.AlignVCenter | ||
103 | Layout.rightMargin: Units.smallSpacing | 103 | Layout.rightMargin: Units.smallSpacing | ||
104 | kirigamiAction: page && page.actions ? page.actions.main : null | 104 | action: page && page.actions ? page.actions.main : null | ||
105 | showText: !parent.toobig | 105 | showText: !parent.toobig | ||
106 | flat: false | 106 | flat: false | ||
107 | } | 107 | } | ||
108 | PrivateActionToolButton { | 108 | PrivateActionToolButton { | ||
109 | Layout.alignment: Qt.AlignVCenter | 109 | Layout.alignment: Qt.AlignVCenter | ||
110 | kirigamiAction: page && page.actions ? page.actions.right : null | 110 | action: page && page.actions ? page.actions.right : null | ||
111 | showText: !parent.toobig | 111 | showText: !parent.toobig | ||
112 | } | 112 | } | ||
113 | } | 113 | } | ||
114 | 114 | | |||
115 | PrivateActionToolButton { | 115 | PrivateActionToolButton { | ||
116 | id: ctxActionsButton | 116 | id: ctxActionsButton | ||
117 | showMenuArrow: page.actions.contextualActions.length === 1 | 117 | showMenuArrow: page.actions.contextualActions.length === 1 | ||
118 | anchors { | 118 | anchors { | ||
119 | right: parent.right | 119 | right: parent.right | ||
120 | verticalCenter: parent.verticalCenter | 120 | verticalCenter: parent.verticalCenter | ||
121 | rightMargin: Units.smallSpacing | 121 | rightMargin: Units.smallSpacing | ||
122 | } | 122 | } | ||
123 | Action { | 123 | Action { | ||
124 | id: overflowAction | 124 | id: overflowAction | ||
125 | icon.name: "overflow-menu" | 125 | icon.name: "overflow-menu" | ||
126 | tooltip: qsTr("More Actions") | 126 | tooltip: qsTr("More Actions") | ||
127 | visible: children.length > 0 | 127 | visible: children.length > 0 | ||
128 | children: page && page.actions.contextualActions ? page.actions.contextualActions : null | 128 | children: page && page.actions.contextualActions ? page.actions.contextualActions : null | ||
129 | } | 129 | } | ||
130 | 130 | | |||
131 | kirigamiAction: page && page.actions.contextualActions.length === 1 ? page.actions.contextualActions[0] : overflowAction | 131 | action: page && page.actions.contextualActions.length === 1 ? page.actions.contextualActions[0] : overflowAction | ||
132 | } | 132 | } | ||
133 | } | 133 | } | ||
134 | } | 134 | } |