Shykaro
(Shykaro)
April 19, 2023, 5:15pm
1
Hi there!
Currently got a weird issue with my Image inside of a Button.
So this is how it theoretically should look like:
Notice that I padded top and bottom to 10, didnt do anything on left or right.
So its a guessed padding to make it somewhat square.
this is how it looks like without any padding:
Question is, where do these weird sidebars left and right come from?
I dont have any padding in any of the parents so why is it behaving like that?
I would like the picture to scale with the sizebox, or at least be squared.
If any additional info is needed, please let me know.
And thank you very much for interacting with this question!!
Hey @Shykaro !
I think it might be related to the shape of the original image. Try cropping it to be square first! (In the screenshot the image is 384x,512y, so it’s taller than it is wide)
Give that a shot and let us know how it goes!
1 Like
Shykaro
(Shykaro)
April 19, 2023, 6:42pm
3
Hi there!
Thank you so much for your answer, i sadly already tried that. And it didnt seem to change anything
The image iam loading in, with the original thumbnail bind has the properties of 128x128 as well, but its stretched ingame too.
(With original settings):
EDIT: Both tested in “Desired on Screen” btw
Extrone
(Arjun Subhash)
April 19, 2023, 6:49pm
4
The button itself has custom padding for Normal and Pressed state, try setting that to 0.
EDIT : You’ll need to compile to see the changes!
Image Padding = 10 | Button Normal Padding = 12.0, 1.5
Image Padding = 10 | Button Normal Padding = 0
1 Like
Also, instead of adding a child image, you can simply use the image property on the button itself!
1 Like
Shykaro
(Shykaro)
April 19, 2023, 6:58pm
6
Yep, that was indeed the issue that i couldnt find. Thank you all very much !
1 Like