Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml
Show First 20 Lines • Show All 137 Lines • ▼ Show 20 Line(s) | 130 | ListView { | |||
---|---|---|---|---|---|
138 | } | 138 | } | ||
139 | 139 | | |||
140 | delegate: Kirigami.AbstractListItem { | 140 | delegate: Kirigami.AbstractListItem { | ||
141 | id: propertyDelegate | 141 | id: propertyDelegate | ||
142 | highlighted: false | 142 | highlighted: false | ||
143 | width: ListView.view.width | 143 | width: ListView.view.width | ||
144 | 144 | | |||
145 | RowLayout { | 145 | RowLayout { | ||
146 | anchors.fill: parent | | |||
147 | | ||||
148 | Kirigami.Icon { | 146 | Kirigami.Icon { | ||
149 | source: model.icon | 147 | source: model.icon | ||
150 | Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium | 148 | Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium | ||
151 | Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium | 149 | Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium | ||
152 | Layout.leftMargin: Kirigami.Units.largeSpacing | | |||
153 | Layout.rightMargin: Kirigami.Units.largeSpacing | | |||
154 | Layout.alignment: Qt.AlignVCenter | 150 | Layout.alignment: Qt.AlignVCenter | ||
155 | } | 151 | } | ||
156 | QQC2.Label { | 152 | QQC2.Label { | ||
157 | id: itemNameLabel | 153 | id: itemNameLabel | ||
158 | text: model.name | 154 | text: model.name | ||
159 | horizontalAlignment: Qt.AlignLeft | 155 | horizontalAlignment: Qt.AlignLeft | ||
160 | Layout.preferredWidth: implicitWidth | 156 | Layout.preferredWidth: implicitWidth | ||
161 | Layout.fillWidth: true | 157 | Layout.fillWidth: true | ||
Show All 16 Lines | 172 | QQC2.ToolTip { | |||
178 | visible: hovered && suggestedLabel.truncated | 174 | visible: hovered && suggestedLabel.truncated | ||
179 | } | 175 | } | ||
180 | } | 176 | } | ||
181 | QQC2.ToolButton { | 177 | QQC2.ToolButton { | ||
182 | icon.name: (model.enabled) ? "dialog-ok-apply" : "list-add-symbolic" | 178 | icon.name: (model.enabled) ? "dialog-ok-apply" : "list-add-symbolic" | ||
183 | opacity: propertyDelegate.hovered ? 1 : 0 | 179 | opacity: propertyDelegate.hovered ? 1 : 0 | ||
184 | onClicked: propertyDelegate.clicked() | 180 | onClicked: propertyDelegate.clicked() | ||
185 | Layout.preferredWidth: implicitWidth | 181 | Layout.preferredWidth: implicitWidth | ||
182 | Layout.leftMargin: -Kirigami.Units.smallSpacing | ||||
183 | Layout.rightMargin: -Kirigami.Units.smallSpacing | ||||
186 | Layout.alignment: Qt.AlignVCenter | 184 | Layout.alignment: Qt.AlignVCenter | ||
187 | } | 185 | } | ||
188 | } | 186 | } | ||
189 | 187 | | |||
190 | onClicked: { | 188 | onClicked: { | ||
191 | model.enabled = true; | 189 | model.enabled = true; | ||
192 | if (model.suggested != null) { | 190 | if (model.suggested != null) { | ||
193 | model.value = model.suggested; | 191 | model.value = model.suggested; | ||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |