Making a Main Page Plugin following Godot Editor's Style (such as "2D" or "Script" tab)

Godot Version

v4.4.1.stable.official [49a5bc7b6]

Question

Hi everyone. I am new to Godot and new here. I am currently learning Godot engine, and finished the tutorial at the official site.

Now I am making a main page plugin in Godot, and I want my plugin’s style similar to the Godot official theme to provide seamless experience.
But however, after I searched the implementation of the Script page, I found it is merely impossible for me to extract the layout or the styles from that.

I also tried methods such as assigning EditorInterface.get_editor_theme() to nodes, but it still does not work well.

Can I ask how the “Script” page is designed, and why leaving default parameter does not solve the problem just as this reddit thread.

This is what I have done so far. I am working on the TopButtonBar and adding some buttons, but it looks too different from the “Script” page.

Plugins will use the editors theme if no other theme is specified, can you describe what about this screenshot does not look right to you? What do you expect it to look like?

1 Like

Thank you for your reply (I deleted the previous post, because it does not seems like being a reply post to you) !

At the current stage, what I want is:

  • Make the TopButtonBar (currently, only an “add” button) to be like the “2D” main page, having same height and width for the bar and the button
  • Also the style for the button (fill SVG with darker grey colour, different than the background).
  • Make the HSplit having the same offset ratio as the “Script” main page.

That is why I would like to know the spec including the length-related information of the built-in main page here (maybe I misunderstand the word “style” before). If this can be accomplished, user will feel less visual gap when switching between them.

(Maybe a template or a mock-tscn for the main page plugin, would help plugin developer make plugin more coherent with the other main pages ?)