<!--
Description:
  The channel mixer containing
  * EQ knobs incl. Kill buttons ] if enabled
  * QuickEffect knob            ]
  * Headphone cue button
  * Volume slider
  * Gain knob
  * VUMeter
Variables:
  group : [ChannelXY]
-->
<Template>
  <WidgetGroup>
    <ObjectName>MixerChannelRight</ObjectName>
    <Layout>horizontal</Layout>
    <Size>-1min,136f</Size>
    <Children>

      <WidgetGroup><!-- VU Meter + Pfl button -->
        <ObjectName>AlignCenter</ObjectName>
        <Layout>vertical</Layout>
        <Children>
          <Template src="skin:../Tango/mixer/vumeter_mixer.xml"/>
            <WidgetGroup><Size>1min,5f</Size></WidgetGroup>

          <WidgetGroup><!-- Pfl button, isolated with a 'gap' -->
            <ObjectName>PflBoxRight</ObjectName>
            <Size>25f,25f</Size>
            <Layout>stacked</Layout>
            <Children>
              <!-- Greyed out if no headphone device is configured -->
              <Template src="skin:../Tango/helpers/pfl_cover.xml"/>
              <Template src="skin:../Tango/controls/button_2state.xml">
                <SetVariable name="TooltipId">pfl</SetVariable>
                <SetVariable name="ObjectName">PflButton</SetVariable>
                <SetVariable name="Size">24f,24f</SetVariable>
                <SetVariable name="state_0_icon">pfl_off.svg</SetVariable>
                <SetVariable name="state_1_icon">pfl_on.svg</SetVariable>
                <SetVariable name="ConfigKey"><Variable name="group"/>,pfl</SetVariable>
              </Template>
            </Children>
          </WidgetGroup><!-- /Pfl button, isolated with a 'gap' -->
        </Children>
      </WidgetGroup><!-- /VU Meter + Pfl button -->

      <WidgetGroup><!--  Volume Slider + Gain knob -->
        <ObjectName>VolumeSliderGain</ObjectName>
        <Layout>vertical</Layout>
        <SizePolicy>f,min</SizePolicy>
        <Children>
          <SliderComposed><!-- Volume slider -->
            <Size>34f,103f</Size>
            <ObjectName>VolumeSlider</ObjectName>
            <TooltipId>channel_volume</TooltipId>
            <Slider scalemode="STRETCH_ASPECT">skin:../Tango/knobs_sliders/volume_scale.svg</Slider>
            <Handle scalemode="STRETCH_ASPECT">skin:../Tango/knobs_sliders/volume_handle.svg</Handle>
            <Horizontal>false</Horizontal>
            <Connection>
              <ConfigKey><Variable name="group"/>,volume</ConfigKey>
            </Connection>
          </SliderComposed><!-- /Volume slider -->

          <WidgetGroup><Size>1min,0me</Size></WidgetGroup>

          <!-- Gain knob, centered below Volume slider -->
          <Template src="skin:../Tango/controls/knob_textless.xml">
            <SetVariable name="ObjectName">GainKnob</SetVariable>
            <SetVariable name="TooltipId">pregain</SetVariable>
            <SetVariable name="Size">34f,30f</SetVariable>
            <SetVariable name="Color">yellow</SetVariable>
            <SetVariable name="group"><Variable name="group"/></SetVariable>
            <SetVariable name="ConfigKey">pregain</SetVariable>
          </Template>

        </Children>
      </WidgetGroup><!-- /Volume Slider + Gain knob -->

      <WidgetGroup><!-- Spacer when EQ plugin is loaded & Kill buttons are shown -->
        <SizePolicy>min,min</SizePolicy>
        <Layout>vertical</Layout>
        <Children>
          <WidgetGroup>
            <Size>4f,0min</Size>
            <Connection>
              <ConfigKey>[Skin],show_eq_kill_buttons</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>
        </Children>
        <Connection>
          <ConfigKey><Variable name="FxRack_FxUnit_FxNum"/>,loaded</ConfigKey>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup>

      <WidgetGroup><!-- EQ + QuickEffect knobs/buttons -->
        <Layout>vertical</Layout>
        <SizePolicy>max,min</SizePolicy>
        <Children>
          <WidgetGroup><Size>1min,4f</Size></WidgetGroup>
          <Template src="skin:../Tango/mixer/eq_knob_right.xml"><!-- High EQ -->
            <SetVariable name="FxParameter">3</SetVariable>
          </Template>
          <Template src="skin:../Tango/mixer/eq_knob_right.xml"><!-- Mid EQ -->
            <SetVariable name="FxParameter">2</SetVariable>
          </Template>
          <Template src="skin:../Tango/mixer/eq_knob_right.xml"><!-- Low EQ -->
            <SetVariable name="FxParameter">1</SetVariable>
          </Template>
          <Template src="skin:../Tango/mixer/quick_fx_knob_right.xml"/><!-- Quick Effect -->
        </Children>
        <Connection>
          <ConfigKey persist="true">[Skin],show_eq_knobs</ConfigKey>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup><!-- /EQ + QuickEffect knobs/buttons -->

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

      <WidgetGroup><ObjectName>Spacer0f</ObjectName><Size>1f,1me</Size></WidgetGroup>

    </Children>
  </WidgetGroup>
</Template>
