Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
be0f798
Create HotcueColorPalette class
ferranlala Oct 27, 2019
ff6602c
Add methods to store QColor in the config
ferranlala Oct 27, 2019
594e091
Add class to store HotcueColorPalette in userconfig
ferranlala Oct 27, 2019
746a2d0
Add tests for color config methods
ferranlala Nov 1, 2019
6816b04
Make Cue related code use QColor
ferranlala Nov 2, 2019
5d05386
Migrate hotcue color id to RGBA in DB
ferranlala Nov 2, 2019
1263a48
Remove PredefinedColorRepresentation
ferranlala Nov 2, 2019
1243b80
Make UserSettings available in ControllerEngine
ferranlala Nov 3, 2019
6c45087
Remove PredefinedColors from controller scripts
ferranlala Nov 3, 2019
c1ecfe1
Remove PredefinedColor
ferranlala Nov 3, 2019
81db977
Update midi-components library
ferranlala Nov 3, 2019
d58fadb
Avoid constructing HotcueColorPaletteSettings every time its used
ferranlala Nov 3, 2019
cfd7b15
Change test names
ferranlala Nov 4, 2019
6447375
Reorder constructor parameters
ferranlala Nov 4, 2019
4f1e138
Rename member variable
ferranlala Nov 4, 2019
db0d7fe
Rename some color related classes
ferranlala Nov 4, 2019
7d4f254
Remove cues tab on TrackInfo
ferranlala Nov 4, 2019
2572916
Add QColorDialog to ColorMenu
ferranlala Nov 4, 2019
46c02fd
Set hotcue color to the first predefined color
ferranlala Nov 11, 2019
06f6750
Set hotcue color CO to -1 when no hotcue is loaded
ferranlala Nov 11, 2019
e67a6ed
Make hotcue skin buttons use the cue color
ferranlala Nov 11, 2019
cdc40f4
Pass UserSettings to Controller constructor
ferranlala Nov 11, 2019
23caf07
Format code
ferranlala Nov 11, 2019
5b9f08b
Rename members
ferranlala Nov 11, 2019
2120185
Change string literal
ferranlala Nov 11, 2019
374e779
Allow skins to configure text color depending on background
ferranlala Nov 11, 2019
a5ee198
Highlight hotcue buttons when hovered
ferranlala Nov 11, 2019
a0646fa
Fix Shade hotcue buttons color
ferranlala Nov 12, 2019
2688916
Make hotcue button hover highlighting configurable
ferranlala Nov 12, 2019
844ab4c
Fix auto_hotcue_colors not assigning first color
ferranlala Nov 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/preferences/replaygainsettings.cpp
src/preferences/settingsmanager.cpp
src/preferences/upgrade.cpp
src/preferences/hotcuecolorpalettesettings.cpp
src/recording/recordingmanager.cpp
src/skin/colorschemeparser.cpp
src/skin/imgcolor.cpp
Expand Down Expand Up @@ -522,7 +523,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/util/battery/battery.cpp
src/util/cmdlineargs.cpp
src/util/color/color.cpp
src/util/color/predefinedcolor.cpp
src/util/color/colorpalette.cpp
src/util/console.cpp
src/util/db/dbconnection.cpp
src/util/db/dbconnectionpool.cpp
Expand Down Expand Up @@ -2152,3 +2153,4 @@ if(NOT OPTIMIZE STREQUAL "off")
endif()
endif()
endif()

5 changes: 3 additions & 2 deletions build/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ def sources(self, build):
"src/preferences/effectsettingsmodel.cpp",
"src/preferences/broadcastprofile.cpp",
"src/preferences/upgrade.cpp",
"src/preferences/hotcuecolorpalettesettings.cpp",
"src/preferences/dlgpreferencepage.cpp",

"src/effects/effectmanifest.cpp",
Expand Down Expand Up @@ -1259,6 +1260,7 @@ def sources(self, build):
"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",
Expand All @@ -1285,8 +1287,7 @@ def sources(self, build):
"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 = {
Expand Down
12 changes: 6 additions & 6 deletions res/controllers/Roland_DJ-505-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
16 changes: 8 additions & 8 deletions res/controllers/midi-components-0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down
27 changes: 26 additions & 1 deletion res/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
4 changes: 2 additions & 2 deletions res/skins/Deere/hotcue_button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
123 changes: 5 additions & 118 deletions res/skins/Deere/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
#HotcueButton[backgroundIsDark=false][hasBackgroundColor=true] {
color: #1f1e1e;
}
*/

