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: Default ? i18n("Default device") : i18n("Make Default") | ||||
49 | icon.name: Default ? "favorite" : "" | ||||
48 | visible: delegate.ListView.view.count > 1 | 50 | visible: delegate.ListView.view.count > 1 | ||
49 | isDefault: Default | 51 | enabled: !Default | ||
50 | onCheckedChanged: { | 52 | onClicked: Default = true; | ||
51 | if (!checked) { | | |||
52 | // Cannot unset default device | | |||
53 | checked = isDefault; | | |||
54 | } else { | | |||
55 | Default = true; | | |||
56 | } | | |||
57 | } | | |||
58 | } | 53 | } | ||
59 | 54 | | |||
60 | MuteButton { | 55 | MuteButton { | ||
61 | muted: Muted | 56 | muted: Muted | ||
62 | onCheckedChanged: Muted = checked | 57 | onCheckedChanged: Muted = checked | ||
63 | } | 58 | } | ||
64 | } | 59 | } | ||
65 | 60 | | |||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |