import QtQuick 2.15
import QtQuick.Controls 2.15

Switch {
       id: control
       checked: true

       indicator: Rectangle {
           implicitWidth: 64
           implicitHeight: 32
           x: control.width - width - control.rightPadding
           y: parent.height / 2 - height / 2
           radius: 16
           color: control.checked ? "#0f0" : "#f00"
           border.color: "black"

           Rectangle {
               x: control.checked ? parent.width - width : 0
               width: 32
               height: 32
               radius: 16
               color: control.checked ? "#bfb" : "#fbb"
               border.color: "black"
           }
       }
   }
