2017-02-04, 20:24
I suspect this is me being a complete idiot, but I can't just figure out what I'm doing wrong.
I'm working on a window that just shows me what's playing on my Logitech Media Server. I want to add a minimal progress bar showing the position of the track but it's going a bit weird.
I want to limit the progress bar to the "Now Playing" section, but it's just disappearing off the edge of the screen:
The relevant control group from my xml file is this:
I've tried different values for the info tag (50, 50%, 0.5) but it always goes off the edge of the screen.
Can anyone see something obvious that I'm doing wrong?
I've posted this in the addon section because I'm launching the window from a python script which subclasses WindowXML.
And, yes, I do know the layout's pretty ugly at the moment...
I'm working on a window that just shows me what's playing on my Logitech Media Server. I want to add a minimal progress bar showing the position of the track but it's going a bit weird.
I want to limit the progress bar to the "Now Playing" section, but it's just disappearing off the edge of the screen:
The relevant control group from my xml file is this:
Code:
<control type="group">
<left>80</left>
<top>500</top>
<width>800</width>
<height>120</height>
<visible>true</visible>
<control type="image">
<width>100%</width>
<height>100%</height>
<texture>squeezeinfo-bg.png</texture>
<visible>true</visible>
</control>
<control type="image">
<left>10</left>
<top>10</top>
<width>100</width>
<height>100</height>
<texture>$INFO[Window.Property(SQUEEZE_NP_ICON)]</texture>
<visible>true</visible>
</control>
<control type="label">
<height>25</height>
<width>580</width>
<left>120</left>
<top>10</top>
<font>font2</font>
<label>Now Playing:</label>
</control>
<control type="label">
<height>25</height>
<width>580</width>
<left>120</left>
<top>35</top>
<font>font2</font>
<label>$INFO[Window.Property(SQUEEZE_NP_TITLE)]</label>
</control>
<control type="label">
<height>25</height>
<width>580</width>
<left>120</left>
<top>60</top>
<font>font2</font>
<label>$INFO[Window.Property(SQUEEZE_NP_ARTIST)]</label>
</control>
<control type="label">
<height>25</height>
<width>580</width>
<left>120</left>
<top>85</top>
<font>font2</font>
<label>$INFO[Window.Property(SQUEEZE_NP_ALBUM)]</label>
</control>
<control type="progress" id="1">
<left>0</left>
<top>115</top>
<width>800</width>
<height>5</height>
<visible>true</visible>
<reveal>false</reveal>
<midtexture>prog-body.png</midtexture>
<righttexture>prog-end.png</righttexture>
<texturebg>transparent.png</texturebg>
<lefttexture>prog-body.png</lefttexture>
<overlaytexture>transparent.png</overlaytexture>
<info>$INFO[Window.Property(SQUEEZE_PROGRESS)]</info>
</control>
</control>
I've tried different values for the info tag (50, 50%, 0.5) but it always goes off the edge of the screen.
Can anyone see something obvious that I'm doing wrong?
I've posted this in the addon section because I'm launching the window from a python script which subclasses WindowXML.
And, yes, I do know the layout's pretty ugly at the moment...