Debian Codegraph @

au4/src/playback/qml/Audacity/Playback/components/ArrowButton.qml

raw
1 /*
2 * Audacity: A Digital Audio Editor
3 */
4 import QtQuick
5
6 import Muse.Ui
7 import Muse.UiComponents
8
9 FlatButton {
10 id: root
11
12 property bool isDown: true
13
14 property real topRightRadius: 3
15 property real bottomRightRadius: 3
16
17 icon: isDown ? IconCode.SMALL_ARROW_DOWN : IconCode.SMALL_ARROW_UP
18 iconColor: ui.theme.fontSecondaryColor
19
20 backgroundItem: RoundedRectangle {
21 id: background
22
23 topRightRadius: root.topRightRadius
24 bottomRightRadius: root.bottomRightRadius
25
26 color: ui.theme.backgroundQuarternaryColor
27
28 states: [
29 State {
30 name: "PRESSED"
31 when: root.mouseArea.pressed
32
33 PropertyChanges {
34 target: background
35 opacity: ui.theme.buttonOpacityHit
36 }
37 },
38
39 State {
40 name: "HOVERED"
41 when: root.mouseArea.containsMouse && !root.mouseArea.pressed
42
43 PropertyChanges {
44 target: background
45 opacity: ui.theme.buttonOpacityHover
46 }
47 }
48 ]
49 }
50 }