Changeset View
Changeset View
Standalone View
Standalone View
applets/taskmanager/package/contents/ui/Task.qml
Show First 20 Lines • Show All 451 Lines • ▼ Show 20 Line(s) | 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" | ||
460 | when: !label.visible && !audioStreamIconLoader.shown | 460 | when: !label.visible | ||
461 | 461 | | |||
462 | AnchorChanges { | 462 | AnchorChanges { | ||
463 | target: iconBox | 463 | target: iconBox | ||
464 | anchors.left: undefined | 464 | anchors.left: undefined | ||
465 | anchors.horizontalCenter: parent.horizontalCenter | 465 | anchors.horizontalCenter: parent.horizontalCenter | ||
466 | } | 466 | } | ||
467 | 467 | | |||
468 | PropertyChanges { | 468 | PropertyChanges { | ||
Show All 20 Lines | |||||
489 | } | 489 | } | ||
490 | 490 | | |||
491 | Loader { | 491 | Loader { | ||
492 | id: audioStreamIconLoader | 492 | id: audioStreamIconLoader | ||
493 | 493 | | |||
494 | readonly property bool shown: item && item.visible | 494 | readonly property bool shown: item && item.visible | ||
495 | 495 | | |||
496 | source: "AudioStream.qml" | 496 | source: "AudioStream.qml" | ||
497 | width: units.roundToIconSize(Math.min(Math.min(iconBox.width, iconBox.height), units.iconSizes.smallMedium)) | 497 | width: Math.min(Math.min(iconBox.width, iconBox.height) * 0.45, units.iconSizes.smallMedium) | ||
498 | height: width | 498 | height: width | ||
499 | 499 | | |||
500 | anchors { | 500 | anchors { | ||
501 | right: parent.right | 501 | right: frame.right | ||
502 | rightMargin: iconBox.adjustMargin(true, parent.width, taskFrame.margins.right) | 502 | top: frame.top | ||
503 | verticalCenter: parent.verticalCenter | 503 | rightMargin: iconBox.adjustMargin(true, parent.width, taskFrame.margins.right) + units.smallSpacing / 2 | ||
504 | topMargin: iconBox.adjustMargin(true, parent.width, taskFrame.margins.top) + units.smallSpacing / 2 | ||||
504 | } | 505 | } | ||
505 | } | 506 | } | ||
506 | 507 | | |||
507 | PlasmaComponents.Label { | 508 | PlasmaComponents.Label { | ||
508 | id: label | 509 | id: label | ||
509 | 510 | | |||
510 | visible: (inPopup || !iconsOnly && model.IsLauncher !== true | 511 | visible: (inPopup || !iconsOnly && model.IsLauncher !== true | ||
511 | && (parent.width - iconBox.height - units.smallSpacing) >= (theme.mSize(theme.defaultFont).width * LayoutManager.minimumMColumns())) | 512 | && (parent.width - iconBox.height - units.smallSpacing) >= (theme.mSize(theme.defaultFont).width * LayoutManager.minimumMColumns())) | ||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |