Skip to content

Commit

Permalink
LateNight: merge vinyl control status into toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Mar 16, 2024
1 parent d993ae4 commit 856cc35
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 51 deletions.
58 changes: 26 additions & 32 deletions res/skins/LateNight/decks/vinyl_controls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,6 @@
<Layout>horizontal</Layout>
<SizePolicy>f,f</SizePolicy>
<Children>

<WidgetGroup><Size>2f,0min</Size></WidgetGroup>

<StatusLight>
<ObjectName>VinylStatus</ObjectName>
<Size>18f,18f</Size>
<TooltipId>vinylcontrol_status</TooltipId>
<!-- TODO use colors mentioned in tooltip: green, blinking yellow, blue -->
<!-- Off -->
<PathStatusLight0 scalemode="STRETCH_ASPECT">skins:LateNight/<Variable name="StyleScheme"/>/style/vinyl_control_0.svg</PathStatusLight0>
<!-- enabled -->
<PathStatusLight1 scalemode="STRETCH_ASPECT">skins:LateNight/<Variable name="StyleScheme"/>/style/vinyl_control_1.svg</PathStatusLight1>
<!-- end-of-record warning -->
<PathStatusLight2 scalemode="STRETCH_ASPECT">skins:LateNight/<Variable name="StyleScheme"/>/style/vinyl_control_2.svg</PathStatusLight2>
<!-- passthrough -->
<PathStatusLight3 scalemode="STRETCH_ASPECT">skins:LateNight/<Variable name="StyleScheme"/>/style/vinyl_control_3.svg</PathStatusLight3>
<Connection>
<ConfigKey><Variable name="Group"/>,vinylcontrol_status</ConfigKey>
</Connection>
</StatusLight>

<!-- increase margin -->
<WidgetGroup><Size>3f,0min</Size></WidgetGroup>

Expand All @@ -38,17 +17,32 @@
<Layout>horizontal</Layout>
<SizePolicy>min,f</SizePolicy>
<Children>
<!-- &#8202; is a hack to push text labels to the left or right
because the kerning of some letters/numbers destroys the desired
effect of center 'Align' and 'text-alignment' -->
<Template src="skins:LateNight/controls/button_2state.xml">
<SetVariable name="TooltipId">vinylcontrol_enabled</SetVariable>
<SetVariable name="ObjectName">VinylButton</SetVariable>
<SetVariable name="Size">40f,20f</SetVariable>
<SetVariable name="state_0_text">&#8202;VINYL&#8202;</SetVariable>
<SetVariable name="state_1_text">&#8202;VINYL&#8202;</SetVariable>
<SetVariable name="ConfigKey"><Variable name="Group"/>,vinylcontrol_enabled</SetVariable>
</Template>
<!-- Transparent 2-state toggle + 4-state status background -->
<WidgetGroup>
<Layout>stacked</Layout>
<Size>40f,20f</Size>
<Children>
<Template src="skins:LateNight/controls/button_2state.xml">
<SetVariable name="TooltipId">vinylcontrol_enabled_status</SetVariable>
<SetVariable name="ObjectName">Blank</SetVariable>
<SetVariable name="Size">40f,20f</SetVariable>
<SetVariable name="ConfigKey"><Variable name="Group"/>,vinylcontrol_enabled</SetVariable>
</Template>
<!-- &#8202; is a hack to push text labels to the left or right
because the kerning of some letters/numbers destroys the desired
effect of center 'Align' and 'text-alignment' -->
<Template src="skins:LateNight/controls/button_4state_display.xml">
<SetVariable name="ObjectName">VinylStatus</SetVariable>
<SetVariable name="Size">40f,20f</SetVariable>
<SetVariable name="state_0_text">&#8202;VINYL&#8202;</SetVariable>
<SetVariable name="state_1_text">&#8202;VINYL&#8202;</SetVariable>
<SetVariable name="state_2_text">&#8202;VINYL&#8202;</SetVariable>
<SetVariable name="state_3_text">&#8202;VINYL&#8202;</SetVariable>
<SetVariable name="ConfigKeyDisp"><Variable name="Group"/>,vinylcontrol_status</SetVariable>
</Template>
</Children>
</WidgetGroup>


