Skip to content

Fix wrong icons in Light theme#656

Open
thomas-tu wants to merge 18 commits intomasterfrom
bugfix/low-res-light-icons
Open

Fix wrong icons in Light theme#656
thomas-tu wants to merge 18 commits intomasterfrom
bugfix/low-res-light-icons

Conversation

@thomas-tu
Copy link
Collaborator

@thomas-tu thomas-tu commented Mar 3, 2026

Purpose of this PR

When using the Editor Light theme, some icons pulled are from the Dark theme. The affected icons are reference throught the [Icon(icon-path)] attribute so they follow the rule where file paths should be named as following:

my-icon.png --> light theme
d_my-icon.png --> dark theme

Probuilder handles the loading and the differentiation between both skins for most icon, by using its own IconUtility.GetIcon() but it follow differents rules:

my-icon.png --> dark theme
my-icon_Light.png --> light theme

I've updated the method so we can override for the specific case where the targeted icon is also being used with the IconAttribute. It's the case for one of the icon where it's in an attribute, but also being loaded through the API.

Before:
image

After:
image

Links

Jira: UUM-133531

Comments to Reviewers

[List known issues, planned work, provide any extra context for your code.]

@thomas-tu thomas-tu changed the title Bugfix/low res light icons Fix wrong icons in Light theme Mar 3, 2026
@codecov-github-com
Copy link

codecov-github-com bot commented Mar 3, 2026

Codecov Report

All modified and coverable lines are covered by tests ✅

@@           Coverage Diff           @@
##           master     #656   +/-   ##
=======================================
  Coverage   36.05%   36.06%           
=======================================
  Files         277      277           
  Lines       34909    34917    +8     
=======================================
+ Hits        12588    12593    +5     
- Misses      22321    22324    +3     
Flag Coverage Δ
probuilder_MacOS_6000.0 34.52% <ø> (-0.06%) ⬇️
probuilder_MacOS_6000.3 34.52% <ø> (-0.06%) ⬇️
probuilder_MacOS_6000.4 34.52% <ø> (-0.06%) ⬇️
probuilder_MacOS_6000.5 34.52% <ø> (-0.06%) ⬇️
probuilder_MacOS_6000.6 34.52% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 3 files with indirect coverage changes

@thomas-tu thomas-tu self-assigned this Mar 3, 2026
@thomas-tu thomas-tu requested a review from marnadeau March 4, 2026 16:10
Copy link

@marnadeau marnadeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The helpbox custom icon is not showing up on dark theme

Image

Also, all editor helpbox have recently been updated to use a 16px. Could you change the icon size to make them match (and fix the blurry effect at the same time)
Thanks!

Copy link

@unity-kristinn unity-kristinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix problems with ci

also

getting this log message when updating package to this pr (also, shouldn't this be a warning? not a message?)

Image

@thomas-tu
Copy link
Collaborator Author

please fix problems with ci

also

getting this log message when updating package to this pr (also, shouldn't this be a warning? not a message?)

Image

Thanks. I'll check, but it's a message from the Editor I think.

@thomas-tu
Copy link
Collaborator Author

thomas-tu commented Mar 10, 2026

[9acc831](/Unity-Technologies/com.unity.probuilder/pull/656/commits/9acc8316fe9ecf47e2f723c98a1a8ae409a52b25)

@unity-kristinn, it should fixed with 9acc831.

Also, all editor helpbox have recently been updated to use a 16px. Could you change the icon size to make them match (and fix the blurry effect at the same time)

@marnadeau I updated the code so the new styling is applied on 6.5+. Helpbox still has 32px icon in all the previous versions of the Editor.

Copy link

@marnadeau marnadeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is perfect now 🙏

@thomas-tu thomas-tu requested a review from varinotmUnity March 12, 2026 15:07
Copy link
Contributor

@varinotmUnity varinotmUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

4 participants