Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
Show All 39 Lines | 34 | status: { | |||
---|---|---|---|---|---|
40 | //just assume passive | 40 | //just assume passive | ||
41 | default: | 41 | default: | ||
42 | return PlasmaCore.Types.PassiveStatus; | 42 | return PlasmaCore.Types.PassiveStatus; | ||
43 | } | 43 | } | ||
44 | } | 44 | } | ||
45 | 45 | | |||
46 | iconItem: iconItem | 46 | iconItem: iconItem | ||
47 | 47 | | |||
48 | function isIconNotNull(icon) { | ||||
49 | return icon && !plasmoid.nativeInterface.isIconNull(icon); | ||||
50 | } | ||||
51 | | ||||
48 | PlasmaCore.IconItem { | 52 | PlasmaCore.IconItem { | ||
49 | id: iconItem | 53 | id: iconItem | ||
50 | source: { | 54 | source: { | ||
51 | if (taskIcon.status === PlasmaCore.Types.NeedsAttentionStatus) { | 55 | if (taskIcon.status === PlasmaCore.Types.NeedsAttentionStatus) { | ||
52 | if (AttentionIcon) { | 56 | if (isIconNotNull(AttentionIcon)) { | ||
53 | return AttentionIcon | 57 | return AttentionIcon | ||
54 | } | 58 | } | ||
55 | if (AttentionIconName) { | 59 | if (AttentionIconName) { | ||
56 | return AttentionIconName | 60 | return AttentionIconName | ||
57 | } | 61 | } | ||
58 | } | 62 | } | ||
59 | return Icon ? Icon : IconName | 63 | return isIconNotNull(Icon) ? Icon : IconName | ||
60 | } | 64 | } | ||
61 | 65 | | |||
62 | width: Math.min(parent.width, parent.height) | 66 | width: Math.min(parent.width, parent.height) | ||
63 | height: width | 67 | height: width | ||
64 | active: taskIcon.containsMouse | 68 | active: taskIcon.containsMouse | ||
65 | 69 | | |||
66 | anchors { | 70 | anchors { | ||
67 | left: parent.left | 71 | left: parent.left | ||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |