Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/SwitchButton.qml
| Show All 27 Lines | 25 | Item { | |||
|---|---|---|---|---|---|
| 28 | property alias icon: switchButtonIcon.source | 28 | property alias icon: switchButtonIcon.source | ||
| 29 | property alias checked: switchButtonCheckbox.checked | 29 | property alias checked: switchButtonCheckbox.checked | ||
| 30 | property alias enabled: switchButtonCheckbox.enabled | 30 | property alias enabled: switchButtonCheckbox.enabled | ||
| 31 | property alias tooltip: switchButtonCheckbox.tooltip | 31 | property alias tooltip: switchButtonCheckbox.tooltip | ||
| 32 | 32 | | |||
| 33 | signal clicked | 33 | signal clicked | ||
| 34 | 34 | | |||
| 35 | height: Math.max(switchButtonCheckbox.height, switchButtonIcon.height) | 35 | height: Math.max(switchButtonCheckbox.height, switchButtonIcon.height) | ||
| 36 | width: switchButtonCheckbox.width + switchButtonIcon.width + units.gridUnit | 36 | width: switchButtonCheckbox.width + switchButtonIcon.width + units.smallSpacing * 3 | ||
| 37 | 37 | | |||
| 38 | PlasmaComponents.CheckBox { | 38 | PlasmaComponents.CheckBox { | ||
| 39 | id: switchButtonCheckbox | 39 | id: switchButtonCheckbox | ||
| 40 | anchors { | 40 | anchors { | ||
| 41 | left: parent.left | 41 | left: parent.left | ||
| 42 | leftMargin: units.smallSpacing | 42 | leftMargin: units.smallSpacing | ||
| 43 | } | 43 | } | ||
| 44 | 44 | | |||
| Show All 17 Lines | |||||