Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
resize items in a group at once?
#1
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!
Reply
#2
Zoom animation in the group control.
Reply
#3
(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!
Reply
#4
(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
Reply
#5
What exactly are you trying to do? Resize them based on focus? Or make them permanently bigger/smaller?
Reply
#6
(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?
Reply
#7
Easiest method would be to use parameters.

https://forum.kodi.tv/showthread.php?tid...pid1960946
Reply
#8
Zooming to change element sizes is hacky. Font (and with Piers possibly other textures) will be blurry or aliased.
Reply
#9
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>
Arctic Fuse 2 - Alpha now available. Support me on Ko-fi.
Reply
#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
Reply

Logout Mark Read Team Forum Stats Members Help
resize items in a group at once?0