Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/StreamListItem.qml
Show All 19 Lines | |||||
20 | 20 | | |||
21 | import QtQuick 2.0 | 21 | import QtQuick 2.0 | ||
22 | 22 | | |||
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | 23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
24 | 24 | | |||
25 | import org.kde.plasma.private.volume 0.1 | 25 | import org.kde.plasma.private.volume 0.1 | ||
26 | 26 | | |||
27 | ListItemBase { | 27 | ListItemBase { | ||
28 | property bool onlyOne: false | 28 | label: Client ? Client.name : Name | ||
29 | | ||||
30 | label: { | | |||
31 | if (! Client) { | | |||
32 | return Name | | |||
33 | } else { | | |||
34 | if (onlyOne) { | | |||
35 | return Client.name | | |||
36 | } else { | | |||
37 | return i18nc("label of stream items", "%1 (%2)", Client.name, Name) | | |||
38 | } | | |||
39 | } | | |||
40 | } | | |||
41 | labelOpacity: onlyOne ? 1 : 0.6 | | |||
42 | icon: IconName | 29 | icon: IconName | ||
43 | iconUsesPlasmaTheme: false | 30 | iconUsesPlasmaTheme: false | ||
44 | } | 31 | } |