File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ public static Image ToTransparent(this Image image, float opacity = 0.5F)
2020 return bitmap ;
2121 }
2222
23+ public static Image ToInferredIcon ( this Image image , float opacity = 0.5F )
24+ {
25+ return AppConfig . DimInferredIcons ? image . ToTransparent ( opacity ) : image ;
26+ }
27+
2328 public static Image ResizeImage ( this Image image , int width , int height )
2429 {
2530 //return image.GetThumbnailImage(width, height, null, System.IntPtr.Zero);//质量稍微低一点
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public string RegPath
5252 if ( List != null )
5353 {
5454 Image = ItemIcon . ToBitmap ( ) ;
55- if ( ! HasIcon ) Image = Image . ToTransparent ( ) ;
55+ if ( ! HasIcon ) Image = Image . ToInferredIcon ( ) ;
5656 BtnSubItems . Visibility = IsMultiItem ? Visibility . Visible : Visibility . Collapsed ;
5757 }
5858 }
@@ -291,7 +291,7 @@ public string ItemCommand
291291 {
292292 if ( ! TryProtectOpenItem ( ) ) return ;
293293 Registry . SetValue ( CommandPath , "" , value ) ;
294- if ( ! HasIcon ) Image = ItemIcon . ToBitmap ( ) . ToTransparent ( ) ;
294+ if ( ! HasIcon ) Image = ItemIcon . ToBitmap ( ) . ToInferredIcon ( ) ;
295295 }
296296 }
297297
@@ -478,7 +478,7 @@ private void DeleteIcon()
478478 {
479479 IconLocation = null ;
480480 HasLUAShield = false ;
481- Image = Image . ToTransparent ( ) ;
481+ Image = Image . ToInferredIcon ( ) ;
482482 }
483483
484484 private void UseShieldIcon ( )
@@ -494,7 +494,7 @@ private void UseShieldIcon()
494494 }
495495 else
496496 {
497- Image = Image . ToTransparent ( ) ;
497+ Image = Image . ToInferredIcon ( ) ;
498498 }
499499 }
500500 }
Original file line number Diff line number Diff line change @@ -291,6 +291,12 @@ public static bool StripMenuMnemonics
291291 set => SetGeneralValue ( "StripMenuMnemonics" , value ? 1 : 0 ) ;
292292 }
293293
294+ public static bool DimInferredIcons
295+ {
296+ get => GetGeneralValue ( "DimInferredIcons" ) != "0" ;
297+ set => SetGeneralValue ( "DimInferredIcons" , value ? 1 : 0 ) ;
298+ }
299+
294300 public static bool RequestUseGithub
295301 {
296302 get
Original file line number Diff line number Diff line change @@ -379,6 +379,7 @@ public static class Other
379379 public static string HideDisabledItems { get ; set ; }
380380 public static string HideSysStoreItems { get ; set ; }
381381 public static string StripMenuMnemonics { get ; set ; }
382+ public static string DimInferredIcons { get ; set ; }
382383 public static string SetPerceivedType { get ; set ; }
383384 public static string SetDefaultDropEffect { get ; set ; }
384385 public static string TopMost { get ; set ; }
Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ CommandCannotBeEmpty = 菜单命令不能为空!
215215StringParsingFailed = 本地化字符串解析失败!
216216TextLengthCannotExceed80 = 菜单文本过长,长度不允许超过80!
217217ConfirmDeleteBackupPermanently = 确认是否永久删除此项?\r\n此操作无法还原,请谨慎操作!
218+ ConfirmDeletePermanently = 确认是否永久删除此项?\r\n此操作无法还原,请谨慎操作!
218219DeleteButCanRestore = 确认删除此菜单的注册表项目?\r\n由于启用了自动备份(默认启用),\r\n删除后可在备份文件夹中还原。
219220ConfirmDeleteReference = 确认是否移除对该项目的引用?
220221ConfirmDelete = 确认是否删除该项?
@@ -324,6 +325,7 @@ SetCustomEngine = 设置搜索引擎 (以 %s 代替搜索关键词)
324325HideDisabledItems = 隐藏已禁用的菜单项目
325326HideSysStoreItems = 隐藏公共引用中的系统菜单
326327StripMenuMnemonics = 隐藏菜单项名称中的快捷键符号(&)
328+ DimInferredIcons = 对推测的图标使用半透明效果
327329SetPerceivedType = 设置扩展名为 %s 的文件感知类型为
328330SetDefaultDropEffect = 设置文件对象默认拖拽命令为
329331TopMost = 使窗口始终在屏幕最上方
You can’t perform that action at this time.
0 commit comments