Godot: Gui styles are shrinking edges of texture

Created on 20 Jan 2020  路  4Comments  路  Source: godotengine/godot

Godot version:
3.2 beta 4

OS/device including version:
Windows 10 pro education 64 bit

Issue description:
styles are shrinking edges of texture on buttons when they edges should not be modified at all.
here is a picture of the edges being half the size then they should be
image

image

what should be happening is that the edges do not shrink but instead the center does like 9 slices should.

Steps to reproduce:

  • make a 16x16 rectangle texture with 1 pixel wide edges in a photo editing program.
  • add a button and assign the texture to the default style with a margin of 1,1,1,1
  • resize it smaller then the texture size
  • see result

Minimal reproduction project:
9Slice Style Bug.zip

bug gui

Most helpful comment

then it should either be reverted or enabled by a flag which is default to off because thats not how 9 slices are suppose to work.

All 4 comments

It's a change made by #32170.

then it should either be reverted or enabled by a flag which is default to off because thats not how 9 slices are suppose to work.

then it should either be reverted or enabled by a flag which is default to off because thats not how 9 slices are suppose to work.
I had the same problem, but they ignored my existence ...
#37027

The aforementioned change that was implemented really shouldn't have been done without some careful thought into what kind of workflows this may break. I've been building a GUI system for a simulation game and if I have windows that are resizable or if I create one that just happens to get close to the texture size it of course starts to distort. Now I'm having to employ workarounds such as defining minimum sizes and doing a lot of extra fine-tuning of the artwork and making adjustments to it, the code, layouts, etc. in order to accommodate this new behaviour. That is a lot of time I really wish I didn't have to put into this. I can definitely see where this kind of change may be useful, but it needs to be a toggle-able option.

Was this page helpful?
0 / 5 - 0 ratings