paljsingh / impartus-downloader

Download Impartus lectures, convert to mkv for offline viewing.
GNU General Public License v3.0
23 stars 8 forks source link

[Bug]: Theme color update does not update colors on Linux (Ubuntu) #80

Closed paljsingh closed 3 years ago

paljsingh commented 3 years ago

Investigate,

on first glance, this seems to be due to system themes using gtk library, for the impartus app to update itself with the gtk theme colors might require qt5ct (and dependent libs) to be installed.

Check if any additional variables need to be exported..

paljsingh commented 3 years ago

On linux, PySide2 must be installed as system-wide package to access the currently selected theme settings. A pip based installation falls back to Fusion theme, and won't pick up the run time changes in the theme settings.

Steps needed in order to use system theme settings on linux.

  1. remove pip Pyside2 installation: $ pip3 uninstall PySide2 also remove any system wide Pyside2 pip install $ sudo pip3 uninstall PySide2

  2. Qt5ct is not needed, so just ensure the current envrionment does NOT have the Qt5ct variable $ env | grep QT_QPA_PLATFORMTHEME The above command should show empty result.

  3. Install PySide2 and dependent components as system wide package.

$ sudo apt-get install python3-pyside2.qtuitools python3-pyside2.qtwidgets libpyside2-py3-5.14

  1. Ensure to use PySide2 api, in case there also exists a Qt5/Qt4 installation,
    $ echo 'export QT_API=PySide2' >> ~/.bashrc 
    $ source ~/.bashrc
    $ python3 App.py

alternatively, one can run the app as: $ QT_API=PySide2 python3 App.py