-
Notifications
You must be signed in to change notification settings - Fork 7
add DPI awareness, fix resource translation #13
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
Conversation
src/cmdtab.c
Outdated
| } | ||
|
|
||
| textRect.bottom -= ICON_PAD; // *** this lifts the app text up a little *** | ||
| textRect.bottom -= ICON_PAD / 2; // *** this lifts the app text up a little *** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's been too much now. The text touched the selection rectangle.
|
After your explanation in #10, I think I prefer the 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 Thanks for the contribution :) |
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. |
|
|
||
| // Avoid blurry window content (#10) | ||
| SetProcessDPIAware(); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this was after the AlreadyRunning clause (as I initially planned), the message box in AskAutorun() would have been still blurry. So I had to move it up.
Highlights - Mouse support! (#6) - Now using a new technique to fix stuck keys and match Windows Alt-Tab behaviours (#4, #9) - Fix wrong window selection after using Alt-Q - If switching to window fails play unintrusive sound instead of show error message box (#21) - First step towards DPI awareness by adding manifest (#10, #13) - Dev: better support for non-MSVC and non-CMake envs (i.e. mingw-w64) Changelog - various code style changes (include style, conditionals, whitespace, comments, var names, return over break in case statements) - some newlines and file encoding changes - when switching fails play sound instead of show error message box - remove redundant Debug function - support stdout and attached debuggers for debug output (mingw gcc vs MSVC) - use GetLastActivePopup when calling SetForegroundWindow (hmm, why exactly?) - move ReceiveLastInputEvent down to cmdtab impl. - new config option for "askAutorun" - remove near-useless config option "restoreOnCancel" and RestorableWindow - add some more debug printing and don't key repeat debug hotkeys - split SelectNextWindow & SelectFirstWindow into *Window and *App variants - use new technique to avoid stuck mod keys and match Windows Alt-Tab behavior - new SendModKeysUp function called on (mod1Up || mod2Up) - skip injected mod keys up kbd hook messages - consume (mod1Up || mod2Up) kbd hook messages - call ReceiveLastInputEvent only on ShowSwitcher - fix selection bug after using Alt-Q - don't ReleaseDC in in OnWindowPaint (hmm, why?) - rename WindowProcedure to SwitcherWindowProcedure - rename "OnWindowEvent" functions to "OnSwitcherEvent" - mouse support! - fix hourglass mouse cursor - switch fallthrough in EventHookProcedure - remove WM_DESTROY - use build type Debug -> MinSizeRel in CMakeLists.txt - reword "run automatically as administrator" to "autorun as admin" in README.md - reword "run automatically on login" to "autorun on login" in README.md - fix locale info in .rc -- Thanks to @german-one for spotting this and contributing fixes! (#11, #13) - use .manifest: Currently implements UAC, Visual Styles, and DPI awareness - The manifest is required for updated visual styles on non-MSVC compilers - add a simple Makefile to support non-CMake builds
- scale switcher and icons - (TODO) respond to WM_DPICHANGED - closes #10 and #13 Thanks to @german-one for initial work on DPI (#13)
|
Proper DPI scaling support added in a7972f9. Thanks for kicking things off and documenting issues that needed addressing. Finally closing this now :) |
Make the app DPI aware to avoid blurry window content.
closes #10
Fix encoding and translation values in the resource script.
related #11