Skip to content

Commit

Permalink
Use alternative on/off button for the QuickFX
Browse files Browse the repository at this point in the history
  • Loading branch information
acolombier committed Jun 3, 2024
1 parent 05da21d commit b49e163
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
1 change: 1 addition & 0 deletions res/skins/LateNight/controls/button_2state.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Variables:
<TooltipId><Variable name="TooltipId"/></TooltipId>
<ObjectName><Variable name="ObjectName"/></ObjectName>
<Size><Variable name="Size"/></Size>
<Pos><Variable name="Pos"/></Pos>
<NumberStates>2</NumberStates>
<RightClickIsPushButton>false</RightClickIsPushButton>
<State>
Expand Down
7 changes: 7 additions & 0 deletions res/skins/LateNight/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1016,3 +1016,10 @@ WLibrarySidebar {
#Border58 {
border: 1px solid #585858;
}

WStemControl #FxToggleButton[displayValue="1"] {
background-color: #438225;
}
WStemControl #FxToggleButton[displayValue="0"] {
background-color: #121212;
}
28 changes: 9 additions & 19 deletions res/skins/LateNight/waveform.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,26 +173,16 @@
<EffectUnitGroup>[QuickEffectRack1_<Variable name="StemFxGroup"/>]</EffectUnitGroup>
</EffectChainPresetSelector>
<WidgetGroup>
<Size>14f,9f</Size>
<Size>32f,28f</Size>
<Children>
<PushButton>
<TooltipId>QuickEffectRack_enabled</TooltipId>
<ObjectName>QuickEffectDot</ObjectName>
<Pos>4,0</Pos>
<Size>9f,9f</Size>
<NumberStates>2</NumberStates>
<RightClickIsPushButton>false</RightClickIsPushButton>
<State>
<Number>0</Number>
</State>
<State>
<Number>1</Number>
</State>
<Connection>
<ConfigKey>[QuickEffectRack1_<Variable name="StemFxGroup"/>],enabled</ConfigKey>
<ButtonState>LeftButton</ButtonState>
</Connection>
</PushButton>
<Template src="skins:LateNight/controls/button_2state.xml">
<SetVariable name="TooltipId">EffectSlot_enabled</SetVariable>
<SetVariable name="ObjectName">FxToggleButton</SetVariable>
<SetVariable name="BtnSize">square</SetVariable>
<SetVariable name="Size">28f,28f</SetVariable>
<SetVariable name="Pos">4,0</SetVariable>
<SetVariable name="ConfigKey">[QuickEffectRack1_<Variable name="StemFxGroup"/>],enabled</SetVariable>
</Template>
</Children>
</WidgetGroup>
<KnobComposed>
Expand Down
6 changes: 4 additions & 2 deletions src/engine/channels/enginedeck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,11 @@ void EngineDeck::processStem(CSAMPLE* pOut, const int iBufferSize) {
GroupFeatureState featureState;
collectFeatures(&featureState);
for (int stemIdx = 0; stemIdx < stemCount;
stemIdx ++) {
stemIdx++) {
int chOffset = stemIdx * mixxx::audio::ChannelCount::stereo();
float gain = m_stemMute[stemIdx]->toBool() ? 0.0f : static_cast<float>(m_stemGain[stemIdx]->get());
float gain = m_stemMute[stemIdx]->toBool()
? 0.0f
: static_cast<float>(m_stemGain[stemIdx]->get());
SampleUtil::copyMultiToStereo(
pOut,
pIn,
Expand Down

0 comments on commit b49e163

Please sign in to comment.