add DPI awareness, fix resource translation
Make the app DPI aware to avoid blurry window content.
closes #10
Fix encoding and translation values in the resource script.
related #11
Probably I should've added some screenshots 😄 (HiDPI display, 150% scaling)
FWIW In the below table, images are resized to fit into the cells. If you open them in separate browser tabs you'll see that the switcher window is rendered smaller when it is DPI aware.
| new | before |
|---|---|
Last line is the encoding thing.
EDIT: Thanks to the screenshots, I realized that I forgot to add the visual styles to the manifest.
After your explanation in #10, I think I prefer the SetProcessDPIAware()-route. I've yet to test it myself, but have implemented changes locally like yours in #11 to enable my new toolchain, test this change, and eventually pick up another release.
I'm unhappy about the text padding. I will have to inspect how Microsoft's Alt-Tab scales the window title, window preview, and paddings, and go for something equivalent. The way it looks in your screenshot is no good, although I will accept it temporarily.
I will accept this pull request with these changes: go from using the manifest file to using SetProcessDPIAware().
Thanks for the contribution :)
I'm unhappy about the text padding.
I failed to calculate it based on the text measuring performed a few lines above. Let me try again. The reason why it was necessary to update the padding is that the text size appears still the same as before, while DPI awareness makes that the window is rendered smaller.
Now the text is vertically centered in the gap between icon and window bottom. It looks like being closer to the icon because the selection rectangle is bigger than the icon. What do you think?
Proper DPI scaling support added in a7972f9. Thanks for kicking things off and documenting issues that needed addressing. Finally closing this now :)