<!--
Description:
  Knob for chosen QuickEffect with an enable button next to it.
  A 'button' underneath the knob turns grey when QuickEffect is disabled.
Variables:
  PotiMinAngle: -135°, see skin.xml
  PotiMaxAngle: 135°, see skin.xml
  group       : affected group
-->
<Template>
  <SetVariable name="QuickFxGroup">[QuickEffectRack1_<Variable name="group"/>]</SetVariable>
  <SetVariable name="QuickFx">[QuickEffectRack1_<Variable name="group"/>_Effect1]</SetVariable>
  <WidgetGroup>
    <ObjectName>EQKnobContainerLeft</ObjectName>
    <SizePolicy>min,min</SizePolicy>
    <Layout>vertical</Layout>
    <Children>
      <WidgetGroup>
        <Layout>vertical</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>

          <WidgetGroup>
            <Layout>horizontal</Layout>
            <SizePolicy>min,min</SizePolicy>
            <Children>
              <!-- QuickEffect knob + Enable indicator underneath -->
              <WidgetGroup>
                <SizePolicy>min,min</SizePolicy>
                <Layout>stacked</Layout>
                <Children>
                  <KnobComposed>
                    <TooltipId>QuickEffectRack_super1</TooltipId>
                    <Size>30f,26f</Size>
                    <Knob>knobs_sliders/knob_blue.svg</Knob>
                    <BackPath>knobs_sliders/knob_bg.svg</BackPath>
                    <MinAngle><Variable name="PotiMinAngle"/></MinAngle>
                    <MaxAngle><Variable name="PotiMaxAngle"/></MaxAngle>
                    <KnobCenterYOffset>2.000</KnobCenterYOffset>
                    <Connection>
                      <ConfigKey><Variable name="QuickFxGroup"/>,super1</ConfigKey>
                    </Connection>
                  </KnobComposed>

                  <Template src="skin:button_2state.xml">
                    <SetVariable name="ObjectName">QuickFxDisabledUnderlay</SetVariable>
                    <SetVariable name="Size">30f,26f</SetVariable>
                    <SetVariable name="ConfigKey"><Variable name="QuickFx"/>,enabled</SetVariable>
                  </Template>
                </Children>
              </WidgetGroup>

              <!-- QuickFx enable button at the SIDE when an EQ is loaded
              AND when EQ Kill buttons are visible -->
              <WidgetGroup>
                <ObjectName>AlignVCenter</ObjectName>
                <SizePolicy>min,me</SizePolicy>
                <Layout>vertical</Layout>
                <Children>
                  <WidgetGroup>
                    <ObjectName>AlignVCenter</ObjectName>
                    <SizePolicy>min,me</SizePolicy>
                    <Layout>vertical</Layout>
                    <Children>
                      <Template src="skin:button_2state.xml">
                        <SetVariable name="TooltipId">QuickEffectRack_enabled</SetVariable>
                        <SetVariable name="ObjectName">QuickFxEnableButton_Side</SetVariable>
                        <SetVariable name="Size">12f,24f</SetVariable>
                        <SetVariable name="ConfigKey"><Variable name="QuickFx"/>,enabled</SetVariable>
                      </Template>
                    </Children>
                    <Connection>
                      <ConfigKey>[Master],show_eq_kill_buttons</ConfigKey>
                      <BindProperty>visible</BindProperty>
                    </Connection>
                  </WidgetGroup>
                </Children>
                <Connection>
                  <ConfigKey>[EqualizerRack1_[Channel<Variable name="chanNum"/>]_Effect1],loaded</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup>
              
            </Children>
          </WidgetGroup>

          <!-- QuickFx enable button BELOW when an EQ plugin is loaded AND Kill buttons are hidden -->
          <WidgetGroup>
            <ObjectName>AlignVCenter</ObjectName>
            <SizePolicy>min,me</SizePolicy>
            <Layout>vertical</Layout>
            <Children>
              <WidgetGroup>
                <ObjectName>AlignVCenter</ObjectName>
                <SizePolicy>min,me</SizePolicy>
                <Layout>vertical</Layout>
                <Children>
                  <Template src="skin:button_2state.xml">
                    <SetVariable name="TooltipId">QuickEffectRack_enabled</SetVariable>
                    <SetVariable name="ObjectName">QuickFxEnableButton_Bottom</SetVariable>
                    <SetVariable name="Size">30f,16f</SetVariable>
                    <SetVariable name="ConfigKey"><Variable name="QuickFx"/>,enabled</SetVariable>
                  </Template>
                </Children>
                <Connection>
                  <ConfigKey>[Master],show_eq_kill_buttons</ConfigKey>
                  <Transform><Not/></Transform>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup>
            </Children>
            <Connection>
              <ConfigKey>[EqualizerRack1_[Channel<Variable name="chanNum"/>]_Effect1],loaded</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>
          <!-- /QuickFx enable button BELOW when an EQ plugin is loaded AND Kill buttons are hidden -->

          <!-- QuickFx enable button BELOW when no EQ plugin is loaded -->
          <WidgetGroup>
            <ObjectName>AlignVCenter</ObjectName>
            <SizePolicy>min,me</SizePolicy>
            <Layout>vertical</Layout>
            <Children>
              <Template src="skin:button_2state.xml">
                <SetVariable name="TooltipId">QuickEffectRack_enabled</SetVariable>
                <SetVariable name="ObjectName">QuickFxEnableButton_Bottom</SetVariable>
                <SetVariable name="Size">30f,16f</SetVariable>
                <SetVariable name="ConfigKey"><Variable name="QuickFx"/>,enabled</SetVariable>
              </Template>
            </Children>
            <Connection>
              <ConfigKey>[EqualizerRack1_[Channel<Variable name="chanNum"/>]_Effect1],loaded</ConfigKey>
              <Transform><Not/></Transform>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>
          <!-- /QuickFx enable button BELOW when no EQ plugin is loaded -->

        </Children>
        <Connection>
          <ConfigKey><Variable name="QuickFx"/>,loaded</ConfigKey>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup><!-- /QuickEffect knob + enable button -->

      <WidgetGroup><!-- Spacer when no QuickEffect is loaded -->
        <Size>0min,30f</Size>
        <Connection>
          <ConfigKey><Variable name="QuickFx"/>,loaded</ConfigKey>
          <Transform><Not/></Transform>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup>
    </Children>
  </WidgetGroup>
</Template>
