Skip to content

Editing Content Margins of ScrollContainer in Theme applies to the whole engine editor #81146

Closed
@AsperTheDog

Description

@AsperTheDog

Godot version

4.1.1.stable

System information

Consistently reproduced in several devices, both Windows 10 and 11 (The computer where the MRP was created and compressed: Godot v4.1.1.stable - Windows 10.0.22000 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Ti (NVIDIA; 31.0.15.3699) - Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 Threads) )

Issue description

When creating a custom Theme, if the ScrollContainer StyleBox is set to a custom StyleBoxFlat with modified Content Margins, these margins will apply to the editor of the engine itself. The error is solved if the .godot folder is erased (very specifically, in the example project the error is solved if the .ctex file of the UI-Map.png image is deleted from the "imports" folder). But the issue will reappear as soon as the project is closed and opened

err2
err1
err3
err4

Steps to reproduce

  1. Open the MRP
  2. Let it generate the .godot folder
  3. See that all margins of the editor are correct
  4. Reload project
  5. See that margins are incorrectly set to the value of the Theme.tres present in the folder "Environments"
  6. If margins are still correct, open the Theme and navigate to the custom StyleBoxFlat of ScrollContainer. Then modify the Content Margins.
  7. See that the margins are incorrectly being modified (a project reload may be necessary, but it almost always gets modified as soon as you edit the values of the parameter)

Minimal reproduction project

GDProject.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions