Skip to content

Conversation

@passivestar
Copy link
Contributor

Reduces inspector margins leaving the same outer gap in modern theme as it is in classic. Should fix #112284

Master PR
1 2
Modern Classic
3 4

@groud
Copy link
Member

groud commented Nov 7, 2025

It helps, but IMO the problem is maybe a bit there now:
not aligned

@passivestar
Copy link
Contributor Author

@groud I found that the extra margin is coming from the focus stylebox. While it can be reduced, it can't be reduced all the way to zero because then there will be no space to draw the focus border:

image

If it can't be reduced to zero then it's probably better to leave at current value because a 2px misalignment would be much more triggering than a regular padding that looks intentional.

If focus wasn't an issue then I'd say aligning those would require slightly increasing the margin of the dock (around everything including header) because otherwise that loss of inner space is starting to get noticeable and it's starting to look a bit heavy:

image

@groud
Copy link
Member

groud commented Nov 7, 2025

Well to align things maybe we could also add some padding around the header part, and maybe compensate by reducing whole dock padding accordingly ? Then we can adjust everything with the dock's padding.

If it can't be reduced to zero then it's probably better to leave at current value because a 2px misalignment would be much more triggering than a regular padding that looks intentional.

True.

@ErnSur
Copy link

ErnSur commented Nov 7, 2025

If focus wasn't an issue then I'd say aligning those would require slightly increasing the margin of the dock (around everything including header) because otherwise that loss of inner space is starting to get noticeable and it's starting to look a bit heavy:

image

@passivestar Are you saying that the visuals on the second screenshot you attached are bad?
I'd say they finally look correct to me.

I was looking for a PR like this because ever since I started working with Godot I was irked by the unnecessary extra margin around many of the UI elements. It's very noticeable if you're working on a laptop.
Here are some examples:

inspector sceneAndFiles

@passivestar
Copy link
Contributor Author

@passivestar Are you saying the the visuals on the second screenshot you attached are bad?
I'd say they finally look correct to me.

Aligning those is good but the dock could use a few more pixels of horizontal padding

I was looking for a PR like this because ever since I started working with Godot I was irked by the unnecessary extra padding around many of the UI elements. It's very noticeable if you're working on a laptop.

You don't need a PR to reduce all paddings at once, there's a "Base Spacing" editor setting that you can use. But it shouldn't be too crammed by default

@ErnSur
Copy link

ErnSur commented Nov 7, 2025

You don't need a PR to reduce all paddings at once, there's a "Base Spacing" editor setting that you can use. But it shouldn't be too crammed by default

I'd say that the problem is that too many elements use the base spacing into consideration. Some UI containers should simply ignore it since they hierarchy ancestor already takes care of it.

Let's say I'm designing a Inspector UI hierarchy like so:

  • VBox
    • HBox
      • SearchBox
      • Button
    • TreeView

If I apply a horizontal margin to the first VBox then I don't want to apply the extra margin to "HBox". Its there to simply layout other elements.

Here's the Inspector window with the base spacing set to 8. I'm arguing that the headers should not have the extra indent and the scroll bar should stick to the right window border and the margin space should be applied to the left of it instead.
Screenshot 2025-11-07 at 17 01 47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] Gap on the right side of the Inspector shrinking icons after new theme.

5 participants