import QtQuick 2.9 import QtQuick.Controls 2.3 SwitchDelegate { id: control text: qsTr("dark mode") contentItem: Text { text: parent.text color: appTheme.style.textColor font.pixelSize: options_stack.text_pixelSize } width: parent.width height: parent.delegateHeight font.pixelSize: options_stack.text_pixelSize indicator: SimpleIndicator{} background: Rectangle { opacity: enabled ? 1 : 0.3 color: control.down ? appTheme.style.delegatePressedColor : appTheme.style.delegateBackgroundColor radius: height * 0.3 Behavior on color { ColorAnimation { duration: 200 } } } }