Changeset View
Changeset View
Standalone View
Standalone View
src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | 129 | anchors { | |||
---|---|---|---|---|---|
132 | bottom: parent.bottom | 132 | bottom: parent.bottom | ||
133 | bottomMargin: Kirigami.Units.smallSpacing | 133 | bottomMargin: Kirigami.Units.smallSpacing | ||
134 | } | 134 | } | ||
135 | width: actionsRow.width | 135 | width: actionsRow.width | ||
136 | height: actionsRow.height | 136 | height: actionsRow.height | ||
137 | 137 | | |||
138 | RowLayout { | 138 | RowLayout { | ||
139 | id: actionsRow | 139 | id: actionsRow | ||
140 | readonly property int modelIndex: model.index | ||||
140 | 141 | | |||
141 | Repeater { | 142 | Repeater { | ||
142 | model: delegate.actions | 143 | model: delegate.actions | ||
143 | delegate: Controls.Button { | 144 | delegate: Controls.Button { | ||
144 | icon.name: modelData.iconName | 145 | icon.name: modelData.iconName | ||
145 | activeFocusOnTab: focus || delegate.focus | 146 | activeFocusOnTab: focus || delegate.focus | ||
146 | onClicked: { | 147 | onClicked: { | ||
147 | delegate.clicked() | 148 | delegate.GridView.view.currentIndex = actionsRow.modelIndex | ||
148 | modelData.trigger() | 149 | modelData.trigger() | ||
149 | } | 150 | } | ||
150 | enabled: modelData.enabled | 151 | enabled: modelData.enabled | ||
151 | visible: modelData.visible | 152 | visible: modelData.visible | ||
152 | //NOTE: there aren't any global settings where to take "official" tooltip timeouts | 153 | //NOTE: there aren't any global settings where to take "official" tooltip timeouts | ||
153 | Controls.ToolTip.delay: 1000 | 154 | Controls.ToolTip.delay: 1000 | ||
154 | Controls.ToolTip.timeout: 5000 | 155 | Controls.ToolTip.timeout: 5000 | ||
155 | Controls.ToolTip.visible: (Kirigami.Settings.isMobile ? pressed : hovered) && modelData.tooltip.length > 0 | 156 | Controls.ToolTip.visible: (Kirigami.Settings.isMobile ? pressed : hovered) && modelData.tooltip.length > 0 | ||
Show All 34 Lines |