taurus-org / taurus

Moved to https://gitlab.com/taurus-org/taurus
http://taurus-scada.org
43 stars 46 forks source link

Missing icons #975

Open mrosanes opened 5 years ago

mrosanes commented 5 years ago

Win10: Missing icons (taurus 4.6.0 py3qt5)

Icons missing on taurus widgets and taurus_pyqtgraph widgets on windows. (note: the 'taurus icons' catalog works correctly).

To reproduce: taurus demo -> Table panels (in Debian icons are present on this widget, but in Windows they are not present)

(missing icons also in 'Model Selection' of 'taurus tpg plot' and 'taurus tpg trend')

cpascual commented 4 years ago

I found exactly this same problem while testing taurus 4.7.

... So I guess this is not exactly a windows issue, but probably has to do with the installation method or some configuration that triggers a bug in the icon API. So I update this ticket title and label accordingly

cpascual commented 4 years ago

The problem seems to be with theme icons (which agrees with the observed patterns).

As a quick way to reproduce, on can run python -m taurus.qt.qtgui.icon.icons (the last button uses .fromtheme() and it fails in the affected systems)

cpascual commented 4 years ago

I confirm it is a them icons related issue.

On linux systems, it can be fixed by configuring the proper default theme in your desktop (normally it is already ok, but in some cases such as the taurus-test:stretch docker image it isn't) or as a workaround, setting QT_THEME_FORCE_ON_LINUX = True in tauruscustomsettings.py.

On non linux machines, there is no platform support for themes, and one must be registered. Taurus does it, but it is not working (it needs to be investigated further)

cpascual commented 4 years ago

In any case, I think that it would be worth replacing all usages of QIcon.fromTheme() in Taurus by explicit usages of the icons provided by taurus (at the cost of reducing the visual integration of taurus with the rest of the guis in the system)