开发者

how do I detect whether windows is in high contrast mode, or it displays large font or extra large font?

开发者 https://www.devze.com 2023-01-04 14:42 出处:网络
how do I detect whether windows is in high contrast m开发者_StackOverflow中文版ode, or it displays large font or extra large font?

how do I detect whether windows is in high contrast m开发者_StackOverflow中文版ode, or it displays large font or extra large font?

I need to provide accessibility support in my javascript.

Thanks.


See this post.

in high contrast mode on Windows, background images should be set to "none" and it also changes the background color. This should override any CSS stylesheet. So you can perform some javascript to detect it after initial rendering.

Edit: You said you actually want to do this in Java. This has been covered before on SO:

Turns out the win.highContrast.on property was added in Java 1.4.1 for this purpose.


Try SystemParametersInfo function with the following parameters:

  • SPI_GETHIGHCONTRAST
  • SPI_GETICONTITLELOGFONT
0

精彩评论

暂无评论...
验证码 换一张
取 消