Skip to content

Conversation

@DeeJayLSP
Copy link
Contributor

@DeeJayLSP DeeJayLSP commented Oct 31, 2025

Addresses one of the complains about the new style. One which I couldn't disagree.

The new style makes the Input Map editor too flat. I modified it so it at least highlights the actions.

This is done by using TreeItem::CELL_MODE_CUSTOM alongside a callback that draws a StyleBox, which I named style_highlight_subsection. The Deadzone column uses TreeItem::CELL_MODE_RANGE, meaning it can't be applied to them, unfortunately.

I avoided picking a color too bright as it would make the contrast between the text and the background too low, so it's just a tiny increase to work as a separator.

The StyleBox is fully transparent in the Classic theme, therefore it should not be affected.

Dark theme

Before After
before_dark after_dark

Light theme

Before After
before_light after_light

Classic style for reference:
old

@DeeJayLSP DeeJayLSP requested review from a team as code owners October 31, 2025 03:36
@DeeJayLSP DeeJayLSP marked this pull request as draft October 31, 2025 03:41
@DeeJayLSP DeeJayLSP marked this pull request as ready for review October 31, 2025 03:44
@ettiSurreal
Copy link
Contributor

ettiSurreal commented Oct 31, 2025

I think the spacing of the expand icon could be slightly improved, but that's probably a separate issue.
image

The spinboxes here should also visually stand out.
image

Also is it possible to give the subsections some slight rounding? It's really ugly and inconsistent with... literally everything else in the theme having it.

@passivestar
Copy link
Contributor

I agree with the linked complaint too, it was a technical compromise rather than a design choice. The coupling that you found is the reason why this problem needs a slightly more involved solution to make it possible to style them separately imo.

In addition to them being coupled and not supporting rounded corners there's also an issue of inspector sections having hardcoded alpha multiplier for nested sections. Because of that you can't use subtle background colors for top-level sections as the generated sub-sections become hardly noticeable way too quickly (in both themes), here's an example from this PR:

image

Those limitations made it hard to fit those elements into the gdscript theme in any tasteful way which is why I had to compromise and omit them entirely. But now that the theme has been nativized it would make sense to solve that.

All of those things needs to be drawing themable styleboxes to support rounded corners. Inspector sections will probably also need to be reimplemented using FoldableContainers eventually, but styleboxes are a good intermediate solution that will be much easier to implement for now.

@AThousandShips AThousandShips added this to the 4.x milestone Oct 31, 2025
@DeeJayLSP DeeJayLSP force-pushed the modern-prop-subsection branch from 331ab99 to c31eb5f Compare October 31, 2025 11:10
@DeeJayLSP DeeJayLSP requested a review from a team as a code owner October 31, 2025 11:10
@DeeJayLSP DeeJayLSP changed the title Modern Theme: Use prop_subsection Modern Theme: Use separate property for Input Map subsections Oct 31, 2025
@DeeJayLSP
Copy link
Contributor Author

DeeJayLSP commented Oct 31, 2025

I added a new property on both themes specifically for the Input Map settings. There shouldn't be side effects anymore, but custom themes that set prop_subsection won't affect it anymore unless updated to handle prop_subsection_action_map.

One problem at a time. The problem was the lack of contrast and highlights in Input Map, only that is solved here.

(I would probably make another PR to use a fully transparent subsection color specific to the Inspector in the future, that's the only place where setting prop_subsection alone worsened IMO)

@YeldhamDev
Copy link
Member

@DeeJayLSP I think @passivestar meant is that the ideal solution would be making those sections use StyleBoxes, so margins and rounded corners could be applied.

However, this component is not EditorInspector, but Tree. So such modification would be need to be applied to it in a way that somehow doesn't break compatibility with the background color settings that it currently uses.

@DeeJayLSP
Copy link
Contributor Author

DeeJayLSP commented Oct 31, 2025

I found a way to highlight at least the Action column without touching background colors:
image

It uses TreeItem::CELL_MODE_CUSTOM to draw a StyleBox behind it. Unfortunately I don't think this works with Deadzone items as.

As a side effect, Action TreeItems don't visually respond to hover or select anymore, but I don't think this is a problem as it wasn't possible in the old style anyway. It is possible to re-enable the selected highlight but not the hover.

The old style is unaffected as the StyleBox is fully transparent.

Two questions:

  1. Should it go like this anyway?
  2. If so, should the selected highlight be enabled? It is barely visible with this color, though.

@SilverWolveGames
Copy link

I completely agree with @DeeJayLSP

@DeeJayLSP DeeJayLSP force-pushed the modern-prop-subsection branch from c31eb5f to dd180bc Compare October 31, 2025 18:42
@DeeJayLSP
Copy link
Contributor Author

DeeJayLSP commented Oct 31, 2025

I found a way to highlight at least the Action column without touching background colors:

Pushed. Before and After images updated.

@DeeJayLSP DeeJayLSP force-pushed the modern-prop-subsection branch 2 times, most recently from 1751034 to 54b8a11 Compare October 31, 2025 18:50
@DeeJayLSP DeeJayLSP changed the title Modern Theme: Use separate property for Input Map subsections Modern Style: Use a style box for Input Map actions Oct 31, 2025
@akien-mga akien-mga modified the milestones: 4.x, 4.6 Oct 31, 2025
@DeeJayLSP
Copy link
Contributor Author

DeeJayLSP commented Oct 31, 2025

It should be possible to reuse this StyleBox for other TreeItems that previously relied on prop_subsection to get highlighted:

image image

For this PR, though, I will keep the focus on Input Map settings. I'll just use a proper naming convention for it to be used in future changes.

@DeeJayLSP DeeJayLSP force-pushed the modern-prop-subsection branch from 54b8a11 to 1190efb Compare October 31, 2025 20:48
@DeeJayLSP DeeJayLSP force-pushed the modern-prop-subsection branch 3 times, most recently from 8e18196 to 60d6c55 Compare November 1, 2025 17:22
@DeeJayLSP
Copy link
Contributor Author

Exposed a prop_subsection_round editor color, which can be used by custom themes to override the color.

@DeeJayLSP DeeJayLSP force-pushed the modern-prop-subsection branch from 60d6c55 to aee211b Compare November 1, 2025 18:35
@DeeJayLSP
Copy link
Contributor Author

Rebased on top of the recent change from #112277. All property renames addressed.

@DeeJayLSP DeeJayLSP requested a review from YeldhamDev November 1, 2025 18:38
@Repiteo Repiteo merged commit 417ce31 into godotengine:master Nov 3, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 3, 2025

Thanks!

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.

10 participants