|
|
|
|
@ -31,7 +31,7 @@ Item {
|
|
|
|
|
property alias text: label.text
|
|
|
|
|
property bool checked: false
|
|
|
|
|
|
|
|
|
|
property var iconSize: 104
|
|
|
|
|
property var iconSize: 106
|
|
|
|
|
|
|
|
|
|
signal clicked
|
|
|
|
|
|
|
|
|
|
@ -43,12 +43,29 @@ Item {
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: mainLayout
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
spacing: FishUI.Units.smallSpacing
|
|
|
|
|
|
|
|
|
|
Image {
|
|
|
|
|
id: icon
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: _box
|
|
|
|
|
width: control.iconSize
|
|
|
|
|
height: width
|
|
|
|
|
color: "transparent"
|
|
|
|
|
border.width: 3
|
|
|
|
|
border.color: control.checked ? FishUI.Theme.highlightColor : "transparent"
|
|
|
|
|
|
|
|
|
|
Behavior on border.color {
|
|
|
|
|
ColorAnimation {
|
|
|
|
|
duration: 125
|
|
|
|
|
easing.type: Easing.InOutCubic
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
radius: FishUI.Theme.bigRadius + control.iconSpacing
|
|
|
|
|
visible: true
|
|
|
|
|
|
|
|
|
|
Image {
|
|
|
|
|
id: icon
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
anchors.margins: FishUI.Units.smallSpacing
|
|
|
|
|
sourceSize: Qt.size(icon.width, icon.height)
|
|
|
|
|
opacity: 1
|
|
|
|
|
|
|
|
|
|
@ -84,18 +101,14 @@ Item {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Label {
|
|
|
|
|
id: label
|
|
|
|
|
color: control.checked ? FishUI.Theme.highlightColor : FishUI.Theme.textColor
|
|
|
|
|
visible: label.text
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
|
checkable: false
|
|
|
|
|
checked: control.checked
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Behavior on scale {
|
|
|
|
|
|