<!DOCTYPE template>
<!--
  Description:
    The deck mixer controls.
-->
<Template>
  <SetVariable name="group">[Channel<Variable name="i"/>]</SetVariable>
  <WidgetGroup>
    <ObjectName>DeckMixer_Column2</ObjectName>
    <Layout>vertical</Layout>
    <SizePolicy>max,me</SizePolicy>
    <Children>

      <!-- PFL buttons need different spacing in 2 and 4 deck mixers. -->
      <WidgetGroup><!-- 2 decks -->
        <ObjectName>ButtonContainer</ObjectName>
        <Layout>horizontal</Layout>
        <Size>40f,35f</Size>
        <Children>
          <Template src="skin:left_2state_button.xml">
            <SetVariable name="TooltipId">pfl</SetVariable>
            <SetVariable name="ObjectName">DeckPFLButton</SetVariable>
            <SetVariable name="MinimumSize">22,22</SetVariable>
            <SetVariable name="MaximumSize">22,22</SetVariable>
            <SetVariable name="SizePolicy"><Variable name="SquareButtonSizePolicy"/></SetVariable>
            <SetVariable name="state_0_text"></SetVariable>
            <SetVariable name="state_0_pressed">icon/ic_headphones_48px.svg</SetVariable>
            <SetVariable name="state_0_unpressed">icon/ic_headphones_48px.svg</SetVariable>
            <SetVariable name="state_1_text"></SetVariable>
            <SetVariable name="state_1_pressed">icon/ic_headphones_48px.svg</SetVariable>
            <SetVariable name="state_1_unpressed">icon/ic_headphones_48px.svg</SetVariable>
            <SetVariable name="left_connection_control"><Variable name="group"/>,pfl</SetVariable>
          </Template>
        </Children>
        <Connection>
          <ConfigKey>[Master],show_4decks</ConfigKey>
          <BindProperty>visible</BindProperty>
          <Transform>
            <Not/>
          </Transform>
        </Connection>
      </WidgetGroup><!-- 2 decks -->

      <WidgetGroup><!-- 4 decks -->
        <ObjectName>ButtonContainer</ObjectName>
        <Size>-1me,28f</Size>
        <Layout>horizontal</Layout>
        <Children>
          <Template src="skin:left_2state_button.xml">
            <SetVariable name="TooltipId">pfl</SetVariable>
            <SetVariable name="ObjectName">DeckPFLButton</SetVariable>
            <!-- make Pfl button bigger because it's important and space is occupied anyway -->
            <SetVariable name="MinimumSize">22,22</SetVariable>
            <SetVariable name="MaximumSize">22,22</SetVariable>
            <SetVariable name="SizePolicy"><Variable name="SquareButtonSizePolicy"/></SetVariable>
            <SetVariable name="state_0_text"></SetVariable>
            <SetVariable name="state_0_pressed">icon/ic_headphones_48px.svg</SetVariable>
            <SetVariable name="state_0_unpressed">icon/ic_headphones_48px.svg</SetVariable>
            <SetVariable name="state_1_text"></SetVariable>
            <SetVariable name="state_1_pressed">icon/ic_headphones_48px.svg</SetVariable>
            <SetVariable name="state_1_unpressed">icon/ic_headphones_48px.svg</SetVariable>
            <SetVariable name="left_connection_control"><Variable name="group"/>,pfl</SetVariable>
          </Template>
        </Children>
        <Connection>
          <ConfigKey>[Master],show_4decks</ConfigKey>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup><!-- 4 decks -->

      <WidgetGroup>
        <ObjectName>VolumeSlider</ObjectName>
        <Layout>vertical</Layout>
        <Children>

          <WidgetGroup>
            <ObjectName>ChannelVolume</ObjectName>
            <Layout>vertical</Layout>
            <Children>
              <SliderComposed>
                <TooltipId>channel_volume</TooltipId>
                <SizePolicy>min,me</SizePolicy>
                <MinimumSize>40,50</MinimumSize>
                <MaximumSize>40,150</MaximumSize>
                <Slider scalemode="STRETCH">slider-vertical.svg</Slider>
                <Handle scalemode="STRETCH_ASPECT">handle-vertical-orange.svg</Handle>
                <Horizontal>false</Horizontal>
                <Connection>
                  <ConfigKey><Variable name="group"/>,volume</ConfigKey>
                  <EmitOnDownPress>false</EmitOnDownPress>
                </Connection>
              </SliderComposed>
            </Children>
            <Connection>
              <ConfigKey>[Master],show_4decks</ConfigKey>
              <BindProperty>visible</BindProperty>
              <Transform>
                <Not/>
              </Transform>
            </Connection>
          </WidgetGroup>

          <WidgetGroup>
            <ObjectName>ChannelVolume</ObjectName>
            <Layout>vertical</Layout>
            <Size>40min,80me</Size>
            <Children>
              <SliderComposed>
                <TooltipId>channel_volume</TooltipId>
                <SizePolicy>min,me</SizePolicy>
                <MinimumSize>40,80</MinimumSize>
                <Slider scalemode="STRETCH">slider-vertical.svg</Slider>
                <Handle scalemode="STRETCH_ASPECT">handle-vertical-orange.svg</Handle>
                <Horizontal>false</Horizontal>
                <Connection>
                  <ConfigKey><Variable name="group"/>,volume</ConfigKey>
                  <EmitOnDownPress>false</EmitOnDownPress>
                </Connection>
              </SliderComposed>
            </Children>
            <Connection>
              <ConfigKey>[Master],show_4decks</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>

        </Children>
      </WidgetGroup><!-- VolumeSlider -->

      <WidgetGroup>
        <ObjectName>ButtonContainer</ObjectName>
        <Layout>horizontal</Layout>
        <Size>-1me,28f</Size>
        <Children>
          <Template src="skin:crossfader_orientation_button.xml">
            <SetVariable name="Unit">Deck<Variable name="i"/></SetVariable>
          </Template>
        </Children>
        <Connection>
          <ConfigKey>[Master],show_4decks</ConfigKey>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup>
    </Children>
    <Connection>
      <ConfigKey>[Master],show_faders</ConfigKey>
      <BindProperty>visible</BindProperty>
    </Connection>
  </WidgetGroup>
</Template>
