Skip to content

Commit

Permalink
Tango effect selector: smaller drop-down icon, allow growing
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Nov 19, 2021
1 parent 161044b commit 08d4238
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 33 deletions.
3 changes: 3 additions & 0 deletions res/skins/Tango/buttons/btn_arrow_down_fx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions res/skins/Tango/buttons/btn_arrow_down_fx_hover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 39 additions & 28 deletions res/skins/Tango/fx/toggle_selector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,57 @@ Variables:

<WidgetGroup>
<ObjectName>FxToggleSelector</ObjectName>
<Layout>stacked</Layout>
<Size>82f,20f</Size>
<Layout>horizontal</Layout>
<MinimumSize>80,20</MinimumSize>
<MaximumSize>110,20</MaximumSize>
<SizePolicy>me,f</SizePolicy>
<Children>
<!-- invisible, clickable Overlay to toggle Effect -->
<Template src="skin:../Tango/controls/button_2state.xml">
<SetVariable name="TooltipId">EffectSlot_enabled</SetVariable>
<SetVariable name="ObjectName">FxToggleButton</SetVariable>
<SetVariable name="Size">69f,20f</SetVariable>
<SetVariable name="ConfigKey"><Variable name="FxRack_FxUnit_FxNum"/>,enabled</SetVariable>
</Template>

<WidgetGroup>
<ObjectName>FxNameContainer</ObjectName>
<Size>69f,20f</Size>
<Layout>horizontal</Layout>
<ObjectName>FxToggleSelector</ObjectName>
<Layout>stacked</Layout>
<Size>67me,20f</Size>
<Children>
<WidgetGroup><Size>0me,1min</Size></WidgetGroup>
<EffectName>
<ObjectName>FxName</ObjectName>
<EffectRack><Variable name="FxRack"/></EffectRack>
<EffectUnit><Variable name="FxUnit"/></EffectUnit>
<Effect><Variable name="FxNum"/></Effect>
</EffectName>
<WidgetGroup><Size>0me,1min</Size></WidgetGroup>
<!-- invisible, clickable Overlay to toggle Effect -->
<Template src="skin:../Tango/controls/button_2state.xml">
<SetVariable name="TooltipId">EffectSlot_enabled</SetVariable>
<SetVariable name="ObjectName">FxToggleButton</SetVariable>
<SetVariable name="Size">67me,20f</SetVariable>
<SetVariable name="ConfigKey"><Variable name="FxRack_FxUnit_FxNum"/>,enabled</SetVariable>
</Template>

<WidgetGroup>
<ObjectName>FxNameContainer</ObjectName>
<Size>67me,20f</Size>
<Layout>horizontal</Layout>
<Children>
<WidgetGroup><Size>0me,1min</Size></WidgetGroup>
<EffectName>
<ObjectName>FxName</ObjectName>
<EffectRack><Variable name="FxRack"/></EffectRack>
<EffectUnit><Variable name="FxUnit"/></EffectUnit>
<Effect><Variable name="FxNum"/></Effect>
</EffectName>
<WidgetGroup><Size>0me,1min</Size></WidgetGroup>
</Children>
</WidgetGroup>

<!-- Colored background to communicate the Effect's ON/OFF status -->
<Template src="skin:../Tango/controls/button_2state.xml">
<SetVariable name="ObjectName">FxToggleButtonUnderlay</SetVariable>
<SetVariable name="Size">67me,20f</SetVariable>
<SetVariable name="ConfigKey"><Variable name="FxRack_FxUnit_FxNum"/>,enabled</SetVariable>
</Template>

</Children>
</WidgetGroup>

<!-- Colored background to communicate the Effect's ON/OFF status -->
<Template src="skin:../Tango/controls/button_2state.xml">
<SetVariable name="ObjectName">FxToggleButtonUnderlay</SetVariable>
<SetVariable name="Size">69f,20f</SetVariable>
<SetVariable name="ConfigKey"><Variable name="FxRack_FxUnit_FxNum"/>,enabled</SetVariable>
</Template>

<EffectSelector>
<EffectRack><Variable name="FxRack"/></EffectRack>
<EffectUnit><Variable name="FxUnit"/></EffectUnit>
<Effect><Variable name="FxNum"/></Effect>
<Elide>right</Elide>
<Size>82f,20f</Size>
<Size>16f,20f</Size>
</EffectSelector>

</Children>
Expand Down
15 changes: 10 additions & 5 deletions res/skins/Tango/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1723,6 +1723,8 @@ decks, samplers, mic, aux, fx */
/* If you use margin top/bottom 0, the combo box shrinks in width (go figure) and
names start getting cut off. Adding explicit padding improves this. */
padding: 0px 28px 0px 0px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
#fadeModeCombobox {
border: 1px solid #666;
Expand Down Expand Up @@ -1808,11 +1810,11 @@ decks, samplers, mic, aux, fx */
background-color: #101010;
width: 11px;
height: 20px; */
image: url(skin:/../Tango/buttons/btn_arrow_down.svg) no-repeat center center;
image: url(skin:/../Tango/buttons/btn_arrow_down_fx.svg) no-repeat center center;
}
WEffectSelector::down-arrow:hover,
#fadeModeCombobox::down-arrow:hover {
image: url(skin:/../Tango/buttons/btn_arrow_down_hover.svg) no-repeat center center;
image: url(skin:/../Tango/buttons/btn_arrow_down_fx_hover.svg) no-repeat center center;
}
WEffectChainPresetSelector::down-arrow {
image: url(skin:/../Tango/buttons/btn_arrow_down_fxquick.svg) no-repeat center center;
Expand Down Expand Up @@ -2290,7 +2292,8 @@ WEffectChainPresetSelector::item,
WEffectChainPresetButton QMenu,
WEffectChainPresetButton QMenu::item,
WEffectChainPresetButton QMenu QCheckBox,
#fadeModeCombobox, #fadeModeCombobox QAbstractScrollArea,
#fadeModeCombobox,
#fadeModeCombobox QAbstractScrollArea,
#fadeModeCombobox QAbstractScrollArea::item {
background-color: #1a1a1a;
color: #ccc;
Expand Down Expand Up @@ -2336,13 +2339,15 @@ WTrackMenu QMenu QCheckBox:focus,
WTrackMenu QMenu QCheckBox:hover,
QLineEdit QMenu::item:selected,
WCoverArtMenu::item:selected,
#fadeModeCombobox::item:selected,
WEffectSelector::item:selected,
WEffectChainPresetSelector::item:selected,
WEffectSelector::item:selected {
#fadeModeCombobox::item:selected {
background-color: #555;
color: #fff;
/* remove OS focus indicator */
outline: none;
/* Remove 3D border from unchecked effects checkmark space */
border: 0px;
}

/* disabled menu items and checkboxes */
Expand Down

0 comments on commit 08d4238

Please sign in to comment.