Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/contents/ui/config.qml
Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Line(s) | 278 | Kirigami.Action { | |||
---|---|---|---|---|---|
281 | onTriggered: imageWallpaper.removeSlidePath(modelData) | 281 | onTriggered: imageWallpaper.removeSlidePath(modelData) | ||
282 | }, | 282 | }, | ||
283 | Kirigami.Action { | 283 | Kirigami.Action { | ||
284 | icon.name: "document-open-folder" | 284 | icon.name: "document-open-folder" | ||
285 | tooltip: i18nd("plasma_wallpaper_org.kde.image", "Open Folder") | 285 | tooltip: i18nd("plasma_wallpaper_org.kde.image", "Open Folder") | ||
286 | onTriggered: imageWallpaper.openFolder(modelData) | 286 | onTriggered: imageWallpaper.openFolder(modelData) | ||
287 | } | 287 | } | ||
288 | ] | 288 | ] | ||
289 | QtControls2.Label { | 289 | ColumnLayout { | ||
290 | text: modelData.endsWith("/") ? modelData.split('/').reverse()[1] : modelData.split('/').pop() | 290 | | ||
291 | Layout.fillWidth: true | 291 | width: slidePathsView.width | ||
292 | | ||||
292 | QtControls2.ToolTip.text: modelData | 293 | QtControls2.ToolTip.text: modelData | ||
293 | QtControls2.ToolTip.visible: folderDelegate.hovered | 294 | QtControls2.ToolTip.visible: folderDelegate.hovered && subtitle.truncated | ||
294 | QtControls2.ToolTip.delay: 1000 | 295 | QtControls2.ToolTip.delay: 1000 | ||
295 | QtControls2.ToolTip.timeout: 5000 | 296 | QtControls2.ToolTip.timeout: 5000 | ||
297 | | ||||
298 | // Header: the folder | ||||
299 | QtControls2.Label { | ||||
300 | Layout.fillWidth: true | ||||
301 | elide: Text.ElideRight | ||||
302 | text: { | ||||
303 | var strippedPath = modelData.replace(/\/+$/, ""); | ||||
304 | return strippedPath.split('/').pop() | ||||
305 | } | ||||
306 | } | ||||
307 | // Subtitle: the path to the folder | ||||
308 | QtControls2.Label { | ||||
309 | id: subtitle | ||||
310 | Layout.fillWidth: true | ||||
311 | elide: Text.ElideRight | ||||
312 | text: { | ||||
313 | var strippedPath = modelData.replace(/\/+$/, ""); | ||||
314 | return strippedPath.replace(/\/[^\/]*$/, '');; | ||||
315 | } | ||||
316 | font.pointSize: theme.smallestFont.pointSize | ||||
317 | opacity: 0.6 | ||||
318 | } | ||||
296 | } | 319 | } | ||
297 | width: slidePathsView.width | | |||
298 | height: paintedHeight; | | |||
299 | } | 320 | } | ||
300 | 321 | | |||
301 | Kirigami.Heading { | 322 | Kirigami.Heading { | ||
302 | anchors.fill: parent | 323 | anchors.fill: parent | ||
303 | anchors.margins: Kirigami.Units.largeSpacing | 324 | anchors.margins: Kirigami.Units.largeSpacing | ||
304 | horizontalAlignment: Text.AlignHCenter | 325 | horizontalAlignment: Text.AlignHCenter | ||
305 | verticalAlignment: Text.AlignVCenter | 326 | verticalAlignment: Text.AlignVCenter | ||
306 | wrapMode: Text.WordWrap | 327 | wrapMode: Text.WordWrap | ||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |