diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2021-04-13 23:03:31 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2021-04-13 23:06:12 +0200 |
commit | efa41fb52edc993f55362d18730bdeb753eb2718 (patch) | |
tree | 106189e08e213498283a8b35f2fc2db3babc8aef | |
parent | 34c262989311c91e1157db43ef423440104779f6 (diff) | |
parent | 36d453ecd41e06abf0c32f906c6b4d81358bb808 (diff) |
Merge branch '2.3' of github.com:mixxxdj/mixxx
48 files changed, 944 insertions, 1142 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 26190df63f..a8a62653fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1022,9 +1022,8 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL ) set_target_properties(mixxx-lib PROPERTIES AUTOMOC ON AUTOUIC ON CXX_CLANG_TIDY "${CLANG_TIDY}") target_include_directories(mixxx-lib PUBLIC src "${CMAKE_CURRENT_BINARY_DIR}/src") -target_compile_definitions(mixxx-lib PRIVATE SETTINGS_FILE="mixxx.cfg") if(UNIX AND NOT APPLE) - target_compile_definitions(mixxx-lib PRIVATE SETTINGS_PATH=".mixxx/") + set(MIXXX_SETTINGS_PATH ".mixxx/") endif() # Disable warnings in generated source files diff --git a/res/skins/Deere/style.qss b/res/skins/Deere/style.qss index 511ee6ca75..dc8aff366b 100644 --- a/res/skins/Deere/style.qss +++ b/res/skins/Deere/style.qss @@ -1275,6 +1275,7 @@ WBeatSpinBox, #EffectButton { font: 10px; + margin-right: 1px; } #EffectButtonLabel { @@ -1984,7 +1985,7 @@ WTrackMenu QMenu { -WEffectSelector, +WEffectSelector:!editable, #fadeModeCombobox { color: #c1cabe; /* The 3D frame on the combo box becomes flat when you give it a border */ @@ -1992,7 +1993,8 @@ WEffectSelector, border-radius: 3px; font: 15px; } -WEffectSelector { +WEffectSelector:!editable, +WEffectSelector:!editable:on { /* Fixes the white bars on the top/bottom of the popup on Mac OS X */ margin: 0px; /* If you use margin top/bottom 0, the combo box shrinks in width (go figure) and @@ -2007,7 +2009,7 @@ WEffectSelector { margin: 9px 3px 6px 3px; } - WEffectSelector:hover, + WEffectSelector:!editable:hover, #fadeModeCombobox:hover { border: 1px ridge #015d8d; } diff --git a/res/skins/LateNight/decks/vinyl_controls.xml b/res/skins/LateNight/decks/vinyl_controls.xml index e7f17c276b..f41f209f74 100644 --- a/res/skins/LateNight/decks/vinyl_controls.xml +++ b/res/skins/LateNight/decks/vinyl_controls.xml @@ -16,9 +16,14 @@ <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">skin:/<Variable name="StyleScheme"/>/style/vinyl_control_0.svg</PathStatusLight0> + <!-- enabled --> <PathStatusLight1 scalemode="STRETCH_ASPECT">skin:/<Variable name="StyleScheme"/>/style/vinyl_control_1.svg</PathStatusLight1> + <!-- end-of-record warning --> <PathStatusLight2 scalemode="STRETCH_ASPECT">skin:/<Variable name="StyleScheme"/>/style/vinyl_control_2.svg</PathStatusLight2> + <!-- passthrough --> <PathStatusLight3 scalemode="STRETCH_ASPECT">skin:/<Variable name="StyleScheme"/>/style/vinyl_control_3.svg</PathStatusLight3> <Connection> <ConfigKey><Variable name="Group"/>,vinylcontrol_status</ConfigKey> diff --git a/res/skins/LateNight/fx/focus_button.xml b/res/skins/LateNight/fx/focus_button.xml index 09f230ccde..cc73cf89fd 100644 --- a/res/skins/LateNight/fx/focus_button.xml +++ b/res/skins/LateNight/fx/focus_button.xml @@ -21,7 +21,7 @@ Variables: <PushButton> <TooltipId>EffectSlot_focus</TooltipId> <ObjectName>FxFocusButton</ObjectName> - <Size>18f,18f</Size> + <Size>16f,16f</Size> <NumberStates>2</NumberStates> <RightClickIsPushButton>true</RightClickIsPushButton> <State> @@ -30,13 +30,14 @@ Variables: <State> <Number>1</Number> </State> + <!-- left click = focus --> <Connection> <ConfigKey>[<Variable name="FxRack_FxUnit"/>],focused_effect</ConfigKey> <ButtonState>LeftButton</ButtonState> <Transform><IsEqual><Variable name="FxNum"/></IsEqual></Transform> </Connection> + <!-- right click = unfocus --> <Connection> - <!-- right click > unfocus --> <ConfigKey>[<Variable name="FxRack_FxUnit"/>],focused_effect</ConfigKey> <ButtonState>RightButton</ButtonState> <EmitOnDownPress>true</EmitOnDownPress> diff --git a/res/skins/LateNight/fx/slot_controls.xml b/res/skins/LateNight/fx/slot_controls.xml index ecbe307251..16e0564c63 100644 --- a/res/skins/LateNight/fx/slot_controls.xml +++ b/res/skins/LateNight/fx/slot_controls.xml @@ -1,13 +1,13 @@ <!DOCTYPE template> <!-- Description: - An effect unit widget hosting all effect controls for both collapsed - and expanded state ([FxUnitN],show_parameters) + An effect widget hosting all main controls for an effect slot Variables: - group: The group for the controls. - FxRack + FxRack_FxUnit FxUnit FxNum + ArcRadiusSmall + TopRegion_BtnType --> <Template> <SetVariable name="FxRack_FxUnit_FxNum"><Variable name="FxRack_FxUnit"/>_Effect<Variable name="FxNum"/></SetVariable> @@ -26,9 +26,11 @@ <ObjectName>FxSlotControls</ObjectName> <Layout>horizontal</Layout> <SizePolicy>p,min</SizePolicy> - <MaximumSize>173,</MaximumSize> + <MaximumSize>190,</MaximumSize> <Children> + <Template src="skin:/fx/focus_button.xml"/> + <Template src="skin:/controls/button_2state.xml"> <SetVariable name="TooltipId">EffectSlot_enabled</SetVariable> <SetVariable name="ObjectName">FxToggleButton</SetVariable> @@ -45,22 +47,19 @@ <EffectSelector> <MinimumSize>65,24</MinimumSize> - <MaximumSize>120,24</MaximumSize> + <MaximumSize>,24</MaximumSize> <SizePolicy>me,f</SizePolicy> <EffectRack>1</EffectRack> <EffectUnit><Variable name="FxUnit"/></EffectUnit> <Effect><Variable name="FxNum"/></Effect> - <!-- Style the effect selector when the effect is enabled --> + <!-- TODO Style the effect selector when the effect is enabled? --> + <!-- add 'highlight' property to WEffectSelector to avoid skin warnings--> <!-- <Connection> <ConfigKey>[<Variable name="FxRack_FxUnit_FxNum"/>],enabled</ConfigKey> <BindProperty>highlight</BindProperty> </Connection> --> </EffectSelector> - <WidgetGroup><Size>2min,0min</Size></WidgetGroup> - - <Template src="skin:/fx/focus_button.xml"/> - </Children> </WidgetGroup><!-- FxSlotControls --> diff --git a/res/skins/LateNight/fx/slot_parameters.xml b/res/skins/LateNight/fx/slot_parameters.xml index a9c85bcdb7..dc4caef2e5 100644 --- a/res/skins/LateNight/fx/slot_parameters.xml +++ b/res/skins/LateNight/fx/slot_parameters.xml @@ -1,13 +1,13 @@ <!DOCTYPE template> <!-- Description: - An effect unit widget hosting all effect controls for both collapsed - and expanded state ([FxUnitN],show_parameters) + An effect unit widget hosting all parameter controls for an effect Variables: - group: The group for the controls. - FxRack + FxRack_FxUnit FxUnit FxNum + ArcRadiusSmall + TopRegion_BtnType --> <Template> <SetVariable name="FxRack_FxUnit_FxNum">EffectRack1_EffectUnit<Variable name="FxUnit"/>_Effect<Variable name="FxNum"/></SetVariable> @@ -94,7 +94,7 @@ </Children> </WidgetGroup><!-- FxParametersContainer --> - <!-- Layer to style the Fx slot border, depending on focus state --> + <!-- Layer to style the Fx slot when it's focused (see fx mapping of midi-components.js) --> <WidgetGroup> <SizePolicy>me,min</SizePolicy> <Layout>stacked</Layout> @@ -114,7 +114,6 @@ <BindProperty>visible</BindProperty> </Connection> </WidgetGroup> - <!-- Layer to style the Fx slot border, depending on focus state --> <!-- Regular background, draws the background tile in Classic them --> <WidgetGroup> diff --git a/res/skins/LateNight/fx/unit_parameters_hidden.xml b/res/skins/LateNight/fx/unit_parameters_hidden.xml index 4c3eeca863..dc92a33973 100644 --- a/res/skins/LateNight/fx/unit_parameters_hidden.xml +++ b/res/skins/LateNight/fx/unit_parameters_hidden.xml @@ -3,8 +3,6 @@ Description: An effect unit widget. Variables: - group: The group for the controls. - FxRack FxUnit --> <Template> @@ -20,8 +18,36 @@ <Layout>horizontal</Layout> <Children> - <WidgetGroup><SizePolicy>min,min</SizePolicy></WidgetGroup> + <!-- TODO ronso0 mkae this work without compressing fx slots --> + <!-- Separator shown when it makes sense (gap is > 60px) --> + <!-- <WidgetGroup> + <Layout>horizontal</Layout> + <SizePolicy>max,min</SizePolicy> + <Children> + <SizeAwareStack> + <SizePolicy>i,min</SizePolicy> + <Children> + <WidgetGroup> + <Layout>horizontal</Layout> + <SizePolicy>i,min</SizePolicy> + <MinimumSize>60,0</MinimumSize> + <Children> + <WidgetGroup><SizePolicy>me,me</SizePolicy></WidgetGroup> + <WidgetGroup> + <ObjectName>FxMixerSeparatorCollapsed</ObjectName> + <Layout>horizontal</Layout> + <Children/> + </WidgetGroup> + </Children> + </WidgetGroup> + </Children> + </SizeAwareStack> + </Children> + </WidgetGroup> --> + + <WidgetGroup><SizePolicy>min,me</SizePolicy></WidgetGroup> + <!-- Fx Slot 1 --> <WidgetGroup> <Layout>horizontal</Layout> <SizePolicy>me,min</SizePolicy> @@ -34,12 +60,13 @@ </WidgetGroup> <WidgetGroup> - <ObjectName>FxSlotSeparatorV</ObjectName> + <ObjectName>FxFlowIndicatorCollapsed</ObjectName> <Layout>horizontal</Layout> <SizePolicy>min,me</SizePolicy> <Children/> </WidgetGroup> + <!-- Fx Slot 2 --> <WidgetGroup> <Layout>horizontal</Layout> <SizePolicy>me,min</SizePolicy> @@ -52,11 +79,12 @@ </WidgetGroup> <WidgetGroup> - <ObjectName>FxSlotSeparatorV</ObjectName> + <ObjectName>FxFlowIndicatorCollapsed</ObjectName> <Layout>horizontal</Layout> <Children/> </WidgetGroup> + <!-- Fx Slot 3 --> <WidgetGroup> <Layout>horizontal</Layout> <SizePolicy>me,min</SizePolicy> @@ -69,7 +97,7 @@ </WidgetGroup> <WidgetGroup> - <ObjectName>FxSlotSeparatorV</ObjectName> + <ObjectName>FxMixerSeparatorCollapsed</ObjectName> <Layout>horizontal</Layout> <Children/> </WidgetGroup> diff --git a/res/skins/LateNight/fx/unit_parameters_visible.xml b/res/skins/LateNight/fx/unit_parameters_visible.xml index 6e6a624afe..1bcf0b0411 100644 --- a/res/skins/LateNight/fx/unit_parameters_visible.xml +++ b/res/skins/LateNight/fx/unit_parameters_visible.xml @@ -3,8 +3,6 @@ Description: An effect unit widget. Variables: - group: The group for the controls. - FxRack FxUnit --> <Template> @@ -19,6 +17,8 @@ <SizePolicy>me,me</SizePolicy> <Layout>vertical</Layout> <Children> + + <!-- Fx Slot 1 --> <WidgetGroup> <SizePolicy>me,me</SizePolicy> <Layout>horizontal</Layout> @@ -39,6 +39,7 @@ </Children> </WidgetGroup> + <!-- Horizontal split line - adjust max-width to fx slot width --> <WidgetGroup> <ObjectName></ObjectName> <Layout>horizontal</Layout> @@ -55,6 +56,7 @@ </Children> </WidgetGroup> + <!-- Fx Slot 2 --> <WidgetGroup> <SizePolicy>me,me</SizePolicy> <Layout>horizontal</Layout> @@ -91,6 +93,7 @@ </Children> </WidgetGroup> + <!-- Fx Slot 3 --> <WidgetGroup> <SizePolicy>me,me</SizePolicy> <Layout>horizontal</Layout> diff --git a/res/skins/LateNight/helpers/skin_helper_deck_size.xml b/res/skins/LateNight/helpers/skin_helper_deck_size.xml index 3c86ad1caf..ef10a8e580 100644 --- a/res/skins/LateNight/helpers/skin_helper_deck_size.xml +++ b/res/skins/LateNight/helpers/skin_helper_deck_size.xml @@ -1,107 +1,98 @@ <!-- -Description: - - A four-state GUI switch, outsourcing the complex deck size selection - from the deck.xml template. - - It picks the appropriate deck variant - FULL - Compact - minimal - none - depending on how the following skin controls are combined - [Master],maximize_library - [LateNight],max_lib_show_decks - [Master],show_mixer - [LateNight],deck_size_without_mixer - - This is a SizeAwareStack and WidgetStack hack that basically executes - an analogue version of a simple script similiar to this: - - if (![Master],maxmimize_library - && [Skin],select_minimal_deck) { - hide(fullDeck); - hide(compactDeck); - show(minimaldeck); - } else { - if ([Master],show_mixer) { - hide(minimaldeck); - hide(compactDeck); - show(fullDeck); + + Purpose: + + Inside deck.xml there are differently sized deck variants + FULL + Compact + minimal + (none) + to be shown, depending on how the user has currently configured the skin. + Controls taken into account are + [Master],maximize_library + [LateNight],max_lib_show_decks + [Master],show_mixer + [LateNight],deck_size_without_mixer + deck.xml would be very complex if we'd want to cover all combinations there. + To have a slim deck template this switch here does the selection and thus allows + to remote-control what to show in deck.xml + + This is a widget hack to compensate the lack of proper GUI scripting (as of Mixxx 2.3) + It is basically an analogue version of a simple script similiar to this: + if (Library is maximized && minimal deck selected) { + show minimal deck; } else { - case .. - ... + if (Mixer is shown) { + enforce full deck; + } else { + show pre-selected deck; + } } - } - - This is a fixed-width container. The occupied space is defined - by widget connected to the above skin controls. The SizeAwareStack - then picks one child widget fitting into the remaining space. - Note: To make the whole thing work we need to be sure there's - only ONE fitting widget for every possible size the - SizeAwareStack could be shrunk to. - - Each widget inside the SizeAwareStack is a WidgetStack. - By default, WidgetStacks pick their first child for display*, - then toggle the child's 'trigger' control to 1 (if present). - Example: - <WidgetStack> - <Children> - <WidgetGroup trigger="[Any],config_key"> => set to '1' - <WidgetGroup trigger="[Another],config_key"> => set to '0' - </Children> - </WidgetStack> - - So, let's put several copies of a WidgetStack into the - SizeAwareStack, each with the identical set of children and - controls. If we then change the order of the WidgetStacks' - children, each WidgetStack can toggle a specific control to '1' - while setting the others to '0'. - If we've set the parent SizeAwareStack up carefully, and if we - omitted storing the index with - <WidgetStack currentPage="[Save],config_key"> anywhere inside - the SizeAwareStack, we can now toggle several N-state switches - at once. - This gives us a pretty reliable tool to pick the appropriate - deck variant, for example, depending on a may-be complex - skin configuration. + + + The Structure: + + The outer container is a WidgetGroup with a fixed width and a horizontal layout. + + On the left there are fixed-width blocks, where each is shown or hidden according + to the state of one of the skin controls listed above. + So, depending on how the user has configured the skin via the skin settings menu, + those blocks define the remaining space on the right. + + At the right, there's a SizeAwareStack. It can react to the available space and show + a fitting child widget at a time (if there is one that matches the current 'gap'). + + The SizeAwareStack is packed with WidgetStacks. + A WidgetStack can host several top-level child widgets but only one is shown at a time. + Each child widget can have 'trigger' control that (when set to 1 elsewhere) would enforce + the widget to be shown. + When a hidden WidgetStack is shown and no child's trigger is addressed the first child is picked. + As soon as that first child is shown its trigger control is set to 1 while the triggers of all + siblings are set to 0. Consider this example: + <WidgetStack> + <Children> + <WidgetGroup trigger="[LateNight],show_mini_deck"> // set to 1 + <WidgetGroup trigger="[LateNight],show_no_deck"> // set to 0 + <WidgetGroup trigger="[LateNight],show_full_deck"> // set to 0 + </Children> + </WidgetStack> + + The hack here is to use [LateNight],show_mini_deck to show/hide a widget in an entirely + different skin template and abuse the 1st-child trigger to remote-control it from here. + + --> <Template> - <!-- Extra wrapper so we can put multiple, independent size - detectors in here. --> - <!-- Set height to 0f to hide this. - Set height to any other size for visual debugging --> + <!-- Extra wrapper so we can put multiple, independent size detectors in here. --> + <!-- Set height to 0f to hide it. --> + <!-- Increase children's height >0 when needed for visual debugging --> <WidgetGroup> <Size>0me,0f</Size> <Layout>vertical</Layout> <ObjectName>AlignRight</ObjectName> <Children> - <!-- Deck selector. - Picks the approriate deck size to display --> <WidgetGroup> <Layout>horizontal</Layout> - <Size>300f,10f</Size> - <ObjectName>Spacer1e</ObjectName> + <Size>300f,0f</Size> <Children> - <!-- Widgets that define the remaining space, - visibility connected to skin controls --> + <!-- Widgets that define the remaining space according to enabled skin controls --> + <!-- maximize_library --> <WidgetGroup> <Connection> <ConfigKey>[Master],maximize_library</ConfigKey> <BindProperty>visible</BindProperty> </Connection> - <ObjectName>TEST1</ObjectName> <Layout>horizontal</Layout> <SizePolicy>min,f</SizePolicy> - <MinimumSize>200,10</MinimumSize> - <MaximumSize>300,10</MaximumSize> + <MinimumSize>200,0</MinimumSize> + <MaximumSize>300,0</MaximumSize> <Children> - <WidgetGroup><!-- minimal deck selected --> - <Size>300f,10f</Size> - <ObjectName>TEST2</ObjectName> + <!-- minimal deck selected --> + <WidgetGroup> + <Size>300f,0f</Size> <Connection> <ConfigKey persist="true">[LateNight],max_lib_show_decks</ConfigKey> <Transform><Not/></Transform> @@ -109,8 +100,10 @@ Description: </Connection> </WidgetGroup> </Children> - </WidgetGroup><!-- maximize_library --> + </WidgetGroup> + <!-- maximize_library --> + <!-- regular library --> <WidgetGroup> <Connection> <ConfigKey>[Master],maximize_library</ConfigKey> @@ -119,11 +112,11 @@ Description: </Connection> <Layout>horizontal</Layout> <SizePolicy>min,f</SizePolicy> - <MinimumSize>0,10</MinimumSize> - <MaximumSize>200,10</MaximumSize> + <MinimumSize>0,0</MinimumSize> + <MaximumSize>200,0</MaximumSize> <Children> - <!-- !show_mixer --> + <!-- no mixer --> <WidgetGroup> <Connection> |