<!--
Description:
  An EQ knob with a Kill button next to it.
  A 'button' underneath the knob turns grey when EQ range is killed.
Variables:
  PotiMinAngle: -135°, see skin.xml
  PotiMaxAngle: 135°, see skin.xml
  group       : affected group
  parameter   : 1, 2, 3 (low, mid, high)
-->
<Template>
  <SetVariable name="FxNum">1</SetVariable>
  <SetVariable name="FxRack_FxUnit_FxNum">[EqualizerRack1_<Variable name="group"/>_Effect1]</SetVariable>

  <WidgetGroup>
    <ObjectName>EQKnobContainerRight</ObjectName>
    <SizePolicy>min,min</SizePolicy>
    <Layout>vertical</Layout>
    <Children>

      <WidgetGroup><!-- EQ knob + Kill button -->
        <SizePolicy>max,min</SizePolicy>
        <Layout>horizontal</Layout>
        <Children>
          <!-- EQ knob + Kill indicator underneath -->
          <WidgetGroup>
            <SizePolicy>min,min</SizePolicy>
            <Layout>stacked</Layout>
            <Children>
              <EffectParameterKnobComposed>
                <ObjectName>EQKnob</ObjectName>
                <Size>30f,26f</Size>
                <Knob>skin:../Tango/knobs_sliders/knob_white.svg</Knob>
                <BackPath>skin:../Tango/knobs_sliders/knob_bg.svg</BackPath>
                <MinAngle><Variable name="PotiMinAngle"/></MinAngle>
                <MaxAngle><Variable name="PotiMaxAngle"/></MaxAngle>
                <KnobCenterYOffset>2.000</KnobCenterYOffset>
                <Connection>
                  <ConfigKey><Variable name="FxRack_FxUnit_FxNum"/>,parameter<Variable name="FxParameter"/></ConfigKey>
                </Connection>
              </EffectParameterKnobComposed>

              <Template src="skin:../Tango/fx/button.xml">
                <SetVariable name="ObjectName">EQKilledUnderlay</SetVariable>
                <SetVariable name="Size">30f,26f</SetVariable>
                <SetVariable name="FxParameter">button_parameter<Variable name="FxParameter"/></SetVariable>
              </Template>
            </Children>
          </WidgetGroup><!-- /EQ knob + Kill indicator underneath -->

          <!-- Kill button -->
          <WidgetGroup>
            <SizePolicy>min,min</SizePolicy>
            <Layout>horizontal</Layout>
            <Children>
              <Template src="skin:../Tango/fx/button.xml">
                <SetVariable name="ObjectName">EQKillButton</SetVariable>
                <SetVariable name="Size">12f,30f</SetVariable>
                <SetVariable name="FxParameter">button_parameter<Variable name="FxParameter"/></SetVariable>
              </Template>
            </Children>
            <Connection>
              <ConfigKey persist="true">[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><!-- /EQ knob + Kill button -->

      <WidgetGroup><!-- Spacer when no EQ plugin is loaded -->
        <Size>0min,26min</Size>
        <Connection>
          <ConfigKey><Variable name="FxRack_FxUnit_FxNum"/>,loaded</ConfigKey>
          <Transform><Not/></Transform>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup><!-- /Spacer -->

  <!-- One of those 4px spacers in between EQ knobs appears if
      a) EQ Kill buttons are enabled   or
      b) EQ Kill buttons are hidden and no QuickEffect is loaded
      This allows a narrow knob column. -->
      <WidgetGroup>
        <Size>0min,4f</Size>
        <Connection>
          <ConfigKey persist="true">[Skin],show_eq_kill_buttons</ConfigKey>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup>

      <WidgetGroup>
        <Layout>horizontal</Layout>
        <Children>
          <WidgetGroup>
            <Size>0min,4f</Size>
            <Connection>
              <ConfigKey persist="true"><Variable name="QuickFx"/>,loaded</ConfigKey>
              <Transform><Not/></Transform>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>
        </Children>
        <Connection>
          <ConfigKey persist="true">[Skin],show_eq_kill_buttons</ConfigKey>
          <Transform><Not/></Transform>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup>

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