Kodi Community Forum
resize items in a group at once? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: resize items in a group at once? (/showthread.php?tid=378888)



resize items in a group at once? - R.O.H. - 2024-09-24

hi, I have a question. 

I have a group with three items: 

An image, a logo and a button. I can easily move all items at once using <left> and <top> as expected.

However, I would also like to change the size of the entire group. Basically make the image, the logo and the button bigger (or smaller) at the same ratio. 

Is that possible?

Very much appreciated!


RE: resize items in a group at once? - Hitcher - 2024-09-24

Zoom animation in the group control.


RE: resize items in a group at once? - R.O.H. - 2024-09-24

(2024-09-24, 23:04)Hitcher Wrote: Zoom animation in the group control.

Thank you @Hitcher. I thought of that but thought it was a bit "hacky". 

Appreciated!


RE: resize items in a group at once? - R.O.H. - 2024-09-24

(2024-09-24, 23:04)Hitcher Wrote: Zoom animation in the group control.

So to be clear: Is this common practice?

Can I use this as a long-term solution or will this eat up unnecessary resources? 

Or should I go and change the sizes of each item... eventually?

TA


RE: resize items in a group at once? - Hitcher - 2024-09-25

What exactly are you trying to do? Resize them based on focus? Or make them permanently bigger/smaller?


RE: resize items in a group at once? - R.O.H. - 2024-09-25

(2024-09-25, 00:58)Hitcher Wrote: What exactly are you trying to do? Resize them based on focus? Or make them permanently bigger/smaller?

Permanent. I have created some groups like above and then I'd like to use the same group just bigger/smaller in a different area of the skin. Almost like reusing a template just with different measurements.

I guess safest thing to do is to resize them all manually?


RE: resize items in a group at once? - Hitcher - 2024-09-25

Easiest method would be to use parameters.

https://forum.kodi.tv/showthread.php?tid=211896&pid=1960946#pid1960946


RE: resize items in a group at once? - sarbes - 2024-09-25

Zooming to change element sizes is hacky. Font (and with Piers possibly other textures) will be blurry or aliased.


RE: resize items in a group at once? - jurialmunkey - 2024-10-09

Late to this thread, but if you don't need to scale the font, you can do it with relative sizing and dont even need params, just an include.

For example, here is a logo at 50% size, with an image 25% height under that, then a button at the bottom, all centered. All you need to do is put the include in a group that is sized appropriately.

xml:

<!-- in includes.xml -->

<include name="myresizegroup">
<control type="image">
<centerleft>50%</centerleft>
<width>50%</width>
<height>50%</height>
<texture>mylogo.png</texture>
</control>
<control type="image">
<centerleft>50%</centerleft>
<bottom>25%</bottom>
<width>50%</width>
<height>25%</height>
<texture>myimage.png</texture>
</control>

<control type="button">
<bottom>0</bottom>
<width>70%</width>
<height>25%</height>
</control>
</include>

<!-- to use the include elsewhere -->
<control type="group">
<width>600</width>
<height>400</height>
<include>myresizegroup</include>
</control>



RE: resize items in a group at once? - R.O.H. - 2024-10-10

Thanks for the infos @Hitcher and @sarbes. Appreciated!
 
(2024-10-09, 09:11)jurialmunkey Wrote: Late to this thread, but if you don't need to scale the font, you can do it with relative sizing and dont even need params, just an include.

For example, here is a logo at 50% size, with an image 25% height under that, then a button at the bottom, all centered. All you need to do is put the include in a group that is sized appropriately.

Aaa, that makes sense @jurialmunkey Perfect, that's really convenient! Worked immediately. Thank you for the solution. Very happy now Smile