-
Notifications
You must be signed in to change notification settings - Fork 1
/
MyRadioButton.qml
46 lines (35 loc) · 1.25 KB
/
MyRadioButton.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import QtQuick 2.9
import QtQuick.Controls 2.2
RadioButton {
//color: sysActivePalette.text
id: btn
font.family: (mscoreMajorVersion >= 4)? ui.theme.bodyFont.family : "segoe UI"
font.pointSize: 10
hoverEnabled: true
contentItem: Text {
text: btn.text
font: btn.font
opacity: btn.hovered ? 0.8:1
color: (mscoreMajorVersion >= 4)? ui.theme.fontPrimaryColor : "white"
verticalAlignment: Text.AlignVCenter
leftPadding:btn.indicator.width + btn.spacing
}
indicator: Rectangle {
implicitWidth: 18
implicitHeight: 18
//x: rotatePitchesBox.leftPadding
anchors.verticalCenter: parent.verticalCenter
radius: 9
color: (mscoreMajorVersion >= 4)? ui.theme.textFieldColor : "#242427"
border.color: "#c0c0c0"
Rectangle {
width: 10
height: 10
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
radius: 5
color: (mscoreMajorVersion >= 4)? ui.theme.accentColor : "#2093fe"
visible: btn.checked
}
}
}