manjaro / manjaro-settings-manager

This repo has been archived. Our code is now hosted at
https://gitlab.manjaro.org/
GNU General Public License v3.0
18 stars 19 forks source link

HiDPI support #120

Open yustnip opened 6 years ago

yustnip commented 6 years ago

The app UI looks tiny on HiDPI screens.

screenshot from 2017-11-09 09-26-44

dniku commented 6 years ago

Even with scaling in Gnome set to 200%, there is a problem with notifications: they appear as bubbles next to the Manager's icon in the tray, and they are tiny. Reproducible on a HiDPI screen when there is a kernel update available.

fhdk commented 6 years ago

@philmmanjaro I would make a PR but unfortunately I have no idea on how to do this with C++ but I have solved this issue in a python app build with PyQt5.

The solution in Python is to import QCoreApplication and before initializing the actual application set an attribute named Qt.AA_EnableHighDpiScaling with the value True like this

from PyQt5.QtCore import Qt, QCoreApplication
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)

That was all it took to make PyQt5 hidpi aware.