<Template src="skins:LateNight/controls/button_3state_persist.xml">
<SetVariable name="TooltipId">vinylcontrol_mode</SetVariable>
Expand Down
30 changes: 22 additions & 8 deletions res/skins/LateNight/style_classic.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,8 @@ WBeatSpinBox, #spinBoxTransition,
#MainMenu::item,
#MainMenu QMenu::item,
#MainMenu QMenu QCheckBox,
#VinylButton[displayValue="0"],
WPushButton#VinylStatus[displayValue="0"], /* off */
#VinylCueButton[displayValue="0"],
#VinylModeButton,
#PassthroughButton[displayValue="0"],
#FxAssignButtons WPushButton[displayValue="0"],
Expand All @@ -1209,7 +1210,9 @@ WBeatSpinBox, #spinBoxTransition,
color: #d2d2d1;
}

#VinylButton[displayValue="1"],
WPushButton#VinylStatus[displayValue="1"], /* enabled (green bg) */
WPushButton#VinylStatus[displayValue="2"], /* end of record (blinking yellow bg) */
WPushButton#VinylStatus[displayValue="3"], /* needle skip detected (pink bg) */
#PassthroughButton[displayValue="1"],
#VinylCueButton[displayValue="1"],
#VinylCueButton[displayValue="2"],
Expand Down Expand Up @@ -1290,7 +1293,7 @@ QPushButton#pushButtonRecording:checked {
border-image: url(skins:LateNight/classic/buttons/btn_embedded_grid_active.svg) 2 2 2 1;
}
WPushButton#FxAssignButton1[displayValue="0"],
#VinylButton[displayValue="0"],
WPushButton#VinylStatus[displayValue="0"],
#KeyMatchReset[displayValue="0"],
#GuiToggleButton[displayValue="0"],
#SyncDeck[displayValue="0"],
Expand All @@ -1303,7 +1306,9 @@ WEffectSelector:!editable,
border-width: 2px;
border-image: url(skins:LateNight/classic/buttons/btn_embedded_library.svg) 2 2 2 2;
}
WPushButton#VinylButton[displayValue="1"],
WPushButton#VinylStatus[displayValue="1"],
WPushButton#VinylStatus[displayValue="2"],
WPushButton#VinylStatus[displayValue="3"],
WPushButton#FxAssignButton1[displayValue="1"],
#KeyMatchReset[pressed="true"],
#GuiToggleButton[displayValue="1"],
Expand Down Expand Up @@ -1464,6 +1469,7 @@ QPushButton#pushButtonRecording:checked {
WPushButton#QuickEffectButton[displayValue="1"],
#FxAssignButton1[displayValue="1"],
#FxAssignButton2[displayValue="1"],
WPushButton#VinylStatus[displayValue="1"], /* enabled, OK */
#BroadcastButton[displayValue="2"] {
background-color: #659f08;
}
Expand All @@ -1490,14 +1496,15 @@ QPushButton#pushButtonRepeatPlaylist:checked {
background-color: #888;
}

/* pink for error / warning*/
#BroadcastButton[displayValue="3"],
#BroadcastButton[displayValue="4"] {
/* pink */
#BroadcastButton[displayValue="4"],
WPushButton#VinylStatus[displayValue="3"] { /* needle skip detected */
background-color: #f856e7;
}

/* Golden */
#VinylButton[displayValue="1"],
WPushButton#VinylStatus[displayValue="2"], /* blinks when the needle reaches the end of the record */
#PassthroughButton[displayValue="1"],
#GuiToggleButton[displayValue="1"],
#GuiToggleButton[displayValue="2"],
Expand Down Expand Up @@ -1600,7 +1607,14 @@ WPushButton#FxExpandOverlay[displayValue="0"],
WPushButton#SamplerExpand[displayValue="0"],
#BeatgridControlsToggle,
#SamplerControlsMini WPushButton,
#RecDot {
#RecDot,
/* transparent buttons, 0-4 (max button state we have currently) */
/* currently used for VINYL overlay */
WPushButton#Blank[value="0"],
WPushButton#Blank[value="1"],
WPushButton#Blank[value="2"],
WPushButton#Blank[value="3"],
WPushButton#Blank[value="4"] {
background-color: transparent;
}

Expand Down
35 changes: 24 additions & 11 deletions res/skins/LateNight/style_palemoon.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ WEffectChainPresetSelector QAbstractScrollArea,
#KnobLabel,
#FxKnobLabel,
#FxButtonLabel,
#VinylButton[displayValue="0"],
WPushButton#VinylStatus[displayValue="0"],
#VinylCueButton[displayValue="0"],
#VinylModeButton,
#PassthroughButton[displayValue="0"],
Expand All @@ -1365,7 +1365,9 @@ WEffectChainPresetSelector QAbstractScrollArea,
color: #444;
}

