Skip to content

Conversation

@Tc-Fast
Copy link
Contributor

@Tc-Fast Tc-Fast commented Oct 9, 2025

Closes #2061

I added the possibility to add icons and terminal icons in any color themes.

The default icon is assumed to be used on a light theme.
The only other standardized theme is "dark".

This change should be backwards compatible, since the default icon naming has not changed.
Also this should be future proof, since any further theme can be added.

@pmai
Copy link
Collaborator

pmai commented Oct 9, 2025

Technically this is not going to be backward compatible, as implementations that use the existing schema for parsing and validation will report an error on encountering files with multiple Icon elements, and likely break off processing of terminals and icons (potentially also breaking of processing of the whole FMU). That is not worth it for a purely UI style thing.

Given that the intent here is theming, I would suggest that there is no need for multiple Icon elements, as the path to the icon is not related to the icon entries. So as long as the measurement/placement info of the icon is the same across themes (which it really should be, as changing layout on switching themes would be a no-no), I would just suggest to add a naming scheme for additional icon files (as is already part of the PR), and be done with it.

For terminal icons this is slightly more problematic, as there is no way to then adjust the colors of the suggested connection lines, however that is a feature of dubious usefullness in any case, I would say.

@Tc-Fast
Copy link
Contributor Author

Tc-Fast commented Oct 10, 2025

Technically this is not going to be backward compatible, as implementations that use the existing schema for parsing and validation will report an error on encountering files with multiple Icon elements, and likely break off processing of terminals and icons (potentially also breaking of processing of the whole FMU). That is not worth it for a purely UI style thing.

It is only backwards compatible, if the import tools replace their schema files. That's what they should do for every release anyway.

Given that the intent here is theming, I would suggest that there is no need for multiple Icon elements, as the path to the icon is not related to the icon entries. So as long as the measurement/placement info of the icon is the same across themes (which it really should be, as changing layout on switching themes would be a no-no), I would just suggest to add a naming scheme for additional icon files (as is already part of the PR), and be done with it.

Right, the PR would allow to change the measurement/placement with the theming setting. That's not how I would suggest using it. I will remove this degree of freedom.

For terminal icons this is slightly more problematic, as there is no way to then adjust the colors of the suggested connection lines, however that is a feature of dubious usefullness in any case, I would say.

So we should omit the theming of terminals then altogether or should we just use an analogous naming schema for terminal icons?

I reverted the schema changes. The icon files now use this naming schema {iconName}-{theme}.{fileending} only.

@Tc-Fast Tc-Fast closed this Nov 4, 2025
@Tc-Fast Tc-Fast deleted the dark_icon branch November 4, 2025 06:46
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.

Add icon theming

2 participants