Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/DeviceListItem.qml
Show All 38 Lines | 32 | RowLayout { | |||
---|---|---|---|---|---|
39 | 39 | | |||
40 | Label { | 40 | Label { | ||
41 | id: inputText | 41 | id: inputText | ||
42 | Layout.fillWidth: true | 42 | Layout.fillWidth: true | ||
43 | elide: Text.ElideRight | 43 | elide: Text.ElideRight | ||
44 | text: Description | 44 | text: Description | ||
45 | } | 45 | } | ||
46 | 46 | | |||
47 | DefaultDeviceButton { | 47 | Button { | ||
48 | text: i18n("Default device") | ||||
49 | icon.name: "favorite" | ||||
48 | visible: delegate.ListView.view.count > 1 | 50 | visible: delegate.ListView.view.count > 1 | ||
49 | isDefault: Default | 51 | checkable: true | ||
50 | onCheckedChanged: { | 52 | checked: Default | ||
51 | if (!checked) { | 53 | onClicked: Default = true; | ||
52 | // Cannot unset default device | | |||
53 | checked = isDefault; | | |||
54 | } else { | | |||
55 | Default = true; | | |||
56 | } | | |||
57 | } | | |||
58 | } | 54 | } | ||
59 | 55 | | |||
60 | MuteButton { | 56 | MuteButton { | ||
61 | muted: Muted | 57 | muted: Muted | ||
62 | onCheckedChanged: Muted = checked | 58 | onCheckedChanged: Muted = checked | ||
63 | } | 59 | } | ||
64 | } | 60 | } | ||
65 | 61 | | |||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |