Basically the left panel is anchored to the TopLeft of the PlayerFrameGroupIndicator, the right panel to the TopRight and then the middle section is anchored between the two of them ("Interface\\CharacterFrame\\UI-CharacterFrame-GroupIndicator" is a single image virtually sliced into 3 by using TexCoords)
Code:
<Anchor point="LEFT" relativeTo="PlayerFrameGroupIndicatorLeft" relativePoint="RIGHT"/>
<Anchor point="RIGHT" relativeTo="PlayerFrameGroupIndicatorRight" relativePoint="LEFT"/>
During play when then names change ("PARTY_LEADER_CHANGED" or "GROUP_ROSTER_UPDATE" events), the PlayerFrameGroupIndicator is resized to the width of the automatically adjusting text (FontString), PlayerFrameGroupIndicatorText:
Code:
PlayerFrameGroupIndicator:SetWidth(PlayerFrameGroupIndicatorText:GetWidth()+40)
Code:
<Frame name="PlayerFrameGroupIndicator" hidden="true">
<Size x="10" y="16"/>
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" x="97" y="-20"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="PlayerFrameGroupIndicatorLeft" file="Interface\CharacterFrame\UI-CharacterFrame-GroupIndicator">
<Size x="24" y="16"/>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
<TexCoords left="0" right="0.1875" top="0" bottom="1"/>
</Texture>
<Texture name="PlayerFrameGroupIndicatorRight" file="Interface\CharacterFrame\UI-CharacterFrame-GroupIndicator">
<Size x="24" y="16"/>
<Anchors>
<Anchor point="TOPRIGHT"/>
</Anchors>
<TexCoords left="0.53125" right="0.71875" top="0" bottom="1"/>
</Texture>
<Texture name="PlayerFrameGroupIndicatorMiddle" file="Interface\CharacterFrame\UI-CharacterFrame-GroupIndicator">
<Size x="0" y="16"/>
<Anchors>
<Anchor point="LEFT" relativeTo="PlayerFrameGroupIndicatorLeft" relativePoint="RIGHT"/>
<Anchor point="RIGHT" relativeTo="PlayerFrameGroupIndicatorRight" relativePoint="LEFT"/>
</Anchors>
<TexCoords left="0.1875" right="0.53125" top="0" bottom="1"/>
</Texture>
<FontString name="PlayerFrameGroupIndicatorText" inherits="GameFontHighlightSmall">
<Anchors>
<Anchor point="LEFT" x="20" y="-2"/>
</Anchors>
</FontString>
</Layer>
</Layers>
...