microsoft / microsoft/terminal
Refactor IconPathConverter::IconWUX() to not set icon size
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
I hit this problem pretty regularly whenever I'm working with icons (especially in the settings UI).
`IconPathConverter::IconWUX()` is a _really_ powerful function that we use throughout the codebase to convert an icon path/code into an actual icon UI. However, we explicitly set the size of the icon on the way out. This was great when it was introduced because it meant that the icons in the dropdown, tabs, etc. all had the correct size. But as the project has grown to use those icons elsewhere (namely in the Settings UI), this has become a huge pain. Icons aren't always drawn to be the same size, especially if they're coming from different sources (i.e. hardcoded font icon vs evaluated icon in profile).
I'd update it whenever I hit the problem, but it's realistically a fundamental enough change that it _will_ have side effects. I'd rather have it be its own change and audit the app to make sure it doesn't break anything.
## References
- https://github.com/microsoft/terminal/blob/3ec372c176ff0dca6f708dccd869e8b5ada87f7b/src/cascadia/UIHelpers/IconPathConverter.cpp#L318
- https://github.com/microsoft/terminal/tree/main/src/cascadia/TerminalSettingsEditor
Contributor guide
Research direction
Start with src/cascadia/UIHelpers/IconPathConverter.cpp at IconPathConverter::IconWUX(), then audit its usages across the codebase, especially src/cascadia/TerminalSettingsEditor. Check each caller for assumptions about the converter setting icon size and verify that removing that behavior does not break dropdowns, tabs, or Settings UI icons.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100