Changeset View
Changeset View
Standalone View
Standalone View
applets/taskmanager/package/contents/ui/Task.qml
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 31 | MouseArea { | |||
---|---|---|---|---|---|
50 | property int childCount: model.ChildCount !== undefined ? model.ChildCount : 0 | 50 | property int childCount: model.ChildCount !== undefined ? model.ChildCount : 0 | ||
51 | property int previousChildCount: 0 | 51 | property int previousChildCount: 0 | ||
52 | property alias labelText: label.text | 52 | property alias labelText: label.text | ||
53 | property bool pressed: false | 53 | property bool pressed: false | ||
54 | property int pressX: -1 | 54 | property int pressX: -1 | ||
55 | property int pressY: -1 | 55 | property int pressY: -1 | ||
56 | property QtObject contextMenu: null | 56 | property QtObject contextMenu: null | ||
57 | property int wheelDelta: 0 | 57 | property int wheelDelta: 0 | ||
58 | readonly property bool smartLauncherEnabled: plasmoid.configuration.smartLaunchersEnabled && !inPopup && model.IsStartup !== true | 58 | readonly property bool smartLauncherEnabled: !inPopup && model.IsStartup !== true | ||
59 | property QtObject smartLauncherItem: null | 59 | property QtObject smartLauncherItem: null | ||
60 | property alias toolTipAreaItem: toolTipArea | 60 | property alias toolTipAreaItem: toolTipArea | ||
61 | 61 | | |||
62 | property Item audioStreamOverlay | 62 | property Item audioStreamOverlay | ||
63 | property var audioStreams: [] | 63 | property var audioStreams: [] | ||
64 | property bool delayAudioStreamIndicator: false | 64 | property bool delayAudioStreamIndicator: false | ||
65 | readonly property bool hasAudioStream: plasmoid.configuration.indicateAudioStreams && audioStreams.length > 0 | 65 | readonly property bool hasAudioStream: plasmoid.configuration.indicateAudioStreams && audioStreams.length > 0 | ||
66 | readonly property bool playingAudio: hasAudioStream && audioStreams.some(function (item) { | 66 | readonly property bool playingAudio: hasAudioStream && audioStreams.some(function (item) { | ||
▲ Show 20 Lines • Show All 309 Lines • ▼ Show 20 Line(s) | 339 | if (containsMouse) { | |||
376 | toolTipDelegate.isOnAllVirtualDesktopsParent = Qt.binding(function() { | 376 | toolTipDelegate.isOnAllVirtualDesktopsParent = Qt.binding(function() { | ||
377 | return model.IsOnAllVirtualDesktops === true; | 377 | return model.IsOnAllVirtualDesktops === true; | ||
378 | }); | 378 | }); | ||
379 | toolTipDelegate.activitiesParent = Qt.binding(function() { | 379 | toolTipDelegate.activitiesParent = Qt.binding(function() { | ||
380 | return model.Activities; | 380 | return model.Activities; | ||
381 | }); | 381 | }); | ||
382 | 382 | | |||
383 | toolTipDelegate.smartLauncherCountVisible = Qt.binding(function() { | 383 | toolTipDelegate.smartLauncherCountVisible = Qt.binding(function() { | ||
384 | return plasmoid.configuration.smartLaunchersEnabled && task.smartLauncherItem && task.smartLauncherItem.countVisible; | 384 | return task.smartLauncherItem && task.smartLauncherItem.countVisible; | ||
385 | }); | 385 | }); | ||
386 | toolTipDelegate.smartLauncherCount = Qt.binding(function() { | 386 | toolTipDelegate.smartLauncherCount = Qt.binding(function() { | ||
387 | return toolTipDelegate.smartLauncherCountVisible ? task.smartLauncherItem.count : 0; | 387 | return toolTipDelegate.smartLauncherCountVisible ? task.smartLauncherItem.count : 0; | ||
388 | }); | 388 | }); | ||
389 | } | 389 | } | ||
390 | } | 390 | } | ||
391 | } | 391 | } | ||
392 | } | 392 | } | ||
393 | 393 | | |||
394 | Loader { | 394 | Loader { | ||
395 | anchors.fill: frame | 395 | anchors.fill: frame | ||
396 | asynchronous: true | 396 | asynchronous: true | ||
397 | source: "TaskProgressOverlay.qml" | 397 | source: "TaskProgressOverlay.qml" | ||
398 | active: plasmoid.configuration.smartLaunchersEnabled && task.smartLauncherItem && task.smartLauncherItem.progressVisible | 398 | active: task.smartLauncherItem && task.smartLauncherItem.progressVisible | ||
399 | } | 399 | } | ||
400 | 400 | | |||
401 | Item { | 401 | Item { | ||
402 | id: iconBox | 402 | id: iconBox | ||
403 | 403 | | |||
404 | anchors { | 404 | anchors { | ||
405 | left: parent.left | 405 | left: parent.left | ||
406 | leftMargin: adjustMargin(true, parent.width, taskFrame.margins.left) | 406 | leftMargin: adjustMargin(true, parent.width, taskFrame.margins.left) | ||
Show All 36 Lines | |||||
443 | Loader { | 443 | Loader { | ||
444 | // QTBUG anchors.fill in conjunction with the Loader doesn't reliably work on creation: | 444 | // QTBUG anchors.fill in conjunction with the Loader doesn't reliably work on creation: | ||
445 | // have a window with a badge, move it from one screen to another, the new task item on the | 445 | // have a window with a badge, move it from one screen to another, the new task item on the | ||
446 | // other screen will now have a glitched out badge mask. | 446 | // other screen will now have a glitched out badge mask. | ||
447 | width: parent.width | 447 | width: parent.width | ||
448 | height: parent.height | 448 | height: parent.height | ||
449 | asynchronous: true | 449 | asynchronous: true | ||
450 | source: "TaskBadgeOverlay.qml" | 450 | source: "TaskBadgeOverlay.qml" | ||
451 | active: plasmoid.configuration.smartLaunchersEnabled && height >= units.iconSizes.small | 451 | active: height >= units.iconSizes.small | ||
452 | && task.smartLauncherItem && task.smartLauncherItem.countVisible | 452 | && task.smartLauncherItem && task.smartLauncherItem.countVisible | ||
453 | } | 453 | } | ||
454 | 454 | | |||
455 | states: [ | 455 | states: [ | ||
456 | // Using a state transition avoids a binding loop between label.visible and | 456 | // Using a state transition avoids a binding loop between label.visible and | ||
457 | // the text label margin, which derives from the icon width. | 457 | // the text label margin, which derives from the icon width. | ||
458 | State { | 458 | State { | ||
459 | name: "standalone" | 459 | name: "standalone" | ||
▲ Show 20 Lines • Show All 130 Lines • Show Last 20 Lines |