Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CO Renaming (Pt. 2): Skin Controls #11996

Merged
merged 7 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/skin/legacy/pixmapsource.cpp
src/skin/legacy/skincontext.cpp
src/skin/legacy/tooltips.cpp
src/skin/skincontrols.cpp
src/skin/skinloader.cpp
src/soundio/sounddevice.cpp
src/soundio/sounddevicenetwork.cpp
Expand Down
2 changes: 1 addition & 1 deletion res/controllers/Denon-MC6000MK2-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ DenonMC6000MK2.recvAreaButton = function(_channel, _control, value, _status, _gr

DenonMC6000MK2.recvListButton = function(_channel, _control, value, _status, _group) {
if (DenonMC6000MK2.isButtonPressed(value)) {
script.toggleControl("[Master]", "maximize_library");
script.toggleControl("[Skin]", "show_maximized_library");
}
};

Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Denon-MC7000-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ MC7000.loadButton = function(channel, control, value, status, group) {
MC7000.wheelTouch = function(channel, control, value, status, group) {
const deckNumber = script.deckFromGroup(group);
const deckIndex = deckNumber - 1;
const libraryMaximized = engine.getValue("[Master]", "maximize_library") > 0;
const libraryMaximized = engine.getValue("[Skin]", "show_maximized_library") > 0;
if (MC7000.isVinylMode[deckIndex] && !libraryMaximized) {
if (value === 0x7F) {
engine.scratchEnable(deckNumber, MC7000.jogWheelTicksPerRevolution,
Expand Down Expand Up @@ -711,7 +711,7 @@ MC7000.wheelTurn = function(channel, control, value, status, group) {
const adjustedSpeed = numTicks * MC7000.jogSensitivity / 10;
const deckNumber = script.deckFromGroup(group);
const deckIndex = deckNumber - 1;
const libraryMaximized = engine.getValue("[Master]", "maximize_library");
const libraryMaximized = engine.getValue("[Skin]", "show_maximized_library");
if (libraryMaximized === 1 && numTicks > 0) {
engine.setValue("[Library]", "MoveDown", 1);
} else if (libraryMaximized === 1 && numTicks < 0) {
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Denon-MC7000.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2197,8 +2197,8 @@
</options>
</control>
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<description>Full screen Library</description>
<status>0x9F</status>
<midino>0x0F</midino>
Expand Down
2 changes: 1 addition & 1 deletion res/controllers/Electrix-Tweaker-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ ElectrixTweaker.bigEncoderButton = function(channel, control, value, _status, _g
if (ElectrixTweaker.topShift) {
engine.setValue("[Playlist]", "LoadSelectedIntoFirstStopped", 1);
} else {
engine.setValue("[Master]", "maximize_library", ! engine.getValue("[Master]", "maximize_library"));
engine.setValue("[Skin]", "show_maximized_library", ! engine.getValue("[Skin]", "show_maximized_library"));
}
}
};
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Hercules P32 DJ.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</scriptfiles>
<controls>
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<status>0x90</status>
<midino>0x01</midino>
<options>
Expand Down
8 changes: 4 additions & 4 deletions res/controllers/Hercules_DJControl_Inpulse_200.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@
<!-- NN's MIDI Channel 4 (0x93 - SHIFT MODE)-->
<!--Browser section (Encoder button)-->
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<description>Browser button - Maximize Library view</description>
<status>0x93</status>
<midino>0x00</midino>
Expand Down Expand Up @@ -1293,8 +1293,8 @@
<off>0x07</off>
</output>
<output>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<description>Browser LED (GREEN)</description>
<minimum>0.5</minimum>
<maximum>1</maximum>
Expand Down
8 changes: 4 additions & 4 deletions res/controllers/Hercules_DJControl_Inpulse_300.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@

<!--Browser section (Encoder button)-->
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<description>Browser button - Maximize Library view</description>
<status>0x93</status>
<midino>0x00</midino>
Expand Down Expand Up @@ -2206,8 +2206,8 @@
<off>0x07</off>
</output>
<output>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<description>Browser LED (GREEN)</description>
<minimum>0.5</minimum>
<maximum>1</maximum>
Expand Down
8 changes: 4 additions & 4 deletions res/controllers/Hercules_DJControl_Jogvision.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1016,8 +1016,8 @@
</control>
<!-- View button -->
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<description>Browser button - Maximize Library view</description>
<status>0x90</status>
<midino>0x47</midino>
Expand Down Expand Up @@ -1719,8 +1719,8 @@
</output>
<!-- VIEW LED -->
<output>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<description>VIEW button LED</description>
<minimum>0.5</minimum>
<maximum>1</maximum>
Expand Down
8 changes: 4 additions & 4 deletions res/controllers/Ion Discover DJ.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
</scriptfiles>
<controls>
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<description>MIDI Learned from 2 messages.</description>
<status>0x90</status>
<midino>0x4F</midino>
Expand Down Expand Up @@ -336,8 +336,8 @@
</options>
</control>
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<description>MIDI Learned from 2 messages.</description>
<status>0x80</status>
<midino>0x4F</midino>
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Novation-Launchpad MK2-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3846,8 +3846,8 @@ var NLMK2 = (function () {
};
const masterControlDef = {
maximize_library: {
group: '[Master]',
name: 'maximize_library',
group: '[Skin]',
name: 'show_maximized_library',
type: 'binary'
},
num_samplers: {
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Novation-Launchpad Mini MK3-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3846,8 +3846,8 @@ var NLMMK3 = (function () {
};
const masterControlDef = {
maximize_library: {
group: '[Master]',
name: 'maximize_library',
group: '[Skin]',
name: 'show_maximized_library',
type: 'binary'
},
num_samplers: {
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Novation-Launchpad-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3846,8 +3846,8 @@ var NLMK1 = (function () {
};
const masterControlDef = {
maximize_library: {
group: '[Master]',
name: 'maximize_library',
group: '[Skin]',
name: 'show_maximized_library',
type: 'binary'
},
num_samplers: {
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Numark iDJ Live II.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
</options>
</control>
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<status>0x90</status>
<midino>0x4F</midino>
</control>
Expand Down
2 changes: 1 addition & 1 deletion res/controllers/Numark-Mixtrack-3-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ NumarkMixtrack3.BrowseButton = function(channel, control, value, status, group)
} else {
// Browse push : maximize/minimize library view
if (value === ON) {
script.toggleControl("[Master]", "maximize_library");
script.toggleControl("[Skin]", "show_maximized_library");
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Numark-N4-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ NumarkN4.MixerTemplate = function() {
this.navigationEncoderButton = new components.Button({
shift: function() {
this.type=components.Button.prototype.types.toggle;
this.group="[Master]";
this.inKey="maximize_library";
this.group="[Skin]";
this.inKey="show_maximized_library";
},
unshift: function() {
this.type=components.Button.prototype.types.push;
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Pioneer-DDJ-SB.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@
</options>
</control>
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<status>0x96</status>
<midino>0x65</midino>
<options>
Expand Down
2 changes: 1 addition & 1 deletion res/controllers/Pioneer-DDJ-SX-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@ PioneerDDJSX.backButton = function(channel, control, value, status) {

PioneerDDJSX.shiftBackButton = function(channel, control, value, status) {
if (value) {
script.toggleControl("[Master]", "maximize_library");
script.toggleControl("[Skin]", "show_maximized_library");
}
};

Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Reloop Jockey 3 ME.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
</options>
</control>
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<description>TraxPush to Browse</description>
<status>0x90</status>
<midino>0x35</midino>
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Roland_DJ-505-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ DJ505.addPrepareButton = new components.Button({
shiftOffset: -7,
sendShifted: true,
shiftControl: true,
group: "[Master]",
key: "maximize_library",
group: "[Skin]",
key: "show_maximized_library",
type: components.Button.prototype.types.toggle,
});

Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Stanton-DJC-4.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2615,8 +2615,8 @@
</options>
</control>
<control>
<group>[Master]</group>
<key>maximize_library</key>
<group>[Skin]</group>
<key>show_maximized_library</key>
<status>0x90</status>
<midino>0x59</midino>
<options>
Expand Down
2 changes: 1 addition & 1 deletion res/controllers/Traktor-Kontrol-S2-MK2-hid-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ TraktorS2MK2.registerInputPackets = function() {
MessageShort.addControl("[EffectRack1_EffectUnit1]", "group_[Channel2]_enable", 0x0E, "B", 0x02);
MessageShort.addControl("[EffectRack1_EffectUnit2]", "group_[Channel2]_enable", 0x0E, "B", 0x01);

MessageShort.addControl("[Master]", "maximize_library", 0x0F, "B", 0x04, false, this.toggleButton);
MessageShort.addControl("[Skin]", "show_maximized_library", 0x0F, "B", 0x04, false, this.toggleButton);

MessageShort.addControl("[Microphone]", "talkover", 0x0A, "B", 0x08, false, this.toggleButton);

Expand Down
2 changes: 1 addition & 1 deletion res/controllers/Traktor-Kontrol-S2-MK3-hid-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ TraktorS2MK3.maximizeLibraryHandler = function(field) {
return;
}

script.toggleControl("[Master]", "maximize_library");
script.toggleControl("[Skin]", "show_maximized_library");
};

TraktorS2MK3.selectLoopHandler = function(field) {
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Traktor-Kontrol-S3-hid-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ TraktorS3.Controller = class {

engine.connectControl("[Microphone]", "pfl", this.pflOutput);

engine.connectControl("[Master]", "maximize_library", TraktorS3.Controller.prototype.maximizeLibraryOutput.bind(this));
engine.connectControl("[Skin]", "show_maximized_library", TraktorS3.Controller.prototype.maximizeLibraryOutput.bind(this));

// Master VuMeters
this.masterVuMeter.VuMeterL.connection = engine.makeConnection("[Master]", "VuMeterL", TraktorS3.Controller.prototype.masterVuMeterHandler.bind(this));
Expand Down Expand Up @@ -1145,7 +1145,7 @@ TraktorS3.Deck = class {
return;
}

script.toggleControl("[Master]", "maximize_library");
script.toggleControl("[Skin]", "show_maximized_library");
}

selectLoopHandler(field) {
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Traktor-Kontrol-S4-MK2-hid-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1239,8 +1239,8 @@ TraktorS4MK2.snapHandler = function(field) {
if (field.value === 0) {
return;
}
library_maximized = engine.getValue("[Master]", "maximize_library");
engine.setValue("[Master]", "maximize_library", !library_maximized);
library_maximized = engine.getValue("[Skin]", "show_maximized_library");
engine.setValue("[Skin]", "show_maximized_library", !library_maximized);
};

TraktorS4MK2.FXButtonHandler = function(field) {
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Traktor-Kontrol-S4-MK3.js
Original file line number Diff line number Diff line change
Expand Up @@ -2079,8 +2079,8 @@ class S4Mk3Deck extends Deck {
}
});
this.libraryViewButton = new Button({
group: "[Master]",
key: "maximize_library",
group: "[Skin]",
key: "show_maximized_library",
libraryEncoder: this.libraryEncoder,
libraryEncoderPress: this.libraryEncoderPress,
onShortRelease: function() {
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Deere (64 Samplers)/sample_decks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@

<WidgetGroup>
<Connection>
<ConfigKey>[Samplers],show_samplers</ConfigKey>
<ConfigKey>[Skin],show_samplers</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
<Layout>vertical</Layout>
Expand Down
18 changes: 9 additions & 9 deletions res/skins/Deere (64 Samplers)/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
<attribute persist="true" config_key="[Deere],show_bpm_info">1</attribute>
<attribute persist="true" config_key="[Skin],timing_shift_buttons">0</attribute>
<!-- Mixer -->
<attribute persist="true" config_key="[Master],show_mixer">1</attribute>
<attribute persist="true" config_key="[Skin],show_mixer">1</attribute>
<attribute persist="true" config_key="[Skin],show_faders">1</attribute>
<attribute persist="true" config_key="[Skin],show_eq_knobs">1</attribute>
<attribute persist="true" config_key="[Skin],show_eq_kill_buttons">1</attribute>
<attribute persist="true" config_key="[Skin],show_xfader">1</attribute>
<attribute persist="true" config_key="[Skin],large_vu">0</attribute>
<!-- Effects -->
<attribute persist="true" config_key="[EffectRack1],show">1</attribute>
<attribute persist="true" config_key="[Skin],show_effectrack">1</attribute>
<attribute persist="true" config_key="[Skin],show_4effectunits">0</attribute>
<attribute persist="true" config_key="[Skin],show_superknobs">0</attribute>
<!-- Samplers -->
<attribute persist="true" config_key="[Samplers],show_samplers">1</attribute>
<attribute persist="true" config_key="[Skin],show_samplers">1</attribute>
<!-- item index in skin_settings_sampler_rows.xml, '1' enables 2 sampler rows -->
<attribute persist="true" config_key="[Skin],sampler_rows">1</attribute>
<attribute persist="true" config_key="[Skin],sampler_row_1_expanded">0</attribute>
Expand All @@ -47,13 +47,13 @@
<attribute persist="true" config_key="[Skin],sampler_row_7_expanded">0</attribute>
<attribute persist="true" config_key="[Skin],sampler_row_8_expanded">0</attribute>

<attribute persist="true" config_key="[Microphone],show_microphone">0</attribute>
<attribute persist="true" config_key="[Skin],show_microphones">0</attribute>

<!-- Library -->
<attribute config_key="[Skin],show_library">1</attribute>
<attribute config_key="[Master],maximize_library">0</attribute>
<attribute persist="true" config_key="[PreviewDeck],show_previewdeck">0</attribute>
<attribute persist="true" config_key="[Library],show_coverart">1</attribute>
<attribute config_key="[Skin],show_maximized_library">0</attribute>
<attribute persist="true" config_key="[Skin],show_previewdecks">0</attribute>
<attribute persist="true" config_key="[Skin],show_library_coverart">1</attribute>
<!--Disable hidden effect routing Buttons-->
<attribute persist="false" config_key="[EffectRack1_EffectUnit1],group_[MasterOutput]_enable">0</attribute>
<attribute persist="false" config_key="[EffectRack1_EffectUnit1],group_[BusLeft]_enable">0</attribute>
Expand Down Expand Up @@ -187,7 +187,7 @@
<Template src="skin:../Deere/tool_bar.xml"/>

<!-- regular or maximized library -->
<WidgetStack currentpage="[Master],maximize_library">
<WidgetStack currentpage="[Skin],show_maximized_library">
<Children>

<!-- regular library with decks etc. -->
Expand Down Expand Up @@ -221,7 +221,7 @@
</Splitter><!-- regular library with decks etc. -->

<!-- maximized Library with minimal decks -->
<WidgetGroup trigger="[Master],maximize_library" on_hide_select="0">
<WidgetGroup trigger="[Skin],show_maximized_library" on_hide_select="0">
<Layout>vertical</Layout>
<SizePolicy>me,me</SizePolicy>
<Children>
Expand Down
Loading
Loading