// Copyright (C) 2026 Danilo M. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. import QtQuick import "../.." // One mode: a label, a line saying what it does, and a switch. Item { id: row required property string mode required property string label required property string description required property bool value implicitHeight: Math.max(texts.implicitHeight, sw.implicitHeight) + 16 Column { id: texts anchors { left: parent.left right: sw.left; rightMargin: 12 verticalCenter: parent.verticalCenter } spacing: 2 Text { text: row.label font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2; bold: true } color: Theme.text } Text { width: parent.width wrapMode: Text.WordWrap text: row.description font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } color: Theme.subtext } } Switch { id: sw anchors { right: parent.right; verticalCenter: parent.verticalCenter } checked: row.value onToggled: Status.toggleMode(row.mode) } }