Changeset View
Changeset View
Standalone View
Standalone View
applets/taskmanager/package/contents/ui/TaskBadgeOverlay.qml
Show All 29 Lines | 27 | Item { | |||
---|---|---|---|---|---|
30 | 30 | | |||
31 | Rectangle { | 31 | Rectangle { | ||
32 | readonly property int offset: Math.round(Math.max(units.smallSpacing / 2, badgeMask.width / 32)) | 32 | readonly property int offset: Math.round(Math.max(units.smallSpacing / 2, badgeMask.width / 32)) | ||
33 | x: Qt.application.layoutDirection === Qt.RightToLeft ? -offset + iconWidthDelta : parent.width - width + offset - iconWidthDelta | 33 | x: Qt.application.layoutDirection === Qt.RightToLeft ? -offset + iconWidthDelta : parent.width - width + offset - iconWidthDelta | ||
34 | y: -offset | 34 | y: -offset | ||
35 | width: badgeRect.width + offset * 2 | 35 | width: badgeRect.width + offset * 2 | ||
36 | height: badgeRect.height + offset * 2 | 36 | height: badgeRect.height + offset * 2 | ||
37 | radius: badgeRect.radius + offset * 2 | 37 | radius: badgeRect.radius + offset * 2 | ||
38 | visible: badgeRect.visible | ||||
38 | 39 | | |||
39 | // Badge changes width based on number. | 40 | // Badge changes width based on number. | ||
40 | onWidthChanged: maskShaderSource.scheduleUpdate() | 41 | onWidthChanged: maskShaderSource.scheduleUpdate() | ||
41 | } | 42 | } | ||
42 | } | 43 | } | ||
43 | 44 | | |||
44 | ShaderEffectSource { | 45 | ShaderEffectSource { | ||
45 | id: iconShaderSource | 46 | id: iconShaderSource | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |