Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/DeviceListItem.qml
Show All 21 Lines | |||||
22 | 22 | | |||
23 | import "../code/icon.js" as Icon | 23 | import "../code/icon.js" as Icon | ||
24 | 24 | | |||
25 | ListItemBase { | 25 | ListItemBase { | ||
26 | readonly property var currentPort: Ports[ActivePortIndex] | 26 | readonly property var currentPort: Ports[ActivePortIndex] | ||
27 | property bool onlyOne: false | 27 | property bool onlyOne: false | ||
28 | 28 | | |||
29 | draggable: false | 29 | draggable: false | ||
30 | label: { | 30 | label: currentPort ? currentPort.description : Description | ||
31 | if (!currentPort) { | | |||
32 | return Description | | |||
33 | } else { | | |||
34 | if (onlyOne) { | | |||
35 | return currentPort.description | | |||
36 | } else { | | |||
37 | return i18nc("label of device items", "%1 (%2)", currentPort.description, Description) | | |||
38 | } | | |||
39 | } | | |||
40 | } | | |||
41 | labelOpacity: onlyOne ? 1 : 0.6 | | |||
42 | icon: Icon.formFactorIcon(FormFactor) || IconName | 31 | icon: Icon.formFactorIcon(FormFactor) || IconName | ||
43 | } | 32 | } | ||
gvgeo: if (description) |
if (description)