Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.1's menu bar is invisible on Simplified Chinese Windows 10 #385

Closed
CloudiDust opened this issue Apr 16, 2017 · 9 comments
Closed

2.0.1's menu bar is invisible on Simplified Chinese Windows 10 #385

CloudiDust opened this issue Apr 16, 2017 · 9 comments
Labels

Comments

@CloudiDust
Copy link

Affected: Poedit 2.0.1 on Windows 10 Professional (Simplified Chinese, 14393.953)

Step(s) to reproduce: Open Poedit 2.0.1.

On both of my Windows 10 machines, the menu bar of poedit 2.0.1 is invisible, while the older 1.8.x doesn't have this bug. It looks like this:

image

It doesn't matter which UI language is selected (English or Simplified Chinese), and the bug persists. While the menu bar is invisible, the menus can still be brought up with the shortcut keys like ALT+F.

@vslavik
Copy link
Owner

vslavik commented Apr 16, 2017

Please verify that you are really running 2.0.1 and not 2.0.

If you do, please provide much more information about your system. In particular, full information about your DPI settings, your screen resolution, your configured menu font size are necessary. That's the actual steps to reproduce.

Does changing your Windows UI language to English change anything? I don't think I'm capable of installing Windows in Chinese on my own to check…

@vslavik
Copy link
Owner

vslavik commented Apr 16, 2017

In fact, could you please try 2.0 (download link) as well? It's possible an attempt to fix it on HiDPI >200% systems (happened in 2.0) broke it for you...

@CloudiDust
Copy link
Author

I am running on 1920x1080 with 100% scaling and the other machine is 1366x768 with 100% scaling. I am also using the default font setting.

And yes, 2.0 is working for me. So it seems like the bug is indeed in that fix.

@CloudiDust
Copy link
Author

CloudiDust commented Apr 16, 2017

I have now tested with the English Windows UI, and:

  1. The manu bar of 2.0 and 2.0.1 both displayed correctly on English Windows UI no matter which UI language for poedit itself was selected.

  2. After switching back to Chinese Windows UI, 2.0 worked correctly while the bug appeared on 2.0.1.

I also repeated the Windows UI language switching but the bug would not go away.

So, the bug only appears on 2.0.1 with Chinese Windows UI.

@CloudiDust
Copy link
Author

CloudiDust commented Apr 16, 2017

I have looked at the code and didn't see anything language specific. (It is CreateWindowEx after all.) It seems like we hit some obscure Windows bug. But I am not familiar with Win32 API so I am not sure.

My screen has a DPI of 141 (15.6 inch at 1920x1080), so the scaling factor would be 1.46875, which is smaller than 2, the fixed scaling factor for the menu bar used in 2.0, so I guess a simple fix may be using a scaling factor (for the menu bar) that is at least 2?

@vslavik
Copy link
Owner

vslavik commented Apr 16, 2017

Can you please try this replacement Poedit.exe? https://jumpshare.com/v/N77Y80v1gtDRMXji35zM

I have looked at the code and didn't see anything language specific.

There isn't, but it seems the metrics must be ever-so-subtly different in Chinese localization of Windows.

My screen has a DPI of 141 (15.6 inch at 1920x1080), so the scaling factor would be 1.46875

Physical DPI is largely irrelevant, only Windows' scaling factor (which yours is 1.0) matters.

@CloudiDust
Copy link
Author

The bug is fixed in the replacement. Thanks.

Physical DPI is largely irrelevant, only Windows' scaling factor (which yours is 1.0) matters.

But

void InitHiDPIHandling()
{
    wxSize dpi = wxScreenDC().GetPPI();
    g_pxScalingFactor = dpi.y / 96.0;
}

I got the impression that the scaling factor was calculated based on the actual PPI of the screen (with the Windows scaling factor considered)? So the Physical DPI was not irrelevant?

@vslavik
Copy link
Owner

vslavik commented Apr 16, 2017

The bug is fixed in the replacement.

Thanks for confirmation!

was calculated based on the actual PPI of the screen

You're under the wrong impression that Windows API reports actual DPI ;) It doesn't, this value is solely based on the scaling factor (and is the default 96 DPI for 100% factor).

@CloudiDust
Copy link
Author

Thanks for confirmation!

Thanks for the quick fix!

You're under the wrong impression that Windows API reports actual DPI ;) It doesn't, this value is solely based on the scaling factor (and is the default 96 DPI for 100% factor).

TIL! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants