Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderViewLayer.qml
Show First 20 Lines • Show All 265 Lines • ▼ Show 20 Line(s) | 264 | PlasmaComponents.Label { | |||
---|---|---|---|---|---|
266 | 266 | | |||
267 | width: parent.width - (windowPin != null ? windowPin.width - units.smallSpacing : 0) | 267 | width: parent.width - (windowPin != null ? windowPin.width - units.smallSpacing : 0) | ||
268 | height: parent.height | 268 | height: parent.height | ||
269 | 269 | | |||
270 | horizontalAlignment: Text.AlignHCenter | 270 | horizontalAlignment: Text.AlignHCenter | ||
271 | verticalAlignment: Text.AlignTop | 271 | verticalAlignment: Text.AlignTop | ||
272 | elide: Text.ElideMiddle | 272 | elide: Text.ElideMiddle | ||
273 | text: labelGenerator.displayLabel | 273 | text: labelGenerator.displayLabel | ||
274 | font.underline: labelMouseArea.containsMouse | ||||
274 | 275 | | |||
275 | Binding { | 276 | Binding { | ||
276 | target: plasmoid | 277 | target: plasmoid | ||
277 | property: "title" | 278 | property: "title" | ||
278 | value: labelGenerator.displayLabel | 279 | value: labelGenerator.displayLabel | ||
279 | } | 280 | } | ||
280 | 281 | | |||
281 | Folder.LabelGenerator { | 282 | Folder.LabelGenerator { | ||
282 | id: labelGenerator | 283 | id: labelGenerator | ||
283 | 284 | | |||
284 | url: folderView.model.resolvedUrl | 285 | url: folderView.model.resolvedUrl | ||
285 | rtl: (Qt.application.layoutDirection == Qt.RightToLeft) | 286 | rtl: (Qt.application.layoutDirection == Qt.RightToLeft) | ||
286 | labelMode: plasmoid.configuration.labelMode | 287 | labelMode: plasmoid.configuration.labelMode | ||
287 | labelText: plasmoid.configuration.labelText | 288 | labelText: plasmoid.configuration.labelText | ||
288 | } | 289 | } | ||
289 | } | 290 | } | ||
290 | 291 | | |||
291 | MouseArea { | 292 | MouseArea { | ||
292 | anchors.fill: text | 293 | id: labelMouseArea | ||
294 | anchors { | ||||
295 | top: text.top | ||||
296 | horizontalCenter: text.horizontalCenter | ||||
297 | } | ||||
298 | width: text.contentWidth | ||||
299 | height: text.contentHeight | ||||
300 | hoverEnabled: true | ||||
301 | cursorShape: Qt.PointingHandCursor | ||||
293 | 302 | | |||
294 | onClicked: { | 303 | onClicked: { | ||
295 | var action = plasmoid.action("run associated application"); | 304 | var action = plasmoid.action("run associated application"); | ||
296 | 305 | | |||
297 | if (action) { | 306 | if (action) { | ||
298 | action.trigger(); | 307 | action.trigger(); | ||
299 | } | 308 | } | ||
300 | } | 309 | } | ||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |