summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBe <be@mixxx.org>2019-11-20 20:57:15 -0600
committerGitHub <noreply@github.com>2019-11-20 20:57:15 -0600
commit35da91b786eb7979d4cacf1c7e650978c33ea499 (patch)
tree8141114976665c20f477577c462d70dc8f4d5f93
parent7b1f4d106b14b5be9bee1a2e3d192c07a5ec5055 (diff)
parent7c699b7b69cfb661d51018ebdfeb7720e52bd506 (diff)
Merge pull request #2353 from daschuer/lp1850644
Lp1850644: Restore slider nature of WOverview
-rw-r--r--build/depends.py5
-rw-r--r--res/controllers/Roland_DJ-505-scripts.js12
-rw-r--r--res/controllers/midi-components-0.0.js16
-rw-r--r--res/schema.xml27
-rw-r--r--res/skins/Deere/hotcue_button.xml4
-rw-r--r--res/skins/Deere/style.qss123
-rw-r--r--res/skins/LateNight/button_hotcue.xml4
-rw-r--r--res/skins/LateNight/style.qss44
-rw-r--r--res/skins/Shade/btn/btn_hotcue_1.pngbin386 -> 3173 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_1_down.pngbin385 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_1_over.pngbin589 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_1_overdown.pngbin588 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_2.pngbin392 -> 3711 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_2_down.pngbin392 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_2_over.pngbin3436 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_2_overdown.pngbin2265 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_3.pngbin397 -> 3582 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_3_down.pngbin397 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_3_over.pngbin3242 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_3_overdown.pngbin2271 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_4.pngbin389 -> 3504 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_4_down.pngbin388 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_4_over.pngbin3085 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_4_overdown.pngbin2160 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_5.pngbin201 -> 3723 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_5_down.pngbin201 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_5_over.pngbin201 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_5_overdown.pngbin201 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_6.pngbin202 -> 3593 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_6_down.pngbin202 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_6_over.pngbin202 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_6_overdown.pngbin202 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_7.pngbin203 -> 3473 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_7_down.pngbin202 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_7_over.pngbin202 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_7_overdown.pngbin202 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_8.pngbin196 -> 3581 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_8_down.pngbin195 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_8_over.pngbin597 -> 0 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_8_overdown.pngbin596 -> 0 bytes
-rw-r--r--res/skins/Shade/deck_hotcue_button.xml10
-rw-r--r--res/skins/Shade/style.qss45
-rw-r--r--res/skins/Shade/style_dark.qss5
-rw-r--r--res/skins/Shade/style_summer_sunset.qss5
-rw-r--r--res/skins/Tango/button_hotcue_deck.xml4
-rw-r--r--res/skins/Tango/style.qss58
-rw-r--r--src/controllers/bulk/bulkcontroller.cpp14
-rw-r--r--src/controllers/bulk/bulkcontroller.h6
-rw-r--r--src/controllers/bulk/bulkenumerator.cpp8
-rw-r--r--src/controllers/bulk/bulkenumerator.h3
-rw-r--r--src/controllers/colorjsproxy.cpp50
-rw-r--r--src/controllers/colorjsproxy.h22
-rw-r--r--src/controllers/controller.cpp9
-rw-r--r--src/controllers/controller.h4
-rw-r--r--src/controllers/controllerengine.cpp7
-rw-r--r--src/controllers/controllerengine.h3
-rw-r--r--src/controllers/controllermanager.cpp6
-rw-r--r--src/controllers/hid/hidcontroller.cpp5
-rw-r--r--src/controllers/hid/hidcontroller.h3
-rw-r--r--src/controllers/hid/hidenumerator.cpp5
-rw-r--r--src/controllers/hid/hidenumerator.h3
-rw-r--r--src/controllers/midi/midicontroller.cpp4
-rw-r--r--src/controllers/midi/midicontroller.h2
-rw-r--r--src/controllers/midi/portmidicontroller.cpp11
-rw-r--r--src/controllers/midi/portmidicontroller.h7
-rw-r--r--src/controllers/midi/portmidienumerator.cpp12
-rw-r--r--src/controllers/midi/portmidienumerator.h3
-rw-r--r--src/database/mixxxdb.cpp2
-rw-r--r--src/engine/controls/cuecontrol.cpp73
-rw-r--r--src/engine/controls/cuecontrol.h12
-rw-r--r--src/library/dao/cuedao.cpp19
-rw-r--r--src/library/dlgtrackinfo.cpp240
-rw-r--r--src/library/dlgtrackinfo.h8
-rw-r--r--src/library/dlgtrackinfo.ui102
-rw-r--r--src/preferences/configobject.cpp37
-rw-r--r--src/preferences/configobject.h2
-rw-r--r--src/preferences/hotcuecolorpalettesettings.cpp36
-rw-r--r--src/preferences/hotcuecolorpalettesettings.h26
-rw-r--r--src/skin/skincontext.h15
-rw-r--r--src/test/colorconfig_test.cpp79
-rw-r--r--src/test/controller_preset_validation_test.cpp9
-rw-r--r--src/test/controllerengine_test.cpp45
-rw-r--r--src/test/midicontrollertest.cpp5
-rw-r--r--src/test/portmidicontroller_test.cpp19
-rw-r--r--src/track/cue.cpp16
-rw-r--r--src/track/cue.h17
-rw-r--r--src/util/color/color.cpp2
-rw-r--r--src/util/color/color.h4
-rw-r--r--src/util/color/colorpalette.cpp18
-rw-r--r--src/util/color/colorpalette.h21
-rw-r--r--src/util/color/predefinedcolor.cpp10
-rw-r--r--src/util/color/predefinedcolor.h35
-rw-r--r--src/util/color/predefinedcolorsrepresentation.h41
-rw-r--r--src/util/color/predefinedcolorsset.h120
-rw-r--r--src/waveform/renderers/waveformrendermark.cpp7
-rw-r--r--src/waveform/renderers/waveformrendermark.h2
-rw-r--r--src/widget/colormenu.cpp81
-rw-r--r--src/widget/colormenu.h20
-rw-r--r--src/widget/cuemenu.cpp10
-rw-r--r--src/widget/cuemenu.h7
-rw-r--r--src/widget/woverview.cpp138
-rw-r--r--src/widget/woverview.h19
-rw-r--r--src/widget/wtracktableview.cpp2
-rw-r--r--src/widget/wwidget.cpp28
-rw-r--r--src/widget/wwidget.h19
105 files changed, 777 insertions, 1118 deletions
diff --git a/build/depends.py b/build/depends.py
index 5298cf87b7..41c3a605a4 100644
--- a/build/depends.py
+++ b/build/depends.py
@@ -781,6 +781,7 @@ class MixxxCore(Feature):
"src/preferences/effectsettingsmodel.cpp",
"src/preferences/broadcastprofile.cpp",
"src/preferences/upgrade.cpp",
+ "src/preferences/hotcuecolorpalettesettings.cpp",
"src/preferences/dlgpreferencepage.cpp",
"src/effects/effectmanifest.cpp",
@@ -1259,6 +1260,7 @@ class MixxxCore(Feature):
"src/util/movinginterquartilemean.cpp",
"src/util/console.cpp",
"src/util/color/color.cpp",
+ "src/util/color/colorpalette.cpp",
"src/util/db/dbconnection.cpp",
"src/util/db/dbconnectionpool.cpp",
"src/util/db/dbconnectionpooler.cpp",
@@ -1285,8 +1287,7 @@ class MixxxCore(Feature):
"src/util/desktophelper.cpp",
"src/util/widgetrendertimer.cpp",
"src/util/workerthread.cpp",
- "src/util/workerthreadscheduler.cpp",
- "src/util/color/predefinedcolor.cpp"
+ "src/util/workerthreadscheduler.cpp"
]
proto_args = {
diff --git a/res/controllers/Roland_DJ-505-scripts.js b/res/controllers/Roland_DJ-505-scripts.js
index e2600dacba..2e2777c0e8 100644
--- a/res/controllers/Roland_DJ-505-scripts.js
+++ b/res/controllers/Roland_DJ-505-scripts.js
@@ -1499,7 +1499,7 @@ DJ505.PitchPlayMode = function (deck, offset) {
this.number = n + 1;
this.on = this.color + DJ505.PadColor.DIM_MODIFIER;
this.colors = pitchplayColors;
- this.colorIdKey = 'hotcue_' + this.number + '_color_id';
+ this.colorKey = 'hotcue_' + this.number + '_color';
components.Button.call(this);
};
this.PerformancePad.prototype = new components.Button({
@@ -1561,8 +1561,8 @@ DJ505.PitchPlayMode = function (deck, offset) {
this.outKey = "hotcue_" + this.number + "_enabled";
this.output = function (value, group, control) {
var outval = this.outValueScale(value);
- if (this.colorIdKey !== undefined && outval !== this.off) {
- this.outputColor(engine.getValue(this.group, this.colorIdKey));
+ if (this.colorKey !== undefined && outval !== this.off) {
+ this.outputColor(engine.getValue(this.group, this.colorKey));
} else {
this.send(DJ505.PadColor.OFF);
}
@@ -1572,13 +1572,13 @@ DJ505.PitchPlayMode = function (deck, offset) {
var previous_cuepoint = this.mode.cuepoint;
this.mode.cuepoint = this.number;
this.mode.pads[previous_cuepoint - 1].trigger();
- this.outputColor(engine.getValue(this.group, this.colorIdKey));
+ this.outputColor(engine.getValue(this.group, this.colorKey));
}
};
this.connect = function() {
components.Button.prototype.connect.call(this); // call parent connect
- if (undefined !== this.group && this.colorIdKey !== undefined) {
- this.connections[1] = engine.makeConnection(this.group, this.colorIdKey, function (id) {
+ if (undefined !== this.group && this.colorKey !== undefined) {
+ this.connections[1] = engine.makeConnection(this.group, this.colorKey, function (id) {
if (engine.getValue(this.group, this.outKey)) {
this.outputColor(id);
}
diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js
index 7bb5c00957..1893768c2a 100644
--- a/res/controllers/midi-components-0.0.js
+++ b/res/controllers/midi-components-0.0.js
@@ -295,9 +295,9 @@
return;
}
if (options.colors !== undefined || options.sendRGB !== undefined) {
- this.colorIdKey = 'hotcue_' + options.number + '_color_id';
+ this.colorKey = 'hotcue_' + options.number + '_color';
if (options.colors === undefined) {
- options.colors = color.predefinedColorsList();
+ options.colors = color.hotcueColorPalette();
}
}
this.number = options.number;
@@ -312,8 +312,8 @@
this.inKey = 'hotcue_' + this.number + '_clear';
},
getColor: function() {
- if (this.colorIdKey !== undefined) {
- return color.predefinedColorFromId(engine.getValue(this.group,this.colorIdKey));
+ if (this.colorKey !== undefined) {
+ return color.colorFromHexCode(engine.getValue(this.group,this.colorKey));
} else {
return null;
}
@@ -324,8 +324,8 @@
// and there is no hotcueColor for turning the LED
// off. So the `send()` function is responsible for turning the
// actual LED off.
- if (this.colorIdKey !== undefined && outval !== this.off) {
- this.outputColor(engine.getValue(this.group, this.colorIdKey));
+ if (this.colorKey !== undefined && outval !== this.off) {
+ this.outputColor(engine.getValue(this.group, this.colorKey));
} else {
this.send(outval);
}
@@ -348,8 +348,8 @@
},
connect: function() {
Button.prototype.connect.call(this); // call parent connect
- if (undefined !== this.group && this.colorIdKey !== undefined) {
- this.connections[1] = engine.makeConnection(this.group, this.colorIdKey, function (id) {
+ if (undefined !== this.group && this.colorKey !== undefined) {
+ this.connections[1] = engine.makeConnection(this.group, this.colorKey, function (id) {
if (engine.getValue(this.group,this.outKey)) {
this.outputColor(id);
}
diff --git a/res/schema.xml b/res/schema.xml
index d5babba85a..4940729fe1 100644
--- a/res/schema.xml
+++ b/res/schema.xml
@@ -480,5 +480,30 @@ METADATA
position INTEGER
);
</sql>
- </revision>
+ </revision>
+ <revision version="31" min_compatible="3">
+ <description>
+ Convert the PredefinedColor id to the actual RGBA value.
+ </description>
+ <sql>
+ <!-- No Color becomes black-->
+ UPDATE cues SET color=4278190080 WHERE color=0;
+ <!-- Red -->
+ UPDATE cues SET color=4291103240 WHERE color=1;
+ <!-- Green -->
+ UPDATE cues SET color=4281515588 WHERE color=2;
+ <!-- Blue -->
+ UPDATE cues SET color=4278207743 WHERE color=3;
+ <!-- Yellow -->
+ UPDATE cues SET color=4294496768 WHERE color=4;
+ <!-- Celeste -->
+ UPDATE cues SET color=4282569972 WHERE color=5;
+ <!-- Magenta -->
+ UPDATE cues SET color=4289659084 WHERE color=6;
+ <!-- Pink -->
+ UPDATE cues SET color=4294747863 WHERE color=7;
+ <!-- White -->
+ UPDATE cues SET color=4294111999 WHERE color=8;
+ </sql>
+ </revision>
</schema>
diff --git a/res/skins/Deere/hotcue_button.xml b/res/skins/Deere/hotcue_button.xml
index f5e4777622..19ba4bb08b 100644
--- a/res/skins/Deere/hotcue_button.xml
+++ b/res/skins/Deere/hotcue_button.xml
@@ -46,8 +46,8 @@
<ConnectValueFromWidget>false</ConnectValueFromWidget>
</Connection>
<Connection>
- <ConfigKey><Variable name="group"/>,hotcue_<Variable name="hotcue"/>_color_id</ConfigKey>
- <BindProperty>highlight</BindProperty>
+ <ConfigKey><Variable name="group"/>,hotcue_<Variable name="hotcue"/>_color</ConfigKey>
+ <BindProperty>backgroundColorRgba</BindProperty>
</Connection>
</PushButton>
</Template>
diff --git a/res/skins/Deere/style.qss b/res/skins/Deere/style.qss
index c89a5eca6b..944870dd38 100644
--- a/res/skins/Deere/style.qss
+++ b/res/skins/Deere/style.qss
@@ -1583,7 +1583,6 @@ WPushButton:hover {
/*"Pressed" state*/
WPushButton[value="1"],
WPushButton[value="2"] {
- /*color: #FDFDFD;*/
color: #FDFDFD;
background-color: #006596;
border: 0px solid #006596;
@@ -1596,129 +1595,17 @@ WPushButton[value="2"]:hover {
border: 0px solid #0080BE;
}
-/* Hotcue Color: No Color */
-#HotcueButton[value="1"][highlight="0"],
-#HotcueButton[value="2"][highlight="0"] {
- background-color: #006596;
-}
-
-#HotcueButton[value="1"][highlight="0"]:hover,
-#HotcueButton[value="2"][highlight="0"]:hover {
- background-color: #0080BE;
-}
-
-/* Hotcue Color: Red */
-#HotcueButton[value="1"][highlight="1"],
-#HotcueButton[value="2"][highlight="1"] {
- background-color: #c50a08;
-}
-
-#HotcueButton[value="1"][highlight="1"]:hover,
-#HotcueButton[value="2"][highlight="1"]:hover {
- background-color: #e50c08;
-}
-
-/* Hotcue Color: Green */
-#HotcueButton[value="1"][highlight="2"],
-#HotcueButton[value="2"][highlight="2"] {
- background-color: #32be44;
-}
-
-#HotcueButton[value="1"][highlight="2"]:hover,
-#HotcueButton[value="2"][highlight="2"]:hover {
- background-color: #52de64;
-}
-
-/* Hotcue Color: Blue */
-#HotcueButton[value="1"][highlight="3"],
-#HotcueButton[value="2"][highlight="3"] {
- background-color: #0044ff;
-}
-
-#HotcueButton[value="1"][highlight="3"]:hover,
-#HotcueButton[value="2"][highlight="3"]:hover {
- background-color: #0064ff;
-}
-
-/* Hotcue Color: Yellow */
-#HotcueButton[value="1"][highlight="4"],
-#HotcueButton[value="2"][highlight="4"] {
- color: #4B4B4B;
- background-color: #f8d200;
-}
-
-#HotcueButton[value="1"][highlight="4"]:hover,
-#HotcueButton[value="2"][highlight="4"]:hover {
- color: #4B4B4B;
- background-color: #f8f200;
-}
-
-/* Hotcue Color: Celeste */
-#HotcueButton[value="1"][highlight="5"],
-#HotcueButton[value="2"][highlight="5"] {
- color: #4B4B4B;
- background-color: #42d4f4;
+#HotcueButton {
+ qproperty-shouldHighlightBackgroundOnHover: true;
}
-#HotcueButton[value="1"][highlight="5"]:hover,
-#HotcueButton[value="2"][highlight="5"]:hover {
- color: #4B4B4B;
- background-color: #62f4f4;
-}
-
-/* Hotcue Color: Purple */
-#HotcueButton[value="1"][highlight="6"],
-#HotcueButton[value="2"][highlight="6"] {
- background-color: #af00cc;
-}
-
-#HotcueButton[value="1"][highlight="6"]:hover,
-#HotcueButton[value="2"][highlight="6"]:hover {
- background-color: #cf00ec;
-}
-
-/* Hotcue Color: Pink */
-#HotcueButton[value="1"][highlight="7"],
-#HotcueButton[value="2"][highlight="7"] {
- color: #4B4B4B;
- background-color: #fca6d7;
-}
-
-#HotcueButton[value="1"][highlight="7"]:hover,
-#HotcueButton[value="2"][highlight="7"]:hover {
- color: #4B4B4B;
- background-color: #fcc6f7;
-}
-
-/* Hotcue Color: White */
-#HotcueButton[value="1"][highlight="8"],
-#HotcueButton[value="2"][highlight="8"] {
- color: #4B4B4B;
- background-color: #f2f2ff;
-}
-
-#HotcueButton[value="1"][highlight="8"]:hover,
-#HotcueButton[value="2"][highlight="8"]:hover {
- color: #4B4B4B;
- background-color: #ffffff;
-}
-
-/*"Enabled" state, e.g. for recording status
- 0 -- disconnected / off
- 1 -- connecting / enabling
- 2 -- connected / enabled
-WPushButton[value="2"] {
+#HotcueButton[backgroundIsDark=true][hasBackgroundColor=true] {
color: #FDFDFD;
- background-color: #4B4B4B;
- border: 0px solid #006596;
}
-WPushButton[value="2"]:hover {
- color: #FDFDFD;
- background-color: #4B4B4B;
- border: 0px solid #0080BE;