Skip to content

Add setting to toggle dimming of inferred menu item icons#136

Merged
Jack251970 merged 1 commit into
Jack251970:masterfrom
KamilDev:dim-inferred-icons-setting
Apr 22, 2026
Merged

Add setting to toggle dimming of inferred menu item icons#136
Jack251970 merged 1 commit into
Jack251970:masterfrom
KamilDev:dim-inferred-icons-setting

Conversation

@KamilDev
Copy link
Copy Markdown

Summary

  • Adds a new DimInferredIcons setting (defaults to on, matching current behavior).
  • When a menu item's registry entry has no Icon value (and no HasLUAShield), the app derives an icon from the command's executable / file-type association / a generic blank page and renders it semi-transparent. Users who prefer a uniform look can now turn that dimming off so inferred icons appear at full opacity alongside declared ones.
  • Introduces an Image.ToInferredIcon() helper that replaces the four !HasIconToTransparent() call sites in ShellItem.cs. The InvalidItem placeholder in ShellSubMenuDialog.cs is left as-is — its transparency signals a broken menu entry, not an inferred icon.
  • Adds the toggle to the settings page and DimInferredIcons strings to AppLanguageDic.ini (zh-CN default), zh-CN.ini, and en-US.ini.

Test plan

  • With the setting on (default), menu items without an explicit Icon registry value still render semi-transparent.
  • Toggling the setting off makes those items render at full opacity on the next refresh.
  • Deleting an icon on an item (context menu → delete icon) respects the setting.
  • Toggling HasLUAShield off on an item with no Icon value respects the setting (note: surfaces a pre-existing refresh bug where the shield image stays until you navigate away — not caused by this PR).

When a menu item's registry entry has no Icon value (and no HasLUAShield),
the app derives an icon from the command's executable, the file-type
association, or a generic blank page, then renders it semi-transparent.
The new DimInferredIcons setting lets users turn that dimming off so
inferred icons appear at full opacity alongside declared ones. Default
is on, preserving existing behavior.
@Jack251970 Jack251970 merged commit 3fe7e10 into Jack251970:master Apr 22, 2026
2 checks passed
Copy link
Copy Markdown
Owner

@Jack251970 Jack251970 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@KamilDev KamilDev deleted the dim-inferred-icons-setting branch April 22, 2026 11:33
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.

2 participants