• Godot HelpGUI
  • How to reduce the empty horizontal border around WindowDialog title text?

Hi all, I'm playing around with the theme editor, and trying to create a WindowDialog, but when I try to resize the window, the minimum width is way higher than I would like. It seems the Window Title element is forcing a massive border on either side that I can't find a way to reduce, so the min width still scales with the width of the title, but plus a big extra chunk.

I'm assuming this is something I haven't spotted in the theme editor, but I've had a look around and can't find a solution. Any help?

Can you provide a screenshot? It is difficult to understand what you are asking.

Aha yeah sorry, first post!

So here is my Popup Window, with the rect size at its current minimum of 240. I can't get the width of the window to go any smaller than that, but anything above that scales fine.

Here is the Popup Window with a smaller title, and a new minimum rect width of 161. The minimum width of the entire window is restricted by the length of the title string, which is fine in theory, but the header width is still way higher than I would like it to be. Ideally the red window header would have only a few pixels of border space either side of the title string. The rect HEIGHT can be resized all the way down to 0 with no issues.

The scene itself is using the default values of a theme I am currently in the process of designing, trying to get to grips with the theme system in general, so I thought it might be some value in the theme that I am missing?

Thanks!

The theming system always had some weird stuff like that. I just stick to ninepatch and texture rects with gdscript. It works more reliably that way for me.
Before you abandon it, make sure you don't have rect_min_size set for anything inside the rect you're trying to resize. That got me more than a few times.

Yeah, I've had a good look through what I can, and can't find any rect_min_sizes above 0. I was probably going to make custom menus anyways, just thought I'd try to sort out a solid default setup. Kind of a shame. But thanks!

5 days later

UPDATE: It seems like the minsize for the window rect was affected by the size of the custom texture I was using for my Close Button (which was much bigger than it looked due to a glow surrounding the main button) so I made the image size smaller, and the minimum width went down with it. I guess it adds a border to take the close button size into account when resizing.

8 months later