<Template>
  <SetVariable name="group">[Channel<Variable name="i"/>]</SetVariable>
  <WidgetGroup>
    <ObjectName>DeckSmall</ObjectName>
    <Layout>vertical</Layout>
    <Children>

      <WidgetGroup>
        <ObjectName>Deck<Variable name="i" /></ObjectName>
        <Layout>horizontal</Layout>
        <SizePolicy>i,min</SizePolicy>
        <Children>
          <WidgetGroup>
            <Layout>horizontal</Layout>
            <Children>

              <!-- Spinny? -->

              <WidgetGroup>
                <Layout>horizontal</Layout>
                <Size>40f,46f</Size>
                <Children>
                  <SingletonContainer>
                    <ObjectName>DeckCoverArt<Variable name="i"/></ObjectName>
                  </SingletonContainer>
                </Children>
                <Connection>
                  <ConfigKey persist="true">[Skin],show_coverart</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup>

              <WidgetGroup>
                <ObjectName>OverviewGutterSmall</ObjectName>
                <Layout>horizontal</Layout>
                <Size>200me,46f</Size>
                <Children>
                  <SingletonContainer>
                    <ObjectName>DeckOverview<Variable name="i"/></ObjectName>
                  </SingletonContainer>
                </Children>
              </WidgetGroup>

              <WidgetGroup>
                <ObjectName>DeckTextRowSmall</ObjectName>
                <Layout>vertical</Layout>
                <Size>200min,46f</Size>
                <Children>

                  <WidgetGroup><!-- Title/*** / PlayPos -->
                    <Layout>horizontal</Layout>
                    <Size>200min,23f</Size>
                    <Children>

                      <WidgetGroup>
                        <ObjectName>TitleGutterSmall</ObjectName>
                        <Layout>horizontal</Layout>
                        <Size>100me,23f</Size>
                        <Children>
                          <!-- We allow to hide track/artist info (aka AM-Mode) in the skin settings,
                              display just a label with asterixes instead. -->
                          <TrackProperty>
                            <TooltipId>track_title</TooltipId>
                            <ObjectName>TitleTextSmall</ObjectName>
                            <Size>100me,23f</Size>
                            <Property>titleInfo</Property>
                            <Group><Variable name="group"/></Group>
                            <Alignment>left</Alignment>
                            <Elide>right</Elide>
                            <Connection>
                              <ConfigKey>[Deere],show_track_info</ConfigKey>
                              <BindProperty>visible</BindProperty>
                            </Connection>
                          </TrackProperty>

                          <Label>
                            <TooltipId>track_title</TooltipId>
                            <Size>me,min</Size>
                            <ObjectName>TitleTextSmall</ObjectName>
                            <Alignment>left</Alignment>
                            <Text>***</Text>
                            <Connection>
                              <ConfigKey>[Deere],show_track_info</ConfigKey>
                              <BindProperty>visible</BindProperty>
                              <Transform>
                                <Not/>
                              </Transform>
                            </Connection>
                          </Label>
                        </Children>
                      </WidgetGroup><!-- TitleGutter -->

                      <NumberPos>
                        <TooltipId>track_time</TooltipId>
                        <ObjectName>PlayPositionTextSmall</ObjectName>
                        <Size>55min,23f</Size>
                        <Alignment>center</Alignment>
                        <Channel><Variable name="i"/></Channel>
                        <Connection>
                          <ConfigKey><Variable name="group"/>,playposition</ConfigKey>
                        </Connection>
                      </NumberPos>
                    </Children>
                  </WidgetGroup><!-- Title/*** / PlayPos -->

                  <TrackWidgetGroup>
                    <Size>0me,2f</Size>
                    <Group><Variable name="group"/></Group>
                    <TrackColorAlpha>255</TrackColorAlpha>
                  </TrackWidgetGroup>

                  <WidgetGroup><!-- Artist / Key / BPM -->
                    <ObjectName>ArtistKeyBpmGutterSmall</ObjectName>
                    <Layout>horizontal</Layout>
                    <Size>200min,21f</Size>
                    <Children>
                      <!-- We allow to hide track/artist info (aka AM-Mode) in the skin settings,
                          display just a label with asterixes instead. -->
                      <TrackProperty>
                        <TooltipId>track_artist</TooltipId>
                        <ObjectName>ArtistTextSmall</ObjectName>
                        <SizePolicy>me,me</SizePolicy>
                        <Property>artist</Property>
                        <Group><Variable name="group"/></Group>
                        <Elide>right</Elide>
                        <Connection>
                          <ConfigKey>[Deere],show_track_info</ConfigKey>
                          <BindProperty>visible</BindProperty>
                        </Connection>
                      </TrackProperty>

                      <Label>
                        <TooltipId>track_artist</TooltipId>
                        <Size>me,min</Size>
                        <ObjectName>ArtistTextSmall</ObjectName>
                        <Text>***</Text>
                        <Connection>
                          <ConfigKey>[Deere],show_track_info</ConfigKey>
                          <BindProperty>visible</BindProperty>
                          <Transform>
                            <Not/>
                          </Transform>
                        </Connection>
                      </Label>

                      <Key>
                        <TooltipId>visual_key</TooltipId>
                        <ObjectName>BpmKeyTextSmall</ObjectName>
                        <Group><Variable name="group"/></Group>
                        <Alignment>center</Alignment>
                        <Size>30min,22f</Size>
                        <Alignment>center</Alignment>
                        <Elide>right</Elide>
                        <Connection>
                          <ConfigKey><Variable name="group"/>,visual_key</ConfigKey>
                        </Connection>
                      </Key>

                      <NumberBpm>
                        <TooltipId>visual_bpm</TooltipId>
                        <ObjectName>BpmKeyTextSmall</ObjectName>
                        <Size>55min,22f</Size>
                        <Alignment>right</Alignment>
                        <NumberOfDigits>2</NumberOfDigits>
                        <Group><Variable name="group"/></Group>
                        <Connection>
                          <ConfigKey><Variable name="group"/>,visual_bpm</ConfigKey>
                        </Connection>
                      </NumberBpm>

                    </Children>
                  </WidgetGroup><!-- ArtistKeyBpmGutterSmall -->

                </Children>
              </WidgetGroup><!-- DeckTextRowSmall -->

              <WidgetGroup><!-- Cue + Play button -->
                <ObjectName>PlayCueContainer</ObjectName>
                <Layout>vertical</Layout>
                <Size>32min,46f</Size>
                <Children>

                  <Template src="skin:left_right_display_2state_button.xml">
                    <SetVariable name="TooltipId">cue_default_cue_gotoandstop</SetVariable>
                    <SetVariable name="ObjectName">DeckCue</SetVariable>
                    <SetVariable name="MinimumSize">30,21</SetVariable>
                    <SetVariable name="MaximumSize">30,21</SetVariable>
                    <SetVariable name="SizePolicy">f,f</SetVariable>
                    <SetVariable name="LeftClickIsPushButton">true</SetVariable>
                    <SetVariable name="state_0_text">CUE</SetVariable>
                    <SetVariable name="state_1_text">CUE</SetVariable>
                    <SetVariable name="left_connection_control"><Variable name="group"/>,cue_default</SetVariable>
                    <SetVariable name="right_connection_control"><Variable name="group"/>,cue_gotoandstop</SetVariable>
                    <SetVariable name="display_connection_control"><Variable name="group"/>,cue_indicator</SetVariable>
                  </Template>

                  <WidgetGroup><!-- Play button + preview indicator + play_indicator -->
                    <Layout>stacked</Layout>
                    <SizePolicy>f,me</SizePolicy>
                    <Children>
                      <Template src="skin:left_right_display_2state_button.xml">
                        <SetVariable name="TooltipId">play_cue_default</SetVariable>
                        <SetVariable name="ObjectName">PlayToggle</SetVariable>
                        <SetVariable name="MinimumSize">30,21</SetVariable>
                        <SetVariable name="MaximumSize">30,21</SetVariable>
                        <SetVariable name="SizePolicy">f,f</SetVariable>
                        <SetVariable name="left_connection_control"><Variable name="group"/>,play</SetVariable>
                        <SetVariable name="right_connection_control"><Variable name="group"/>,cue_set</SetVariable>
                        <SetVariable name="display_connection_control"><Variable name="group"/>,play_latched</SetVariable>
                      </Template>
                      <Template src="skin:left_2state_button.xml">
                        <SetVariable name="ObjectName">PreviewIndicator</SetVariable>
                        <SetVariable name="MinimumSize">30,21</SetVariable>
                        <SetVariable name="MaximumSize">30,21</SetVariable>
                        <SetVariable name="SizePolicy">f,f</SetVariable>
                        <SetVariable name="left_connection_control"><Variable name="group"/>,play</SetVariable>
                      </Template>
                      <Template src="skin:left_2state_button.xml">
                        <SetVariable name="MinimumSize">30,21</SetVariable>
                        <SetVariable name="MaximumSize">30,21</SetVariable>
                        <SetVariable name="SizePolicy">f,f</SetVariable>
                        <SetVariable name="left_connection_control"><Variable name="group"/>,play_indicator</SetVariable>
                      </Template>
                    </Children>
                  </WidgetGroup>

                </Children>
              </WidgetGroup><!-- PlayGutterSmall -->

            </Children>
          </WidgetGroup>
        </Children>
      </WidgetGroup><!-- DeckN -->
    </Children>
  </WidgetGroup><!-- DeckSmall -->
</Template>
