ManiacDC / TypingAid

Word AutoCompletion Utility
http://www.autohotkey.com/board/topic/49517-ahk-11typingaid-v2200-word-autocompletion-utility/
GNU General Public License v3.0
142 stars 45 forks source link

Add support for DPI Scaling (HiDPI or DPI Awareness) #55

Open ManiacDC opened 9 years ago

ManiacDC commented 9 years ago

When the system DPI is changed, TypingAid doesn't work well. The height and width of the ListBox are not computed correct. On Windows Vista and higher, the listbox displays in the wrong position for apps that don't support DPI awareness.

ManiacDC commented 9 years ago

https://github.com/ManiacDC/TypingAid/commit/fbb9c0c6998f924359efde981485fab7f709fbde

I added "-DPIScale" to the ListBox, allowing it to return the proper width and height. The Character Width issue was fixed as part of: https://github.com/ManiacDC/TypingAid/commit/5376c6add50482044c4ffe71c2bfd953f365e510

In Windows 8.1 I can detect that an application is not DPI aware, but in prior versions I cannot. I'm going to add an override option to the preferences.

ManiacDC commented 9 years ago

Added an override option in the preferences for prior versions of Windows. https://github.com/ManiacDC/TypingAid/commit/0f8bd9edfdf2a3e6ca816e7e82570cbfc31f9f42

Note that this has not been tested in 8.1+ to verify that the DPI scaling is detected properly.