Matching UI margin of a EditorPlugin dock to the default Editor dock margin

Godot Version

v4.4.1

Question

Hello hello, I am creating a EditorPlugin and I’m working on the UI. I wanted to match the margin of my plugin’s dock to the default Godot margin on the editor’s dock so it look nice and clean. However, there is a wierd margin that is just slightly bigger than the normal one and I’m not being able to find where the issue comes from. I will delineate the margin with red in some parts to show better the issue.


Normal dock margin


My plugin’s margin


The PanelContainer.panel StyleBox has some content margins applied in the editor theme. You are probably seeing those margins in the different PanelContainers your scene has.

A possible fix is to override their panel StyleBox with a StyleBoxEmpty or do it in a Theme

1 Like

That was exactly the answer. Had to change the style of all PanelContainers.panel to not have the margin and now it works. Thank you

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.