Skip to content

Make iterating over theme changes faster #12500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gitsomebit opened this issue May 25, 2025 · 1 comment
Open

Make iterating over theme changes faster #12500

gitsomebit opened this issue May 25, 2025 · 1 comment

Comments

@gitsomebit
Copy link

gitsomebit commented May 25, 2025

Describe the project you are working on

Creating themes for my application

Describe the problem or limitation you are having in your project

Iterating on theme adjustments—especially when working with both light and dark themes—is currently slow and tedious. Although styleboxes can be reused across GUI (Control) nodes, fine-tuning specific properties like corner_radius or font color requires manual changes across multiple style states (default, hover, pressed, disabled, etc.).

This becomes particularly painful in scenarios like:

  1. Updating corner_radius across all GUI elements: each stylebox must be edited individually for every state.

  2. Tweaking font or icon colors: changes must be applied manually to each control node for every interaction state.

These small adjustments compound and result in a significant loss of productivity and momentum.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Introduce a more flexible and centralized system for managing theme values. Specifically, give users the ability to define shared parameters that can be referenced across multiple theme properties—such as colors, constants, stylebox values, and font settings—making global changes easier and more efficient.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I see 2 main options:

Option 1: Centralized Theme Parameter Store

Expand the existing theming system to allow key properties—like colors, constants, font sizes, and stylebox attributes—to be defined as reusable resources or variables.

If converting individual properties into resources isn’t feasible, implement a Global Value Store (e.g., in Project Settings > Globals > Theme Parameters). This would behave similarly to shader uniforms: theme properties could reference values by key, allowing centralized control over UI styling.

Conceptionally it would look something like this:
Image

The Global Value Store could look similar to the shader parameters - being referencable by themes:

Image


Option 2: Local Theme Parameters

Enable users to define parameterized values directly within the theme resource itself. This approach provides several benefits:

  1. Theme portability: Once a base theme is created, duplicating and customizing it for different applications or light/dark modes is simple—just tweak the local parameters.

  2. Encapsulation: Parameters are bundled with the theme resource itself, removing the need to manage a separate global parameter list and manually reconnect values for each new theme.

Conceptionally:
Image

Mockup Local Theme Parameters:
Image


Option 3: Hybrid Approach with Local–Global Parameter Referencing

Support both global and local parameter workflows, with the added flexibility that local theme parameters can reference global parameters.

This offers the best of both worlds:

  • Global Parameters provide consistent styling across multiple themes (exp. corner radius).

  • Local Theme Parameters encapsulate custom values within each theme, making them self-contained, portable and easier to manage.

  • Chaining: Local parameters could reference global ones as fallbacks or base values—allowing users to override them locally when needed while still benefiting from centralized control.

Benefits:

  • Drastically reduces the time required to make global visual changes.
  • Encourages the use of reusable, modular design patterns for UI.
  • Makes theme creation and adaptation significantly more approachable and scalable.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Themes are used by all significant application. Workarounds require a significant amount of work despite theming being essential

Is there a reason why this should be core and not an add-on in the asset library?

Themes are core

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

No branches or pull requests

2 participants