<!--
Description:
  Container for:
  * artist/title
  * play position (elapsed/remaining/both)
  * track duration
  * indicator for enabled loop (if loop controls are hidden)
Variables:
  group   : [ChannelN]
  chanNum : channel number
-->
<Template>
  <WidgetGroup>
    <ObjectName>ArtistTitleTime</ObjectName>
    <Layout>vertical</Layout>
    <SizePolicy>i,me</SizePolicy>
    <Children>

      <WidgetGroup><!-- Title + Time -->
        <Layout>horizontal</Layout>
        <SizePolicy>i,me</SizePolicy>
        <Children>

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

          <WidgetGroup><!-- Title/Artist -->
            <Layout>vertical</Layout>
            <SizePolicy>i,me</SizePolicy>
            <Children>
              <TrackProperty>
                <TooltipId>track_title</TooltipId>
                <ObjectName>TrackTitle</ObjectName>
                <Property>title</Property>
                <Alignment>Left</Alignment>
                <Elide>right</Elide>
                <Size>1me,22f</Size>
                <Channel><Variable name="chanNum"/></Channel>
              </TrackProperty>
            </Children>
          </WidgetGroup>

          <WidgetGroup><!-- Time -->
            <ObjectName>PlayPositionHighlightContainer</ObjectName>
            <Layout>horizontal</Layout>
            <SizePolicy>min,me</SizePolicy>
            <Children>
              <WidgetGroup><Size>2f,1min</Size></WidgetGroup>

            <!-- Elapsed (may include '-' if position is before actual track beginning)
                or Remaning -->
              <NumberPos>
                <ObjectName>PlayPosition</ObjectName>
                <TooltipId>track_time</TooltipId>
                <Size>-1min,22f</Size>
                <Alignment>right</Alignment>
                <Channel><Variable name="chanNum"/></Channel>
                <!-- Not respected, see
                    https://answers.launchpad.net/mixxx/+question/635872
                <NumberOfDigits>1</NumberOfDigits>-->
                <Connection>
                  <ConfigKey><Variable name="group"/>,playposition</ConfigKey>
                </Connection>
                <Connection>
                  <ConfigKey>[Controls],ShowDurationRemaining</ConfigKey>
                  <Transform><IsEqual>2</IsEqual><Not/></Transform>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </NumberPos>
              
              <!-- Elapsed & Remaining -->
              <NumberPos>
                <ObjectName>PlayPosition</ObjectName>
                <TooltipId>track_time</TooltipId>
                <Size>-1min,22f</Size>
                <Alignment>right</Alignment>
                <Channel><Variable name="chanNum"/></Channel>
                <Connection>
                  <ConfigKey><Variable name="group"/>,playposition</ConfigKey>
                </Connection>
                <Connection>
                  <ConfigKey>[Controls],ShowDurationRemaining</ConfigKey>
                  <Transform><IsEqual>2</IsEqual></Transform>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </NumberPos>

              <WidgetGroup><Size>2f,1min</Size></WidgetGroup>
            </Children>
          </WidgetGroup><!-- Time -->
        </Children>
      </WidgetGroup><!-- /Title + Time -->

      <WidgetGroup><!-- by Artist + Duration -->
        <Layout>horizontal</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>

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

          <Label>
            <ObjectName>TrackBy</ObjectName>
            <Size>22f,22f</Size>
            <Text>by </Text>
            <Alignment>left</Alignment>
          </Label>

          <TrackProperty>
            <TooltipId>track_artist</TooltipId>
            <ObjectName>TrackArtist</ObjectName>
            <Elide>right</Elide>
            <Size>1me,22f</Size>
            <Property>artist</Property>
            <Channel><Variable name="chanNum"/></Channel>
          </TrackProperty>

          <TrackProperty>
            <ObjectName>Duration</ObjectName>
            <Size>60min,22f</Size>
            <TooltipId>track_duration</TooltipId>
            <Property>durationFormatted</Property>
            <Alignment>right</Alignment>
            <Channel><Variable name="chanNum"/></Channel>
          </TrackProperty>

          <WidgetGroup><Size>4f,1min</Size></WidgetGroup>
        </Children>
      </WidgetGroup><!-- /by Artist + Duration -->

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