opaque/RadioButton.qml

39 lines
847 B
QML
Raw Normal View History

2020-05-19 19:49:52 +00:00
import QtQuick 2.7
import QtQuick.Controls 2.13
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
property color textColor: Theme.mainTextColor
property color indicatorColor: Theme.boxCheckedColor
2020-05-19 19:49:52 +00:00
indicator: Rectangle {
2020-12-17 16:10:21 +00:00
width: Theme.uiSliderSize
height: width
2020-05-19 19:49:52 +00:00
anchors.verticalCenter: parent.verticalCenter
2020-12-17 16:10:21 +00:00
radius: width / 2
2020-05-19 19:49:52 +00:00
border.width: 1
Rectangle {
anchors.fill: parent
visible: control.checked
color: indicatorColor
2020-12-17 16:10:21 +00:00
radius: width/2
anchors.margins: 2//thin line
2020-05-19 19:49:52 +00:00
}
}
2020-12-15 01:16:49 +00:00
contentItem: Opaque.Label {
size: Theme.textMediumPt
color: textColor
text: control.text
2020-12-15 01:16:49 +00:00
bold: true
leftPadding: control.indicator.width + control.spacing
}
2020-05-19 19:49:52 +00:00
}