summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2019-11-21 07:34:57 +0100
committerDaniel Schürmann <daschuer@mixxx.org>2019-11-21 07:34:57 +0100
commitf793e3544ca0b3d544269c33257d86ea956798c7 (patch)
tree706ea81461f5d04d6ad355340c65744021fad4cc
parent35da91b786eb7979d4cacf1c7e650978c33ea499 (diff)
Revert "Merge pull request #2353 from daschuer/lp1850644"
-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.pngbin3173 -> 386 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_1_down.pngbin0 -> 385 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_1_over.pngbin0 -> 589 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_1_overdown.pngbin0 -> 588 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_2.pngbin3711 -> 392 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_2_down.pngbin0 -> 392 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_2_over.pngbin0 -> 3436 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_2_overdown.pngbin0 -> 2265 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_3.pngbin3582 -> 397 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_3_down.pngbin0 -> 397 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_3_over.pngbin0 -> 3242 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_3_overdown.pngbin0 -> 2271 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_4.pngbin3504 -> 389 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_4_down.pngbin0 -> 388 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_4_over.pngbin0 -> 3085 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_4_overdown.pngbin0 -> 2160 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_5.pngbin3723 -> 201 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_5_down.pngbin0 -> 201 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_5_over.pngbin0 -> 201 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_5_overdown.pngbin0 -> 201 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_6.pngbin3593 -> 202 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_6_down.pngbin0 -> 202 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_6_over.pngbin0 -> 202 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_6_overdown.pngbin0 -> 202 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_7.pngbin3473 -> 203 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_7_down.pngbin0 -> 202 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_7_over.pngbin0 -> 202 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_7_overdown.pngbin0 -> 202 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_8.pngbin3581 -> 196 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_8_down.pngbin0 -> 195 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_8_over.pngbin0 -> 597 bytes
-rw-r--r--res/skins/Shade/btn/btn_hotcue_8_overdown.pngbin0 -> 596 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, 1118 insertions, 777 deletions
diff --git a/build/depends.py b/build/depends.py
index 41c3a605a4..5298cf87b7 100644
--- a/build/depends.py
+++ b/build/depends.py
@@ -781,7 +781,6 @@ 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",
@@ -1260,7 +1259,6 @@ 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",
@@ -1287,7 +1285,8 @@ class MixxxCore(Feature):
"src/util/desktophelper.cpp",
"src/util/widgetrendertimer.cpp",
"src/util/workerthread.cpp",
- "src/util/workerthreadscheduler.cpp"
+ "src/util/workerthreadscheduler.cpp",
+ "src/util/color/predefinedcolor.cpp"
]
proto_args = {
diff --git a/res/controllers/Roland_DJ-505-scripts.js b/res/controllers/Roland_DJ-505-scripts.js
index 2e2777c0e8..e2600dacba 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.colorKey = 'hotcue_' + this.number + '_color';
+ this.colorIdKey = 'hotcue_' + this.number + '_color_id';
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.colorKey !== undefined && outval !== this.off) {
- this.outputColor(engine.getValue(this.group, this.colorKey));
+ if (this.colorIdKey !== undefined && outval !== this.off) {
+ this.outputColor(engine.getValue(this.group, this.colorIdKey));
} 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.colorKey));
+ this.outputColor(engine.getValue(this.group, this.colorIdKey));
}
};
this.connect = function() {
components.Button.prototype.connect.call(this); // call parent connect
- if (undefined !== this.group && this.colorKey !== undefined) {
- this.connections[1] = engine.makeConnection(this.group, this.colorKey, function (id) {
+ if (undefined !== this.group && this.colorIdKey !== undefined) {
+ this.connections[1] = engine.makeConnection(this.group, this.colorIdKey, 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 1893768c2a..7bb5c00957 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.colorKey = 'hotcue_' + options.number + '_color';
+ this.colorIdKey = 'hotcue_' + options.number + '_color_id';
if (options.colors === undefined) {
- options.colors = color.hotcueColorPalette();
+ options.colors = color.predefinedColorsList();
}
}
this.number = options.number;
@@ -312,8 +312,8 @@
this.inKey = 'hotcue_' + this.number + '_clear';
},
getColor: function() {
- if (this.colorKey !== undefined) {
- return color.colorFromHexCode(engine.getValue(this.group,this.colorKey));
+ if (this.colorIdKey !== undefined) {
+ return color.predefinedColorFromId(engine.getValue(this.group,this.colorIdKey));
} 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.colorKey !== undefined && outval !== this.off) {
- this.outputColor(engine.getValue(this.group, this.colorKey));
+ if (this.colorIdKey !== undefined && outval !== this.off) {
+ this.outputColor(engine.getValue(this.group, this.colorIdKey));
} else {
this.send(outval);
}
@@ -348,8 +348,8 @@
},
connect: function() {
Button.prototype.connect.call(this); // call parent connect
- if (undefined !== this.group && this.colorKey !== undefined) {
- this.connections[1] = engine.makeConnection(this.group, this.colorKey, function (id) {
+ if (undefined !== this.group && this.colorIdKey !== undefined) {
+ this.connections[1] = engine.makeConnection(this.group, this.colorIdKey, function (id) {
if (engine.getValue(this.group,this.outKey)) {
this.outputColor(id);
}
diff --git a/res/schema.xml b/res/schema.xml
index 4940729fe1..d5babba85a 100644
--- a/res/schema.xml
+++ b/res/schema.xml
@@ -480,30 +480,5 @@ METADATA
position INTEGER
);
</sql>
- </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>
+ </revision>
</schema>
diff --git a/res/skins/Deere/hotcue_button.xml b/res/skins/Deere/hotcue_button.xml
index 19ba4bb08b..f5e4777622 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</ConfigKey>
- <BindProperty>backgroundColorRgba</BindProperty>
+ <ConfigKey><Variable name="group"/>,hotcue_<Variable name="hotcue"/>_color_id</ConfigKey>
+ <BindProperty>highlight</BindProperty>
</Connection>
</PushButton>
</Template>
diff --git a/res/skins/Deere/style.qss b/res/skins/Deere/style.qss
index 944870dd38..c89a5eca6b 100644
--- a/res/skins/Deere/style.qss
+++ b/res/skins/Deere/style.qss
@@ -1583,6 +1583,7 @@ WPushButton:hover {
/*"Pressed" state*/
WPushButton[value="1"],
WPushButton[value="2"] {
+ /*color: #FDFDFD;*/
color: #FDFDFD;
background-color: #006596;
border: 0px solid #006596;
@@ -1595,17 +1596,129 @@ WPushButton[value="2"]:hover {
border: 0px solid #0080BE;
}
-#HotcueButton {
- qproperty-shouldHighlightBackgroundOnHover: true;
+/* 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[backgroundIsDark=true][hasBackgroundColor=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;
+}
+
+#Hot