Changeset View
Changeset View
Standalone View
Standalone View
lib/qml/ResultDelegate.qml
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Line(s) | 144 | separatorVisible: resultDelegate.sectionHasChanged | |||
---|---|---|---|---|---|
146 | && (index === 0 || resultDelegate.ListView.view.currentIndex !== (index - 1)) | 146 | && (index === 0 || resultDelegate.ListView.view.currentIndex !== (index - 1)) | ||
147 | 147 | | |||
148 | Item { | 148 | Item { | ||
149 | anchors { | 149 | anchors { | ||
150 | left: parent.left | 150 | left: parent.left | ||
151 | right: parent.right | 151 | right: parent.right | ||
152 | leftMargin: Globals.CategoryWidth | 152 | leftMargin: Globals.CategoryWidth | ||
153 | } | 153 | } | ||
154 | height: typePixmap.height | 154 | height: Math.max(typePixmap.height, displayLabel.height, subtextLabel.height) | ||
155 | 155 | | |||
156 | RowLayout { | 156 | RowLayout { | ||
157 | anchors { | 157 | anchors { | ||
158 | left: parent.left | 158 | left: parent.left | ||
159 | right: actionsRow.left | 159 | right: actionsRow.left | ||
160 | rightMargin: units.smallSpacing | 160 | rightMargin: units.smallSpacing | ||
161 | } | 161 | } | ||
162 | 162 | | |||
163 | QtExtra.QIconItem { | 163 | QtExtra.QIconItem { | ||
164 | id: typePixmap | 164 | id: typePixmap | ||
165 | width: Globals.IconSize | 165 | width: Globals.IconSize | ||
166 | height: Globals.IconSize | 166 | height: Globals.IconSize | ||
167 | 167 | | |||
168 | icon: model.decoration | 168 | icon: model.decoration | ||
169 | smooth: true | 169 | smooth: true | ||
170 | } | 170 | } | ||
171 | 171 | | |||
172 | PlasmaComponents.Label { | 172 | PlasmaComponents.Label { | ||
173 | id: displayLabel | 173 | id: displayLabel | ||
174 | text: String(typeof modelData !== "undefined" ? modelData : model.display) | 174 | text: String(typeof modelData !== "undefined" ? modelData : model.display) | ||
175 | 175 | | |||
176 | height: typePixmap.height | 176 | height: undefined | ||
177 | 177 | | |||
178 | elide: Text.ElideMiddle | 178 | elide: Text.ElideMiddle | ||
179 | wrapMode: Text.NoWrap | 179 | wrapMode: Text.NoWrap | ||
180 | verticalAlignment: Text.AlignVCenter | ||||
180 | 181 | | |||
181 | Layout.maximumWidth: parent.width - displayLabel.x | 182 | Layout.maximumWidth: parent.width - displayLabel.x | ||
182 | } | 183 | } | ||
183 | 184 | | |||
184 | PlasmaComponents.Label { | 185 | PlasmaComponents.Label { | ||
185 | id: subtextLabel | 186 | id: subtextLabel | ||
186 | text: model.isDuplicate > 1 ? String(model.subtext) : "" | 187 | text: model.isDuplicate > 1 ? String(model.subtext) : "" | ||
187 | 188 | | |||
188 | color: theme.textColor | 189 | color: theme.textColor | ||
189 | opacity: 0.3 | 190 | opacity: 0.3 | ||
190 | 191 | | |||
191 | height: typePixmap.height | 192 | height: undefined | ||
192 | 193 | | |||
193 | elide: Text.ElideMiddle | 194 | elide: Text.ElideMiddle | ||
194 | wrapMode: Text.NoWrap | 195 | wrapMode: Text.NoWrap | ||
196 | verticalAlignment: Text.AlignVCenter | ||||
195 | Layout.fillWidth: true | 197 | Layout.fillWidth: true | ||
196 | } | 198 | } | ||
197 | } | 199 | } | ||
198 | 200 | | |||
199 | Row { | 201 | Row { | ||
200 | id: actionsRow | 202 | id: actionsRow | ||
201 | anchors.right: parent.right | 203 | anchors.right: parent.right | ||
202 | anchors.verticalCenter: parent.verticalCenter | 204 | anchors.verticalCenter: parent.verticalCenter | ||
Show All 31 Lines |