Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Theme" > "Button" > "Styles" > "StyleBoxTexture" won't unfold edit pane #29873

Closed
ghost opened this issue Jun 18, 2019 · 9 comments · Fixed by #61342
Closed

"Theme" > "Button" > "Styles" > "StyleBoxTexture" won't unfold edit pane #29873

ghost opened this issue Jun 18, 2019 · 9 comments · Fixed by #61342

Comments

@ghost
Copy link

ghost commented Jun 18, 2019

Godot version:
3.1 stable.official

OS/device including version:
Windows 10 Home

Issue description:
I added a Theme for a popup dialog in a game i was making which also included buttons. When trying to add Button Styles for the theme i choose to go for "StyleBoxTexture". I found out that this is bugged. When clicking on to edit the Texture the whole Theme tab folds.

Steps to reproduce:
Use a Node which can have a Theme (Popup in my case)
Theme > Button > Styles > choose one of the states below e.g. "Disabled" >
From the dropdown choose "New StyleBoxTexture"
Click on the "StyleBoxTexture"

Expected: should open a dropdown like when clicking on "Theme" or "Font"

Actually behaviour: closes the whole "Theme" tab

@KoBeWi
Copy link
Member

KoBeWi commented Jun 18, 2019

Doesn't happen with other StyleBox types and also doesn't happen with StyleBoxTexture in custom_styles.

@codecustard
Copy link
Contributor

I can take a look.

@Feniks-Gaming
Copy link
Contributor

There is a way around it for now. If You first select New StyleBox Empty and expand it and then change it to StyleBox Texture it will remain expanded as expected.

Not sure how useful this information is to anyone who is going to fix the issue.

@Feniks-Gaming
Copy link
Contributor

@codecustard any success on this?

@Calinou
Copy link
Member

Calinou commented Dec 6, 2019

I can confirm this on commit 0aea0d0.

@codecustard
Copy link
Contributor

Sorry, I lost track of this bug.... go for it if you're trying to fix it.

@ondesic
Copy link

ondesic commented Jun 7, 2020

This bug is still here in 3.2.1. Can't unfold StyleBoxTexture inside a Theme

@git12121
Copy link

git12121 commented Aug 5, 2020

On Godot v3.2.2.stable.official, the issue still occurs if you create a new StyleBoxTexture and click on it to edit it. However, if you click the arrow dropdown and click "edit" instead, it works.

@Haledire
Copy link

Haledire commented Aug 10, 2020

In the time I've messed with this, the main thread that seems to be the issue is that StyleboxTexture and Theme seem to be vying for the Bottom Dock entry.

Creating a StyleboxTexture opens the Texture region editor in the bottom dock. Creating any other Stylebox and switching to StyleboxTexture avoids this behavior (which is why this workaround works).

You can see this behavior again if you take any theme element that takes an image and attempt to put an AtlasTexture into it. If you make a new AtlasTexture directly into the Texture slot, the Theme editor will be closed because the Texture region editor is trying to open. If you create a Texture type that doesn't have a Texture region editor, and then switch to AtlasTexture, the same behavior is seen as with the StyleboxTexture and other styleboxes.

I'm not sure if it has to do with the bottom dock re-using the same entry for plugin editors as I've not made plugins before, much less a plugin that requires multiple editors open. It seems like the Theme inspector window cannot be open without the Theme editor plugin window open at the bottom. Because Texture Region Editor closes the Theme editor plugin window, the Theme inspector closes, thus closing the inspector for the Texture, which also means the TextureRegion editor plugin closes because the texture inspector is also closed.

Suggestion
Make a toggle in the Theme inspector window that toggles the visibility of the Theme editor plugin dock and decouple their visibility sharing so that the opening of other Editor Plugin docks in the bottom dock don't close the Theme inspector. Either that or make the Theme inspector field work on the same functionality as spriteframes and tileset - open a separate resource inspector (though I feel like it would be more unpleasant to work with when styling a UI on smaller scales).

Some more similar behavior:

Create a new script extending any resources with an Editor (ie: Spriteframes, Tileset)
Add a texture export or stylebox export.
Create a new instance of this resource somehow (either as a field in an object or a resource file).
Open the editor for the resource, then make a resource in the export field that would open the TextureRegion editor plugin.
The editor will close, but the image inspector will open. Because the inspector isn't dependent on the editor being open, the Image inspector isn't closed.

Compare this to the Theme inspector and Theme editor plugin which are dependent upon each other.

If you open the Theme resource editor inspector, you can work on any fields that are using a StyleboxTexture or AtlasTexture just fine since this view doesn't require the Theme editor plugin dock open. This comes with the added inconvenience that you cannot add additional fields to the Theme in this view without backing up and opening a theme resource entry in a control node.
dockIssue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants