VideoOSD

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
pecinko Offline
Donor
Posts: 3,838
Joined: Dec 2008
Reputation: 52
Location: Prague / Belgrade
Post: #1
I have this code in VideoOSD :

Code:
<control type="slider" id="87" description="Seek Slider">
    <posx>100</posx>
    <posy>40</posy>
    <width>1070</width>
    <height>24</height>
    <onup>-</onup>
    <ondown>-</ondown>
    <action>seek</action>
    <texturesliderbar border="14,0,14,0">OSD/OSDProgressBack.png</texturesliderbar>
    <textureslidernib border="8">OSD/SeekNibNF.png</textureslidernib>
    <textureslidernibfocus border="8">OSD/SeekNibFO.png</textureslidernibfocus>
    </control>

but I'm unable to make a NIB (24x24px) keep aspect ratio. It always gets stretched. What am I missing?

My skins:

Amber
Quartz

find quote
Hitcher Online
Skilled Skinner
Posts: 11,077
Joined: Aug 2007
Reputation: 103
Location: Eastleigh, UK
Post: #2
Tried border="12" ?
find quote
pecinko Offline
Donor
Posts: 3,838
Joined: Dec 2008
Reputation: 52
Location: Prague / Belgrade
Post: #3
Hitcher Wrote:Tried border="12" ?

Just tried it. It still makes bar out of nib.

My skins:

Amber
Quartz

find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #4
Its a bug basically you can't because the size of the nib is calculated by the size of the slider background so what you need to do is fart around wih OSD/OSDProgressBack.png and inscrease its dimensions (width mostly) like I had too with confluence Sad
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #5
I'm happy to change things around if there's a better idea - remember that most controls scale to their defined rect size, so atm we basically assume that all textures should scale by the same amount that the background does.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
pecinko Offline
Donor
Posts: 3,838
Joined: Dec 2008
Reputation: 52
Location: Prague / Belgrade
Post: #6
Jezz_X Wrote:Its a bug basically you can't because the size of the nib is calculated by the size of the slider background so what you need to do is fart around wih OSD/OSDProgressBack.png and inscrease its dimensions (width mostly) like I had too with confluence Sad

Thanks, I wondered how you did it. I'll take a peek.

My skins:

Amber
Quartz

find quote
pecinko Offline
Donor
Posts: 3,838
Joined: Dec 2008
Reputation: 52
Location: Prague / Belgrade
Post: #7
jmarshall Wrote:I'm happy to change things around if there's a better idea - remember that most controls scale to their defined rect size, so atm we basically assume that all textures should scale by the same amount that the background does.

I'm little confused. NIB seams to work just fine in scrollbars, which led me to think that NIB is an image that has aspectratio=keep hardwired.

My skins:

Amber
Quartz

find quote
Hitcher Online
Skilled Skinner
Posts: 11,077
Joined: Aug 2007
Reputation: 103
Location: Eastleigh, UK
Post: #8
I agree that the Slider Nib should not be scaled with the background when it comes to the OSDs. They are after all indicating a specific, single point in the progress of whatever's playing.
find quote
Hitcher Online
Skilled Skinner
Posts: 11,077
Joined: Aug 2007
Reputation: 103
Location: Eastleigh, UK
Post: #9
@ pecinko

You could try padding it with empty space on the right of the image and then set the border to cover the part you don't want scaled.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #10
Which bit is scaled? Is it scaled with height and width or with both? As I say, am happy to change it to not scale at all, or only scale in one dimension and keep aspect otherwise etc.

Just let me know a recipe that'll work for you all and I'll apply it Smile

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #11
I'd go for height scaling so the maths works like this

image are background = 16 pixels high, nib = 32 pixels high

in skin background gets sized to 8 pixels high then nib gets sized to 16 pixels high and keeps its aspect and is aligned with the slider in the center of the nib not the start of it
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #12
https://github.com/jmarshallnz/xbmc/tree...spect_keep

That should do what you want I think?

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
pecinko Offline
Donor
Posts: 3,838
Joined: Dec 2008
Reputation: 52
Location: Prague / Belgrade
Post: #13
jmarshall Wrote:That should do what you want I think?

I cannot build, but if it behaves as in Jezz_X's explanation - that's the way.

My skins:

Amber
Quartz

find quote