本文介绍了如何让 Visual Studio 2012 使 ifdef 变灰而不是变暗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的代码中,有很多段落是 ifdef 的.对于以前版本的 Visual Studio,它们已变灰.但是,在 Visual Studio 2012 中,它们不再变灰而是变暗,即这些段落以语法突出显示方案的所有颜色出现,但饱和度较低.实现此功能的 Microsoft 程序员一定认为这非常酷,但在实践中,很难判断段落是处于活动状态还是非活动状态.

In our code there are lots of passages that are ifdef'ed out. With the former version of Visual Studio, they had been greyed out. With Visual Studio 2012, however, they are no longer greyed out but dimmed, i.e. these passages appear with all the colours of the syntax highlighting scheme, but with less saturated colours. The programmer at Microsoft who implemented this must have thought this very cool, but in practise it makes it really hard to tell if a passage is active or inactive.

有没有人找到一种方法来欺骗 Visual Studio 2012 使用旧的方式将不活动的段落变灰?

Has anyone found a way to tricking Visual Studio 2012 to using the old way of greying out inactive passages?

感谢您的回复

推荐答案

您有一个 Opacity 设置可以更改:

You have an Opacity setting you can change:

在工具中 ->选项 ->文本编辑器 ->C/C++ ->格式化您可以更改非活动代码不透明度百分比.默认值为 65,请将其更改为更高的值.

如果您想完全取消此操作,只需将 Disable Inactive Code Opacity 设置为 True.

这篇关于如何让 Visual Studio 2012 使 ifdef 变灰而不是变暗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 20:06