Changeset View
Changeset View
Standalone View
Standalone View
src/controls/ActionToolBar.qml
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | 117 | RowLayout { | |||
---|---|---|---|---|---|
118 | Layout.minimumWidth: 0 | 118 | Layout.minimumWidth: 0 | ||
119 | Layout.fillHeight: true | 119 | Layout.fillHeight: true | ||
120 | Repeater { | 120 | Repeater { | ||
121 | model: root.actions | 121 | model: root.actions | ||
122 | delegate: PrivateActionToolButton { | 122 | delegate: PrivateActionToolButton { | ||
123 | id: actionDelegate | 123 | id: actionDelegate | ||
124 | flat: root.flat | 124 | flat: root.flat | ||
125 | opacity: x + width <= parent.width | 125 | opacity: x + width <= parent.width | ||
126 | enabled: opacity | 126 | enabled: opacity && modelData.enabled | ||
apol: I'd do the enabled && opacity, it feels very wrong using a real number as a boolean >.<. | |||||
ahiemstra: Agreed. I made the opacity check more explicit. | |||||
127 | 127 | | |||
128 | display: root.display | 128 | display: root.display | ||
129 | visible: !modelData.hasOwnProperty("visible") || modelData.visible | 129 | visible: !modelData.hasOwnProperty("visible") || modelData.visible | ||
130 | Layout.fillWidth: false | 130 | Layout.fillWidth: false | ||
131 | Layout.alignment: Qt.AlignVCenter | 131 | Layout.alignment: Qt.AlignVCenter | ||
132 | Layout.minimumWidth: implicitWidth | 132 | Layout.minimumWidth: implicitWidth | ||
133 | kirigamiAction: modelData | 133 | kirigamiAction: modelData | ||
134 | onOpacityChanged: updateOverflowSet() | 134 | onOpacityChanged: updateOverflowSet() | ||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |
I'd do the enabled && opacity, it feels very wrong using a real number as a boolean >.<.