How to align an image size according to the text size inside it?
#1
Hi!
I have an idea to show the wallpapers names inside a image frame (.png).
But I want this frame modify his size according to text size.
This is possible? If yes, how I do that?

Thanks!
Supercalifragilisticexpialidocious! (inscribed in large friendly letters)
My hardware is a Raspberry Pi 3b (with LibreELEC)
Reply
#2
Use a button control. Button controls support textures and auto width based on the textsize.

Code:

<control type="button">
<width>auto</width>
<height>150</height>
<textoffsetx>10</textoffsetx>
<label>bla bla bla</label>
<texturenofocus border="5">myframe.png</texturenofocus>
<texturefocus border="5">myframe.png</texturefocus>
<onclick>noop</onclick>
</control>

See https://kodi.wiki/view/Button_control

Edit:
I use this method for the mpaa ratings.

Image
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#3
Thanks, @sualfred!
I may have used a wrong word when I said "frame".
In this case is this specifically image https://github.com/bartolomesoriano/skin...ePanel.png
I don't get a good result, look
Image
The background image don't look like the original.

The code I used
xml:
<control type="button">
<width>auto</width>
<height>40</height>
<font>FanartTitleFont</font>
<textoffsetx>10</textoffsetx>
<label>bla bla bla</label>
<texture flipx="true" flipy="true">common/TimePanel.png</texture>
<onclick>noop</onclick>
</control>

What I'm doing wrong?
Supercalifragilisticexpialidocious! (inscribed in large friendly letters)
My hardware is a Raspberry Pi 3b (with LibreELEC)
Reply
#4
You mean stretched texture etc? You have to play with the border attribute like.
Code:
<texture border="20,20,20,20" colordiffuse="$VAR[AccentColor]">items/focus.png</texture>

the digits define the pixels from each side that should not be streched. Keep your texture as small as possible, otherwise it will not work in small sizes.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#5
Thanks again, @sualfred!
But unfortunately I think I don't have knowledge to do what I want.
I found this thread, and if it still updated I think this is impossible.
Supercalifragilisticexpialidocious! (inscribed in large friendly letters)
My hardware is a Raspberry Pi 3b (with LibreELEC)
Reply

Logout Mark Read Team Forum Stats Members Help
How to align an image size according to the text size inside it?0