#VinylButton[displayValue="1"],
WPushButton#VinylStatus[displayValue="1"], /* enabled (green bg) */
WPushButton#VinylStatus[displayValue="2"], /* end of record (blinking yellow bg) */
WPushButton#VinylStatus[displayValue="3"], /* needle skip detected (pink bg) */
#VinylCueButton[displayValue="1"],
#VinylCueButton[displayValue="2"],
#PassthroughButton[displayValue="1"],
Expand Down Expand Up @@ -1438,7 +1440,7 @@ QPushButton#pushButtonRecording:checked {
#BroadcastButton[displayValue="0"],
#SkinSettingsToggle[displayValue="0"],
#KeyMatchReset[displayValue="0"],
WPushButton#VinylButton[displayValue="0"],
WPushButton#VinylStatus[displayValue="0"],
#SyncDeck[displayValue="0"],
WPushButton#FxAssignButton1[displayValue="0"],
WEffectSelector:!editable,
Expand All @@ -1451,7 +1453,9 @@ WEffectSelector:!editable,
}
/*
WPushButton#BpmTap[displayValue="1"], */
WPushButton#VinylButton[displayValue="1"],
WPushButton#VinylStatus[displayValue="1"],
WPushButton#VinylStatus[displayValue="2"],
WPushButton#VinylStatus[displayValue="3"],
#SyncDeck[displayValue="1"],
WPushButton#FxAssignButton1[displayValue="1"],
#KeyMatchReset[pressed="true"],
Expand Down Expand Up @@ -1651,7 +1655,6 @@ WPushButton#Reverse[pressed="true"],
#MicTalk[value="1"], #AuxPlay[value="1"],
#MicDucking[value="1"],
#MicDucking[value="2"],
#VinylButton[displayValue="1"],
#PassthroughButton[displayValue="1"],
#BroadcastButton[displayValue="4"], /* warning */
QPushButton#pushButtonAutoDJ:checked,
Expand Down Expand Up @@ -1690,6 +1693,7 @@ QPushButton#pushButtonRecording:checked,
/* Green for Fx toggles, QuickEffect + Fx12 */
#FxUnit1 #FxToggleButton[displayValue="1"],
#FxUnit2 #FxToggleButton[displayValue="1"],
WPushButton#VinylStatus[displayValue="1"], /* enabled, OK */
#BroadcastButton[displayValue="2"] {
background-color: #438225;
}
Expand All @@ -1701,7 +1705,7 @@ QPushButton#pushButtonRecording:checked,
}
/* Blue for Fx buttons 3/4 */
#FxUnit3 #FxToggleButton[displayValue="1"],
#FxUnit4 #FxToggleButton[displayValue="1"],
#FxUnit4 #FxToggleButton[displayValue="1"]
WBeatSpinBox::up-button:pressed,
WBeatSpinBox::down-button:pressed,
#spinBoxTransition::up-button:pressed,
Expand Down Expand Up @@ -1790,17 +1794,19 @@ WPushButton#FxSuperLinkInvertButton[displayValue="0"] {

/* Yellow */
#RecFeedback[displayValue="1"], /* initialize recording */
#BroadcastButton[displayValue="1"] { /* connecting */
#BroadcastButton[displayValue="1"], /* connecting */
WPushButton#VinylStatus[displayValue="2"] { /* blinks when the needle reaches the end of the record */
background-color: #d09300;
}

#SpecialCueButton[value="1"] {
background-color: #395579;
}

/* pink */
#BroadcastButton[displayValue="3"], /* failure */
#RecFeedback[displayValue="3"] {
/* pink for error / failure / warning */
#BroadcastButton[displayValue="3"],
#RecFeedback[displayValue="3"],
WPushButton#VinylStatus[displayValue="3"] { /* needle skip detected */
background-color: #f856e7;
}

Expand Down Expand Up @@ -1840,7 +1846,14 @@ WPushButton#CrossfaderButton[displayValue="0"],
WPushButton#CrossfaderButton[displayValue="1"],
WPushButton#RecButton[displayValue="0"],
WPushButton#RecButton[displayValue="1"],
#RecDot {
#RecDot,
/* transparent buttons, 0-4 (max button state we have currently) */
/* currently used for VINYL overlay */
WPushButton#Blank[value="0"],
WPushButton#Blank[value="1"],
WPushButton#Blank[value="2"],
WPushButton#Blank[value="3"],
WPushButton#Blank[value="4"] {
background-color: transparent;
}

Expand Down

0 comments on commit 856cc35

Please sign in to comment.