-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSRadioButton.qml
More file actions
42 lines (31 loc) · 868 Bytes
/
SRadioButton.qml
File metadata and controls
42 lines (31 loc) · 868 Bytes
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
import QtQuick 2.15
import QtQuick.Controls 2.15
RadioButton {
id: control
leftPadding: 0
topPadding: 0
bottomPadding: 0
indicator: Rectangle {
implicitWidth: 16
implicitHeight: implicitWidth
x: control.leftPadding
y: parent.height / 2 - height / 2
radius: implicitWidth / 2
color: "#3c3c3c"
border.width: control.focus ? 1 : 0
border.color: "#007fd4"
Rectangle {
implicitWidth: 8
implicitHeight: implicitWidth
radius: implicitWidth / 2
anchors.centerIn: parent
visible: checked
color: "white"
}
}
contentItem: SText {
leftPadding: control.indicator.width + control.spacing + 2
text: control.text
}
HoverHandler { cursorShape: Qt.PointingHandCursor }
}