forked from zynthian/zynthian-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RadioIndicator.qml
46 lines (41 loc) · 1.12 KB
/
RadioIndicator.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
/*
SPDX-FileCopyrightText: 2016 Marco Martin <[email protected]>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick 2.6
import org.kde.plasma.core 2.0 as PlasmaCore
import "private" as Private
PlasmaCore.SvgItem {
property Item control
svg: PlasmaCore.Svg {
id: buttonSvg
imagePath: "widgets/actionbutton"
}
elementId: "normal"
opacity: control.enabled ? 1 : 0.6
implicitWidth: implicitHeight
implicitHeight: PlasmaCore.Units.iconSizes.small
PlasmaCore.SvgItem {
id: checkmark
svg: PlasmaCore.Svg {
id: checkmarkSvg
imagePath: "widgets/checkmarks"
}
elementId: "radiobutton"
opacity: control.checked ? 1 : 0
anchors {
fill: parent
}
Behavior on opacity {
NumberAnimation {
duration: PlasmaCore.Units.longDuration
easing.type: Easing.InOutQuad
}
}
}
Private.RoundShadow {
anchors.fill: parent
z: -1
state: control.activeFocus ? "focus" : (control.hovered ? "hover" : "shadow")
}
}