sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
809 stars 39 forks source link

Right click menu unusable in Open/Save window using Windows w/ high contrast theme #1380

Closed dev169 closed 1 year ago

dev169 commented 8 years ago

Summary

Using a high contrast theme on Windows 10, the right click menu is not displayed correctly.

Expected behavior

Here is how it is supposed to look (from Atom):

atom_high_contrast

Actual behavior

sublime_high_contrast

Steps to reproduce

  1. Use Windows (tested on Windows 10)
  2. Enable a High Contrast theme
  3. Open SublimeText
  4. Navigate to File > Open File...
  5. Right click on some file

    Environment

    • Operating system and version:
    • [X] Windows 10
    • Sublime Text:
    • Build 3118

      Extra info

This issue also plagues other older software, like Photoshop CC 2014. I guess it comes down to SublimeText not using the native (modern) Open/Save window for the newer OS versions.

wbond commented 8 years ago

This sounds like a bug with Windows…

dev169 commented 8 years ago

Thanks for the fast reply.

I'd argue that if Atom and actually all recently developed Windows applications can handle this correctly, Sublime ought to as well. I think it warrants more investigation, especially considering the impact it can have for developers that depend on accessibility features.

I don't write software for Windows, but if there is anything I can do to point to the right direction please let me know.

wbond commented 8 years ago

Atom only supports Windows 7 and newer, so they can use APIs that are unavailable on older versions of Windows.

We currently use https://msdn.microsoft.com/en-us/library/windows/desktop/ms646927(v=vs.85).aspx since it also supports Windows XP, which is currently supported by Sublime Text.

While the MSDN page indicates that the Common Item Dialog has "superseded" GetOpenFileName, it does not indicate the function has been deprecated. It would seem to me this is a bug with Windows 10, and should ideally be reported there.

Part of the reason I believe this is because without the high-contrast theme the dialog looks and works perfectly fine. With high-contrast, the buttons look like they are from Windows 7 and the menu is broken. Most likely Microsoft QA didn't cover the combination of high-contrast with applications supporting multiple versions of Windows.

dev169 commented 8 years ago

Great analysis. You'll note that it supports the conclusion of my initial report.

Backwards compatibility is very important, agreed, but Windows XP is an aging OS (EOL reached in 2014), and if support must be maintained indefinitely by SublimeText, maybe it should be special-cased. I think it would be worthwhile to embrace the newer Windows API when running on Vista and later.

Do you think this might be possible?

I'm leaving a link to a Notepad++ related discussion for some additional information. The latest version, 6.9.2, looks OK and they haven't dropped support for XP yet (I think it is planned for v7 though).

Regarding reporting this to Microsoft, I'm not sure it would be considered a Windows 10 bug, since my understanding from the linked MSDN page is that applications running in Vista and later are expected to use the newer API.

wbond commented 8 years ago

I see no indication that this is not a bug in Windows. There is no way it can be considered reasonable to have a context menu display no text. Clearly the text is there and it functions properly when not in high-contrast mode. The documentation makes it clear that it has been superseded, but not deprecated or end-of-life'ed.

Since this issue is important to you, I think it only makes sense to report it to Microsoft. At some point I will probably look into seeing if it is possible to link against newer Windows APIs while maintaining support. (I'm relatively new to the desktop world myself.)


Dropping Windows XP support is a completely different issue.

My previous discussions with Jon indicate that changing ST3 to drop Windows XP support would need some clear upsides. Browser statistics from https://packagecontrol.io indicate we have more users running XP than OS X 10.9, 10.8 and 10.7 combined. We are talking about more than ten thousand users no longer being able to run Sublime Text. That day will come someday, but I don't believe that day is today.

dev169 commented 8 years ago

Not to turn this philosophical, but if there is a way to avoid hitting a bug, shouldn't one attempt to do that? It makes sense, even if, strictly speaking, you don't have to. If you do find time to look into it more, it would be appreciated.

Thanks for the discussion and also sharing the XP statistics, which are quite surprising. To clarify, I don't think support should be dropped, just that XP should not be the common denominator.