windows ShellIconOverlayIdentifiers - 为什么这么少?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4411336/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ShellIconOverlayIdentifiers - why so few?
提问by rbellamy
At this point, everyone knows that there's a limit to the number of ShellIconOverlayIdentifiers
(from MSDN):
此时,大家都知道数量是有限制的ShellIconOverlayIdentifiers
(来自MSDN):
The number of different icon overlay handlers that the system can support is limited by the amount of space available for icon overlays in the system image list. There are currently fifteen slots allotted for icon overlays, some of which are reserved by the system. For this reason, icon overlay handlers should be implemented only if there are no satisfactory alternatives
系统可以支持的不同图标覆盖处理程序的数量受系统图像列表中图标覆盖可用空间量的限制。目前有 15 个插槽分配给图标覆盖,其中一些是系统保留的。因此,只有在没有令人满意的替代方案时才应实施图标覆盖处理程序
I can understand the 15 overlay limt in Windows 95. But in an environment where there's Gigs of RAM, numerous Cores, and GPUs, is there some technical reason for such a low number in a modern operating system?
我可以理解 Windows 95 中的 15 个覆盖限制。但是在有大量 RAM、众多内核和 GPU 的环境中,现代操作系统中如此低的数量是否存在某些技术原因?
And why isn't this value configurable?
为什么这个值不可配置?
Before giving the 'performance' answer, consider:Windows allows for configuration such that you can kill performance... why pick on this issue specifically?
在给出“性能”答案之前,请考虑:Windows 允许进行配置以降低性能……为什么要专门选择这个问题?
采纳答案by Cody Gray
Unless someone here happens to work on the Windows Shell team, I doubt that you're going to get an answer that really addresses the technical limitations and how they affect the design choice. But I'll try...
除非这里有人碰巧在 Windows Shell 团队工作,否则我怀疑您是否会得到真正解决技术限制以及它们如何影响设计选择的答案。但我会努力...
My guess is that there isn't any technical limitation, or at least there isn't one now. The real reason is presumably that no one has ever taken the time to sit down and update the code, the design, and the spec to lift this limitation.Features aren't implemented by default, and just because the computing environment has changed in the last few years doesn't mean that someone sat down and rewrote Windows to take full advantage of all those changes.
我的猜测是没有任何技术限制,或者至少现在没有。真正的原因大概是没有人花时间坐下来更新代码、设计和规范来解除这个限制。默认情况下不会实现功能,仅仅因为计算环境在过去几年发生了变化并不意味着有人坐下来重新编写 Windows 以充分利用所有这些变化。
You should also consider that is more than likely a conscious design choice, rather than an imposed limitation.Raymond Chen (who actually doeswork on the shell team) published a blog entryresponding to the uproar about Windows 7 removing the "sharing hand" overlay. He makes a compelling argument that the icon overlay is really not a desirable way of showing information (above and beyond the fact that the system is limited to 15) [emphasis added]:
您还应该考虑这很可能是一种有意识的设计选择,而不是强加的限制。雷蒙德陈(究竟是谁做的外壳团队合作)发表了博客条目回答有关Windows 7的沸沸扬扬删除“共享手”覆盖。他提出了一个令人信服的论点,即图标覆盖确实不是显示信息的理想方式(超出系统限制为 15 的事实)[强调]:
Generally speaking, overlays are not a good way of presenting information because there can be only one overlay per icon, and there is a limit of 15 overlays per ImageList. If there are two or more overlays which apply to an item, then one will win and the others will lose, at which point the value of the overlay as a way of determining what properties apply to an item diminishessince the only way to be sure that a property is missing is when you see no overlay at all. (If you see some other overlay, you can't tell whether it's because your property is missing or because that other overlay is showing instead of yours.)
一般来说,叠加并不是一种很好的信息呈现方式, 因为每个图标只能有一个叠加,并且每个 ImageList 有 15 个叠加的限制。如果有两个或更多叠加层适用于一个项目,那么一个将获胜,其他将失败,此时作为确定哪些属性适用于项目的方式的叠加层的价值会减少,因为这是唯一确定的方法缺少属性是当您根本看不到叠加层时。(如果您看到其他叠加层,则无法判断是因为您的资产丢失了,还是因为显示的是其他叠加层而不是您的资产。)
It seems reasonable to me that the extra clutter added to the shell is simply not worth it in the majority of real-world cases. The Windows Shell team obviously reached the same conclusion and cut the "sharing hand" overlay. Raymond's direct explanation:
在我看来,在大多数实际情况下,添加到外壳中的额外杂物根本不值得。Windows Shell 团队显然得出了相同的结论,并削减了“共享手”覆盖。雷蒙德的直接解释:
Given the changes in how people use computers, sharing information is becoming more and more of the default state. When you set up a HomeGroup, pretty much everything is going to be shared. To remove the visual clutter, the information was moved to the Details pane.
鉴于人们使用计算机方式的变化,共享信息越来越成为默认状态。当您设置家庭组时,几乎所有内容都将被共享。为了消除视觉上的混乱,信息已移至“详细信息”窗格。
And, I know you specifically asked not to mention performance, but Windows really does tryto keep you from shooting yourself in the foot.Users demand responsiveness in the shell, and overlay icons can interfere with this. As further evidence that they are not the priority, another blog postby the same Raymond Chen chastises:
而且,我知道你特别要求不要提及性能,但 Windows 确实试图阻止你在脚下射击。用户需要 shell 中的响应能力,而覆盖图标可能会干扰这一点。作为进一步的证据,证明他们是不是优先,另一篇博客中由同雷蒙德陈惩戒:
Another example of applications having a selfish view of performance came from a company developing an icon overlay handler. The shell treats overlay computation as a low-priority item, since it is more important to get icons on the screen so the user can start doing whatever it is they wanted to be doing. The decorations can come later. This company wanted to know if there was a way they could improve their performance and get their overlay onto the screen even before the icon shows up, demonstrating a phenomenally selfish interpretation of "performance".
另一个对性能抱有自私看法的应用程序示例来自一家开发图标覆盖处理程序的公司。Shell 将覆盖计算视为低优先级项目,因为在屏幕上显示图标更为重要,这样用户就可以开始做他们想做的任何事情。装饰品可以晚点来。这家公司想知道是否有一种方法可以提高他们的性能,甚至在图标出现之前就将其叠加到屏幕上,展示了对“性能”的一种非常自私的解释。
回答by Bruce
回答by narration_sd
This is all very well and good, as explained by Cody Grey, but frankly it is pretty unimaginative, and as reported behind the scenes, sounding a bit frustrated
正如 Cody Grey 所解释的,这一切都非常好,但坦率地说,它非常缺乏想象力,而且正如幕后报道的那样,听起来有点沮丧
In 2015 and with Windows 10, surely there can and needs to be a better ability, as I noted about thirty overlays present and had to prioritize ones I wanted most to see, which is not what you want most people to worry about at all. Also I see aggressive vendors like Box over-competing to try to prioritize themselves, and that will never go any place good.
在 2015 年和 Windows 10 中,肯定可以而且需要有更好的能力,正如我注意到大约有 30 个叠加层,并且必须优先考虑我最想看到的那些,这根本不是你想让大多数人担心的。此外,我还看到像 Box 这样激进的供应商为了优先考虑自己而过度竞争,这永远不会有任何好处。
Here's a possibility. What if multiply overlaid icons had a generic overlay indicator; a small rectangle matrix of multiple colors like the Google Chrome Apps button? Singly overlaid would just show the overlay out of a long list.
这是一种可能性。如果多重叠加图标有一个通用的叠加指示器会怎样?像 Google Chrome Apps 按钮一样的多种颜色的小矩形矩阵?单独叠加只会显示长列表中的叠加。
Then when the mouse pointer meets the icon, a small flyout window collects all the icon variations to view (at small icon size or a little larger). Each overlaid icon in turn announces by tooltip what it is, when you mouse over.
然后,当鼠标指针遇到图标时,一个小的弹出窗口会收集所有要查看的图标变体(以小图标大小或稍大一点)。当您将鼠标悬停在上方时,每个重叠的图标依次通过工具提示宣布它是什么。
Now you can have all the icon overlays you need, for state in various clouds, for repository indications as for Tortoise tools, and so forth.
现在,您可以拥有所需的所有图标覆盖,用于各种云中的状态、存储库指示以及 Tortoise 工具等。