-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathEffectChainPresetPopup.qml
More file actions
175 lines (162 loc) · 5.97 KB
/
Copy pathEffectChainPresetPopup.qml
File metadata and controls
175 lines (162 loc) · 5.97 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
pragma ComponentBehavior: Bound
import "." as Skin
import Mixxx 1.0 as Mixxx
import QtQuick
import QtQuick.Controls
Menu {
id: root
property color backgroundColor: "#151517"
property color borderColor: "#333333"
property url checkedSource
property color disabledTextColor: "#494949"
property string fontFamily: "Open Sans"
property int fontPixelSize: 14
property color hoverColor: "#2c454f"
property color hoverTextColor: "#ffffff"
property color separatorBottomColor: "#333333"
property color separatorTopColor: "#000000"
required property Mixxx.EffectSlotProxy slot1
required property Mixxx.EffectSlotProxy slot2
required property Mixxx.EffectSlotProxy slot3
property url submenuArrowSource
property color textColor: "#c2b3a5"
required property Mixxx.EffectUnitProxy unit
bottomPadding: 5
leftPadding: 5
rightPadding: 5
topPadding: 5
width: 160
background: Rectangle {
border.color: root.borderColor
border.width: 1
color: root.backgroundColor
radius: 1
}
delegate: Skin.EffectPresetMenuItem {
checkedSource: root.checkedSource
disabledTextColor: root.disabledTextColor
fontFamily: root.fontFamily
fontPixelSize: root.fontPixelSize
hoverColor: root.hoverColor
hoverTextColor: root.hoverTextColor
submenuArrowSource: root.submenuArrowSource
textColor: root.textColor
}
Instantiator {
model: Mixxx.EffectsManager.standardChainPresetModel
delegate: Skin.EffectPresetMenuItem {
required property int index
required property string name
required property string presetDisplay
required property string tooltip
ToolTip.delay: 500
ToolTip.text: tooltip
ToolTip.visible: hovered && tooltip.length > 0
checkedSource: root.checkedSource
disabledTextColor: root.disabledTextColor
fontFamily: root.fontFamily
fontPixelSize: root.fontPixelSize
hoverColor: root.hoverColor
hoverTextColor: root.hoverTextColor
submenuArrowSource: root.submenuArrowSource
text: (root.unit.presetName === name ? "✓ " : "") + presetDisplay
textColor: root.textColor
onTriggered: root.unit.loadPreset(index)
}
onObjectAdded: (index, object) => root.insertItem(index, object)
onObjectRemoved: (index, object) => root.removeItem(object)
}
Skin.EffectPresetMenuSeparator {
bottomColor: root.separatorBottomColor
topColor: root.separatorTopColor
}
Skin.EffectPresetMenuItem {
checkedSource: root.checkedSource
disabledTextColor: root.disabledTextColor
enabled: root.unit.canUpdatePreset
fontFamily: root.fontFamily
fontPixelSize: root.fontPixelSize
hoverColor: root.hoverColor
hoverTextColor: root.hoverTextColor
submenuArrowSource: root.submenuArrowSource
text: qsTr("Update Preset")
textColor: root.textColor
visible: enabled
onTriggered: root.unit.updatePreset()
}
Skin.EffectPresetMenuItem {
checkedSource: root.checkedSource
disabledTextColor: root.disabledTextColor
enabled: root.unit.canRenamePreset
fontFamily: root.fontFamily
fontPixelSize: root.fontPixelSize
hoverColor: root.hoverColor
hoverTextColor: root.hoverTextColor
submenuArrowSource: root.submenuArrowSource
text: qsTr("Rename Preset")
textColor: root.textColor
visible: enabled
onTriggered: root.unit.renamePreset()
}
Skin.EffectPresetMenuItem {
checkedSource: root.checkedSource
disabledTextColor: root.disabledTextColor
fontFamily: root.fontFamily
fontPixelSize: root.fontPixelSize
hoverColor: root.hoverColor
hoverTextColor: root.hoverTextColor
submenuArrowSource: root.submenuArrowSource
text: qsTr("Save As New Preset...")
textColor: root.textColor
onTriggered: root.unit.savePresetAs()
}
Skin.EffectPresetMenuSeparator {
bottomColor: root.separatorBottomColor
topColor: root.separatorTopColor
}
Skin.EffectSlotPresetMenu {
backgroundColor: root.backgroundColor
borderColor: root.borderColor
checkedSource: root.checkedSource
disabledTextColor: root.disabledTextColor
fontFamily: root.fontFamily
fontPixelSize: root.fontPixelSize
hoverColor: root.hoverColor
hoverTextColor: root.hoverTextColor
separatorBottomColor: root.separatorBottomColor
separatorTopColor: root.separatorTopColor
slot: root.slot1
submenuArrowSource: root.submenuArrowSource
textColor: root.textColor
}
Skin.EffectSlotPresetMenu {
backgroundColor: root.backgroundColor
borderColor: root.borderColor
checkedSource: root.checkedSource
disabledTextColor: root.disabledTextColor
fontFamily: root.fontFamily
fontPixelSize: root.fontPixelSize
hoverColor: root.hoverColor
hoverTextColor: root.hoverTextColor
separatorBottomColor: root.separatorBottomColor
separatorTopColor: root.separatorTopColor
slot: root.slot2
submenuArrowSource: root.submenuArrowSource
textColor: root.textColor
}
Skin.EffectSlotPresetMenu {
backgroundColor: root.backgroundColor
borderColor: root.borderColor
checkedSource: root.checkedSource
disabledTextColor: root.disabledTextColor
fontFamily: root.fontFamily
fontPixelSize: root.fontPixelSize
hoverColor: root.hoverColor
hoverTextColor: root.hoverTextColor
separatorBottomColor: root.separatorBottomColor
separatorTopColor: root.separatorTopColor
slot: root.slot3
submenuArrowSource: root.submenuArrowSource
textColor: root.textColor
}
}