import QtQuick import QtQuick.Layouts import "../theme" // Small Control Center tile: round toggle, title and state; the whole tile toggles. ControlCard { id: root property string glyph property string fallback property string detail property bool checked: false signal clicked padding: 10 heading: false opacity: enabled ? 1 : 0.55 color: area.containsMouse && enabled ? Theme.hover : Theme.fill Accessible.role: Accessible.CheckBox Accessible.name: title Accessible.checked: checked MouseArea { id: area parent: root z: -1 anchors.fill: parent hoverEnabled: true cursorShape: Qt.PointingHandCursor onClicked: root.clicked() } RowLayout { Layout.fillWidth: true spacing: 10 CCToggle { glyph: root.glyph fallback: root.fallback checked: root.checked enabled: root.enabled onClicked: root.clicked() } ColumnLayout { Layout.fillWidth: true spacing: 0 Text { text: root.title color: Theme.text font.pixelSize: 12 font.weight: Font.DemiBold elide: Text.ElideRight Layout.fillWidth: true } Text { text: root.detail visible: text !== "" color: Theme.textSecondary font.pixelSize: 11 elide: Text.ElideRight Layout.fillWidth: true } } } }