HiDPI detection improvement
Merge pull request #565 from Andre-487/hidpi-improvement

HiDPI detection improvement