Skip to content

Fix inherited style overrides and VN name label alignment - #2810

Open
Minato-chen wants to merge 1 commit into
dialogic-godot:mainfrom
Minato-chen:fix/inherited-style-overrides
Open

Minato-chen wants to merge 1 commit into
dialogic-godot:mainfrom
Minato-chen:fix/inherited-style-overrides

Conversation

@Minato-chen

@Minato-chen Minato-chen commented Aug 29, 2026 •

Copy link
Copy Markdown

Problem

Inherited styles did not always save or apply their settings correctly.

If a child style was missing local layer data, changing a setting could fail without showing an error. The Style Editor also treated inherited values as if they were saved directly in the child style.

When switching between inherited styles during a dialogue, Dialogic could use the wrong layer ID. This caused some settings, such as name label alignment, to return to their default values.

The VN textbox name label also kept anchors and offsets from the previous style. After several style changes, the label could appear in the wrong position.

Changes

  • Missing local layer data is created before saving a child override.
  • The Style Editor now keeps local overrides separate from inherited values.
  • Runtime style changes use the complete inherited layer list.
  • VN textbox name labels use Godot's layout presets to reset their anchors and offsets before applying their configured position.

Testing

I tested:

  • normal styles without inheritance;
  • Base → Child → Grandchild inheritance;
  • adding and resetting child overrides;
  • repeated changes between Left, Center, and Right name label alignment;
  • short and long character names;
  • style changes after resizing the game window.

Fixes #2698

@Jowan-Spooner

Copy link
Copy Markdown
Member

Hi @Minato-chen thank you for this PR. It works correctly. However as I'm still working on a pretty substantial rework of styles (#2738) I think I won't merge this for now, instead I'll try to make sure that my PR also works correctly in this scenario. I'll leave it open until that PR makes it into main, just in case these changes still make sense like this afterwards.

@Minato-chen

Copy link
Copy Markdown
Author

@Jowan-Spooner Thanks for testing it and for the update. That makes sense.

I'll leave this PR open while #2738 is in progress. I'm also happy to test the same inheritance and runtime style-switching scenarios again once the rework is ready.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Something is broken with inherited styles

2 participants