oskarsh / Yin-Yang

Auto Nightmode for KDE, Gnome, Budgie, VSCode, Atom and more
MIT License
618 stars 52 forks source link

UI doesn't react well with global scaling #48

Closed l0drex closed 2 years ago

l0drex commented 4 years ago

I'm running Manjaro with KDE Plasma. I have set global scaling to be at 125%. The UI now looks like this:

Main window: grafik

Settings page: grafik

It still works as expected, but doesn't look so good. Also, with more plugins in the settings page, I think this will get even worse. The wallpaper setting is already pretty small and parts of the version info are cropped.

oskarsh commented 4 years ago

Ok this is really weird, I just scaled up my global scale and it seems to work just fine, it's hard for me to debug this since I am not able to reproduce this.

Some time ago someone complained that Yin&Yang does not scale well on High Dpi display, I digged around QT Documentation and never really got so solve this. The best I could do at the time was to add a QT Parameter: Exec=env QT_AUTO_SCREEN_SCALE_FACTOR=1 sh /usr/bin/yin-yang This line can be found inside ~/.local/share/applications/Yin-Yang.desktop file.

This fixed it for high dpi displays, I can just assume that if you run Yin-Yang via the .desktop file (menu or krunner) this parameter messes it up again. You could try to run Yin-Yang via the Terminal and see if this fixes it for you. An alternative would be to edit the scale factor and play with it. There seems to be a recent QT Bug and it looks like Yin-Yang needs another method of scaling.

l0drex commented 4 years ago

Running from the terminal works fine. I'm using wayland and a Full HD display. PyQt5 is installed via package manager.

oskarsh commented 4 years ago

Can you try to run Yin-Yang from the Menu so the QT Parameter gets triggered.

l0drex commented 4 years ago

If I run it from the application menu, with the QT parameter, it looks like in the screenshot above.

oskarsh commented 4 years ago

I assume that the PyQt5 package intalled by the system package manager is causing this Problem. There are different versions of the PyQt package. The Version that you get by pip is more like a sandboxed Version that acts different than the package manager one. You could try to fix it by uninstalling the system package and make sure you have pyqt installed by the system.

However there are some other bugs involved with that Version but I assume that would fix it for now.

I feel like using QT has created more problems than it solved, especially when it comes to packaging. I consider a rewrite in GTK.