<!--
Spinny template
Stacked waveforms: always show cover art in spinny
Split waveforms: show cover art in spinny when it is not showing in deck text row,
but do not show cover art in spinny when the cover art is showing right above it
in the deck text row.

Use smaller spinny sizes for 4 decks than 2 decks.
-->
<Template>
  <SingletonDefinition>
    <ObjectName>SpinnySingletonWithCover<Variable name="group"/></ObjectName>
    <Children>
      <Spinny>
        <TooltipId>spinny</TooltipId>
        <Group><Variable name="group"/></Group>
        <PathBackground scalemode="STRETCH">image/vinyl_spinny_background.svg</PathBackground>
        <PathForeground>image/vinyl_spinny_foreground.svg</PathForeground>
        <PathGhost>image/vinyl_spinny_foreground_ghost.svg</PathGhost>
        <PathMask>image/vinyl_spinny_cover_mask.svg</PathMask>
        <ShowCover>true</ShowCover>
      </Spinny>
    </Children>
  </SingletonDefinition>

  <SingletonDefinition>
    <ObjectName>SpinnySingletonNoCover<Variable name="group"/></ObjectName>
    <Children>
      <Spinny>
        <TooltipId>spinny</TooltipId>
        <Group><Variable name="group"/></Group>
        <PathBackground scalemode="STRETCH">image/vinyl_spinny_background.svg</PathBackground>
        <PathForeground>image/vinyl_spinny_foreground.svg</PathForeground>
        <PathGhost>image/vinyl_spinny_foreground_ghost.svg</PathGhost>
        <PathMask>image/vinyl_spinny_cover_mask.svg</PathMask>
        <ShowCover>false</ShowCover>
      </Spinny>
    </Children>
  </SingletonDefinition>

  <WidgetGroup>
    <ObjectName>SpinnyHolder</ObjectName>
    <Layout>horizontal</Layout>
    <SizePolicy>max,max</SizePolicy>
    <Children>

      <!-- ===================== TWO DECKS ===================== -->
      <WidgetGroup>
        <Layout>horizontal</Layout>
        <Children>

          <WidgetGroup>
            <Layout>horizontal</Layout>
            <Connection>
              <ConfigKey>[Deere],show_parallel_waveforms</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
            <Children>
              <SingletonContainer>
                  <ObjectName>SpinnySingletonWithCover<Variable name="group"/></ObjectName>
                  <Size>75f,75f</Size>
              </SingletonContainer>
            </Children>
          </WidgetGroup>

          <WidgetGroup>
            <Layout>horizontal</Layout>
            <Connection>
              <ConfigKey>[Deere],show_parallel_waveforms</ConfigKey>
              <BindProperty>visible</BindProperty>
              <Transform>
                <Not/>
              </Transform>
            </Connection>
            <Children>

              <WidgetGroup>
                <Layout>horizontal</Layout>
                <Connection>
                  <ConfigKey>[Master],show_coverart</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
                <Children>
                  <SingletonContainer>
                      <ObjectName>SpinnySingletonNoCover<Variable name="group"/></ObjectName>
                      <Size>75f,75f</Size>
                  </SingletonContainer>
                </Children>
              </WidgetGroup>

              <WidgetGroup>
                <Layout>horizontal</Layout>
                <Connection>
                  <ConfigKey>[Master],show_coverart</ConfigKey>
                  <BindProperty>visible</BindProperty>
                  <Transform>
                    <Not/>
                  </Transform>
                </Connection>
                <Children>
                  <SingletonContainer>
                      <ObjectName>SpinnySingletonWithCover<Variable name="group"/></ObjectName>
                      <Size>75f,75f</Size>
                  </SingletonContainer>
                </Children>
              </WidgetGroup>

            </Children>
          </WidgetGroup>

        </Children>
        <Connection>
          <ConfigKey>[Master],show_4decks</ConfigKey>
          <Transform>
            <Not/>
          </Transform>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup>


      <!-- ===================== FOUR DECKS ===================== -->
      <WidgetGroup>
        <Layout>horizontal</Layout>
        <Children>
          <WidgetGroup>
            <Layout>horizontal</Layout>
            <Connection>
              <ConfigKey>[Deere],show_parallel_waveforms</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
            <Children>
              <SingletonContainer>
                  <ObjectName>SpinnySingletonWithCover<Variable name="group"/></ObjectName>
                  <Size>55f,55f</Size>
              </SingletonContainer>
            </Children>
          </WidgetGroup>

          <WidgetGroup>
            <Layout>horizontal</Layout>
            <Connection>
              <ConfigKey>[Deere],show_parallel_waveforms</ConfigKey>
              <BindProperty>visible</BindProperty>
              <Transform>
                <Not/>
              </Transform>
            </Connection>
            <Children>

              <WidgetGroup>
                <Layout>horizontal</Layout>
                <Connection>
                  <ConfigKey>[Master],show_coverart</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
                <Children>
                  <SingletonContainer>
                      <ObjectName>SpinnySingletonNoCover<Variable name="group"/></ObjectName>
                      <Size>55f,55f</Size>
                  </SingletonContainer>
                </Children>
              </WidgetGroup>

              <WidgetGroup>
                <Layout>horizontal</Layout>
                <Connection>
                  <ConfigKey>[Master],show_coverart</ConfigKey>
                  <BindProperty>visible</BindProperty>
                  <Transform>
                    <Not/>
                  </Transform>
                </Connection>
                <Children>
                  <SingletonContainer>
                      <ObjectName>SpinnySingletonWithCover<Variable name="group"/></ObjectName>
                      <Size>55f,55f</Size>
                  </SingletonContainer>
                </Children>
              </WidgetGroup>

            </Children>
          </WidgetGroup>
        </Children>
        <Connection>
          <ConfigKey>[Master],show_4decks</ConfigKey>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup>
    </Children>
    <Connection>
      <ConfigKey>[Master],show_spinnies</ConfigKey>
      <BindProperty>visible</BindProperty>
    </Connection>
  </WidgetGroup>
</Template>
