2020-05-19 19:49:52 +00:00
|
|
|
import QtQuick 2.7
|
|
|
|
|
|
|
|
import QtQuick.Controls 2.13
|
2020-09-03 22:40:44 +00:00
|
|
|
import "theme"
|
|
|
|
import "fonts"
|
2020-12-15 01:16:49 +00:00
|
|
|
import "." as Opaque
|
2020-05-19 19:49:52 +00:00
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
id: control
|
|
|
|
|
2020-09-03 22:40:44 +00:00
|
|
|
property color textColor: Theme.mainTextColor
|
|
|
|
property color indicatorColor: Theme.boxCheckedColor
|
|
|
|
//property real size: 12
|
|
|
|
spacing: 0 //4 * gcd.themeScale
|
|
|
|
|
2020-05-19 19:49:52 +00:00
|
|
|
|
|
|
|
indicator: Rectangle {
|
|
|
|
width: 16 * gcd.themeScale
|
|
|
|
height: 16 * gcd.themeScale
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2020-09-03 22:40:44 +00:00
|
|
|
radius: 9 * gcd.themeScale
|
2020-05-19 19:49:52 +00:00
|
|
|
border.width: 1
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
|
|
|
visible: control.checked
|
2020-09-03 22:40:44 +00:00
|
|
|
color: indicatorColor
|
|
|
|
radius: 9 * gcd.themeScale
|
|
|
|
anchors.margins: 4 * gcd.themeScale
|
2020-05-19 19:49:52 +00:00
|
|
|
}
|
|
|
|
}
|
2020-09-03 22:40:44 +00:00
|
|
|
|
2020-12-15 01:16:49 +00:00
|
|
|
contentItem: Opaque.Label {
|
|
|
|
size: Theme.textMediumPt
|
2020-09-03 22:40:44 +00:00
|
|
|
color: textColor
|
|
|
|
text: control.text
|
2020-12-15 01:16:49 +00:00
|
|
|
bold: true
|
2020-09-03 22:40:44 +00:00
|
|
|
leftPadding: control.indicator.width + control.spacing
|
|
|
|
}
|
|
|
|
|
2020-05-19 19:49:52 +00:00
|
|
|
}
|