#PlayToggle[value="0"] {
image: url(skin:/icon/ic_play_48px.svg) no-repeat center center;
Expand Down
4 changes: 2 additions & 2 deletions res/skins/LateNight/button_hotcue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<ConnectValueFromWidget>false</ConnectValueFromWidget>
</Connection>
<Connection>
<ConfigKey><Variable name="group"/>,hotcue_<Variable name="number"/>_color_id</ConfigKey>
<BindProperty>highlight</BindProperty>
<ConfigKey><Variable name="group"/>,hotcue_<Variable name="number"/>_color</ConfigKey>
<BindProperty>backgroundColorRgba</BindProperty>
</Connection>
</PushButton>
</Template>
44 changes: 0 additions & 44 deletions res/skins/LateNight/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -356,50 +356,6 @@ QHeaderView::down-arrow {
#SpecialCueButton[displayValue="1"] {
background-color: #0000D4;
}
/* Hotcue Color: Red
this is also the default color if Auto-Color
in Preferences > Decks is Off */
#HotcueButton[displayValue="1"][highlight="0"],
#HotcueButton[displayValue="2"][highlight="0"],
#HotcueButton[displayValue="1"][highlight="1"],
#HotcueButton[displayValue="2"][highlight="1"] {
background-color: #db0000;
}
/* Hotcue Color: Green */
#HotcueButton[displayValue="1"][highlight="2"],
#HotcueButton[displayValue="2"][highlight="2"] {
background-color: #32be44;
}
/* Hotcue Color: Blue */
#HotcueButton[displayValue="1"][highlight="3"],
#HotcueButton[displayValue="2"][highlight="3"] {
background-color: #0044ff;
}
/* Hotcue Color: Yellow */
#HotcueButton[displayValue="1"][highlight="4"],
#HotcueButton[displayValue="2"][highlight="4"] {
background-color: #f8d200;
}
/* Hotcue Color: Celeste */
#HotcueButton[displayValue="1"][highlight="5"],
#HotcueButton[displayValue="2"][highlight="5"] {
background-color: #42d4f4;
}
/* Hotcue Color: Purple */
#HotcueButton[displayValue="1"][highlight="6"],
#HotcueButton[displayValue="2"][highlight="6"] {
background-color: #af00cc;
}
/* Hotcue Color: Pink */
#HotcueButton[displayValue="1"][highlight="7"],
#HotcueButton[displayValue="2"][highlight="7"] {
background-color: #fca6d7;
}
/* Hotcue Color: White */
#HotcueButton[displayValue="1"][highlight="8"],
#HotcueButton[displayValue="2"][highlight="8"] {
background-color: #f2f2ff;
}

#BeatgridButtonsToggle {
image: url(skin:/buttons/btn_beatgrid_buttons_toggle.svg) no-repeat center center;
Expand Down
Binary file modified res/skins/Shade/btn/btn_hotcue_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/skins/Shade/btn/btn_hotcue_1_down.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_1_over.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_1_overdown.png
Binary file not shown.
Binary file modified res/skins/Shade/btn/btn_hotcue_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/skins/Shade/btn/btn_hotcue_2_down.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_2_over.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_2_overdown.png
Binary file not shown.
Binary file modified res/skins/Shade/btn/btn_hotcue_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/skins/Shade/btn/btn_hotcue_3_down.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_3_over.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_3_overdown.png
Binary file not shown.
Binary file modified res/skins/Shade/btn/btn_hotcue_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/skins/Shade/btn/btn_hotcue_4_down.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_4_over.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_4_overdown.png
Binary file not shown.
Binary file modified res/skins/Shade/btn/btn_hotcue_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/skins/Shade/btn/btn_hotcue_5_down.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_5_over.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_5_overdown.png
Binary file not shown.
Binary file modified res/skins/Shade/btn/btn_hotcue_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/skins/Shade/btn/btn_hotcue_6_down.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_6_over.png
Binary file not shown.
Binary file removed res/skins/Shade/btn/btn_hotcue_6_overdown.png
Binary file not shown.
Binary file modified res/skins/Shade/btn/btn_hotcue_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/skins/Shade/btn/btn_hotcue_7_down.png
Diff not rendered.
Binary file removed res/skins/Shade/btn/btn_hotcue_7_over.png
Diff not rendered.
Binary file removed res/skins/Shade/btn/btn_hotcue_7_overdown.png
Diff not rendered.
Binary file modified res/skins/Shade/btn/btn_hotcue_8.png
Binary file removed res/skins/Shade/btn/btn_hotcue_8_down.png
Diff not rendered.
Binary file removed res/skins/Shade/btn/btn_hotcue_8_over.png
Diff not rendered.
Binary file removed res/skins/Shade/btn/btn_hotcue_8_overdown.png
Diff not rendered.
Loading