<Template>
  <WidgetGroup>
    <Layout>vertical</Layout>
    <SizePolicy>max,min</SizePolicy>
    <Children>

      <!-- spacer to center channel controls without crossfader without
          stretching them -->
      <WidgetGroup><SizePolicy>min,e</SizePolicy></WidgetGroup>

      <WidgetGroup><!-- Channel controls -->
        <ObjectName>AlignHCenter</ObjectName>
        <SizePolicy>min,min</SizePolicy>
        <Layout>horizontal</Layout>
        <Children>

          <Template src="skins:LateNight/mixer/channel_left.xml">
            <SetVariable name="ChanNum">1</SetVariable>
            <SetVariable name="xfaderLeft">default</SetVariable>
            <SetVariable name="xfaderRight">warning</SetVariable>
          </Template>

          <WidgetGroup><!-- Pfl + VU -->
            <Layout>vertical</Layout>
            <SizePolicy>max,max</SizePolicy>
            <Children>

              <WidgetGroup>
                <ObjectName></ObjectName>
                <Layout>horizontal</Layout>
                <Size>0min,26f</Size>
                <Children>
                  <Template src="skins:LateNight/controls/button_2state.xml">
                    <SetVariable name="TooltipId">pfl</SetVariable>
                    <SetVariable name="ObjectName">PflButton</SetVariable>
                    <SetVariable name="Size">26f,26f</SetVariable>
                    <SetVariable name="BtnSize">square</SetVariable>
                    <SetVariable name="ConfigKey">[Channel1],pfl</SetVariable>
                  </Template>
                  <WidgetGroup><Size>3f,0min</Size></WidgetGroup>
                  <Template src="skins:LateNight/controls/button_2state.xml">
                    <SetVariable name="TooltipId">pfl</SetVariable>
                    <SetVariable name="ObjectName">PflButton</SetVariable>
                    <SetVariable name="Size">26f,26f</SetVariable>
                    <SetVariable name="BtnSize">square</SetVariable>
                    <SetVariable name="ConfigKey">[Channel2],pfl</SetVariable>
                  </Template>
                </Children>
              </WidgetGroup>

              <WidgetGroup><Size>1min,13f</Size></WidgetGroup>

              <WidgetGroup>
                <ObjectName>VuMeterBoxFull</ObjectName>
                <Layout>horizontal</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <SingletonContainer>
                    <ObjectName>VuMeterChannel1</ObjectName>
                  </SingletonContainer>
                  <WidgetGroup><Size>7f,0min</Size></WidgetGroup>
                  <SingletonContainer>
                    <ObjectName>VuMeterMain_Dark</ObjectName>
                  </SingletonContainer>
                  <WidgetGroup><Size>7f,0min</Size></WidgetGroup>
                  <SingletonContainer>
                    <ObjectName>VuMeterChannel2</ObjectName>
                  </SingletonContainer>
                </Children>
              </WidgetGroup>
            </Children>
          </WidgetGroup><!-- Pfl + VU -->

          <Template src="skins:LateNight/mixer/channel_right.xml">
            <SetVariable name="ChanNum">2</SetVariable>
            <SetVariable name="xfaderLeft">warning</SetVariable>
            <SetVariable name="xfaderRight">default</SetVariable>
          </Template>

        </Children>
      </WidgetGroup><!-- /Channel controls -->

      <WidgetGroup><!-- Crossfader + Channel1/2 assign switches -->
        <ObjectName>CrossfaderAndSwitches2Decks</ObjectName>
        <Layout>horizontal</Layout>
        <Children>

          <!-- Channel 1 Quick effect selector + xFader switch -->
          <WidgetGroup>
            <Layout>vertical</Layout>
            <SizePolicy>min,min</SizePolicy>
            <Children>
              <!-- Quick effect selector -->
              <WidgetGroup>
                <SizePolicy>i,f</SizePolicy>
                <MinimumSize>,18</MinimumSize>
                <MaximumSize>,18</MaximumSize>
                <Layout>vertical</Layout>
                <Children>
                  <EffectChainPresetSelector>
                    <ObjectName>QuickEffectSelectorLeft</ObjectName>
                    <Size>40me,18f</Size>
                    <EffectUnitGroup>[QuickEffectRack1_[Channel1]]</EffectUnitGroup>
                  </EffectChainPresetSelector>
                </Children>
                <Connection>
                  <ConfigKey persist="true">[Skin],show_eq_knobs</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup>

              <!-- xfader switch -->
              <WidgetGroup>
                <Layout>horizontal</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <!-- center xfader buttons below EQ knobs -->
                  <WidgetGroup>
                    <Layout>horizontal</Layout>
                    <SizePolicy>min,min</SizePolicy>
                    <Children>
                      <WidgetGroup><Size>2f,0min</Size></WidgetGroup>
                      <WidgetGroup>
                        <Size>18f,0min</Size>
                        <Connection>
                          <ConfigKey persist="true">[Skin],show_eq_kill_buttons</ConfigKey>
                          <BindProperty>visible</BindProperty>
                        </Connection>
                      </WidgetGroup>
                    </Children>
                    <Connection>
                      <ConfigKey persist="true">[Skin],show_eq_knobs</ConfigKey>
                      <BindProperty>visible</BindProperty>
                    </Connection>
                  </WidgetGroup><!-- spacer -->

                  <WidgetGroup>
                    <Layout>vertical</Layout>
                    <SizePolicy>min,min</SizePolicy>
                    <Children>
                      <WidgetGroup><Size>min,2f</Size></WidgetGroup>
                      <Template src="skins:LateNight/controls/button_xfader_deck.xml">
                        <SetVariable name="Group">[Channel1]</SetVariable>
                        <SetVariable name="xfaderLeft">default</SetVariable>
                        <SetVariable name="xfaderRight">warning</SetVariable>
                      </Template>
                    </Children>
                    <Connection>
                      <ConfigKey persist="true">[Skin],show_xfader</ConfigKey>
                      <BindProperty>visible</BindProperty>
                    </Connection>
                  </WidgetGroup>

                  <WidgetGroup><Size>0me,0min</Size></WidgetGroup>
                </Children>
              </WidgetGroup><!-- xfader switch -->

            </Children>
          </WidgetGroup><!-- Channel 1 Quick effect selector + xFader switch -->

          <!--  Regular crossfader for
                * 2 decks with EQ knobs visible
                * 4 decks
                Narrow crossfader for
                * 2 decks with EQ knobs hidden -->
          <WidgetGroup>
            <ObjectName>CrossfaderContainer</ObjectName>
            <Layout>horizontal</Layout>
            <SizePolicy>max,min</SizePolicy>
            <Children>

              <WidgetGroup><!-- with EQ knobs -->
                <Layout>horizontal</Layout>
                <SizePolicy>max,min</SizePolicy>
                <Children>
                  <SingletonContainer>
                    <ObjectName>CrossfaderSingleton</ObjectName>
                  </SingletonContainer>
                </Children>
                <Connection>
                  <ConfigKey persist="true">[Skin],show_eq_knobs</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup>


              <SliderComposed><!-- without EQ knobs -->
                <TooltipId>crossfader</TooltipId>
                <Size>85f,40f</Size>
                <Handle scalemode="STRETCH_ASPECT">skins:LateNight/<Variable name="SliderScheme"/>/sliders/knob_crossfader.svg</Handle>
                <Slider scalemode="STRETCH_ASPECT">skins:LateNight/<Variable name="SliderScheme"/>/sliders/slider_crossfader_small.svg</Slider>
                <Horizontal>true</Horizontal>
                <BarColor><Variable name="BarColorCrossfader"/></BarColor>
                <BarWidth><Variable name="BarWidth"/></BarWidth>
                <BarMargins><Variable name="BarMarginCrossfader"/></BarMargins>
                <BarMargins><Variable name="BarMarginVolume"/></BarMargins>
                <BarRoundCaps>true</BarRoundCaps>
                <BarAxisPos>19.0</BarAxisPos>
                <BarUnipolar>false</BarUnipolar>
                <Connection>
                  <ConfigKey>[Master],crossfader</ConfigKey>
                </Connection>
                <Connection>
                  <ConfigKey persist="true">[Skin],show_eq_knobs</ConfigKey>
                  <BindProperty>visible</BindProperty>
                  <Transform><Not/></Transform>
                </Connection>
              </SliderComposed>

            </Children>
            <Connection>
              <ConfigKey persist="true">[Skin],show_xfader</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup><!-- CrossfaderContainer -->

          <!-- Channel 2 Quick effect selector + xFader switch -->
          <WidgetGroup>
            <Layout>vertical</Layout>
            <SizePolicy>min,min</SizePolicy>
            <Children>

              <!-- Quick effect selector -->
              <WidgetGroup>
                <SizePolicy>i,f</SizePolicy>
                <MinimumSize>,18</MinimumSize>
                <MaximumSize>,18</MaximumSize>
                <Layout>vertical</Layout>
                <Children>
                  <EffectChainPresetSelector>
                    <ObjectName>QuickEffectSelectorRight</ObjectName>
                    <Size>40me,18f</Size>
                    <EffectUnitGroup>[QuickEffectRack1_[Channel2]]</EffectUnitGroup>
                  </EffectChainPresetSelector>
                </Children>
                <Connection>
                  <ConfigKey persist="true">[Skin],show_eq_knobs</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup>

              <!-- xfader switch -->
              <WidgetGroup>
                <Layout>horizontal</Layout>
                <SizePolicy>min,me</SizePolicy>
                <Children>
                  <WidgetGroup><Size>0me,0min</Size></WidgetGroup>

                  <WidgetGroup>
                    <Layout>vertical</Layout>
                    <SizePolicy>min,min</SizePolicy>
                    <Children>
                      <WidgetGroup><Size>min,2f</Size></WidgetGroup>
                      <Template src="skins:LateNight/controls/button_xfader_deck.xml">
                        <SetVariable name="Group">[Channel2]</SetVariable>
                        <SetVariable name="xfaderLeft">warning</SetVariable>
                        <SetVariable name="xfaderRight">default</SetVariable>
                      </Template>
                    </Children>
                    <Connection>
                      <ConfigKey persist="true">[Skin],show_xfader</ConfigKey>
                      <BindProperty>visible</BindProperty>
                    </Connection>
                  </WidgetGroup>

                  <!-- center xfader buttons below EQ knobs -->
                  <WidgetGroup>
                    <Layout>horizontal</Layout>
                    <SizePolicy>min,min</SizePolicy>
                    <Children>
                      <WidgetGroup><Size>2f,0min</Size></WidgetGroup>
                      <WidgetGroup>
                        <Size>18f,0min</Size>
                        <Connection>
                          <ConfigKey persist="true">[Skin],show_eq_kill_buttons</ConfigKey>
                          <BindProperty>visible</BindProperty>
                        </Connection>
                      </WidgetGroup>
                    </Children>
                    <Connection>
                      <ConfigKey persist="true">[Skin],show_eq_knobs</ConfigKey>
                      <BindProperty>visible</BindProperty>
                    </Connection>
                  </WidgetGroup><!-- spacer -->
                </Children>
              </WidgetGroup><!-- xfader switch -->

            </Children>
          </WidgetGroup><!-- Channel 2 Quick effect selector + xFader switch -->

        </Children>
      </WidgetGroup><!-- /Crossfader + Channel1/2 assign switches -->

      <!-- spacer to center channel controls without crossfader without
          stretching them -->
      <WidgetGroup><SizePolicy>min,e</SizePolicy></WidgetGroup>

    </Children>
    <Connection>
      <ConfigKey persist="true">[Skin],show_4decks</ConfigKey>
      <Transform><Not/></Transform>
      <BindProperty>visible</BindProperty>
    </Connection>
  </WidgetGroup><!-- MixerDecks -->
</Template>
