Menu

#280 Avoid usage of resource (rcc) files for icons

Jul16
resolved
None
feature-request
2016-04-27
2016-04-18
No

Building rcc files for icons during taurus setup is an old source of issues, e.g.:

  • rcc utility (which is part of qt-devel) needs to be installed at build time. This is specially problematic on win systems
  • taurus packages get fatter because of shipping both the rcc and the icon
  • setup.py needs to be customised to build the rccs
  • It adds an extra step when working directly with sources (calling python setup.py build_resources)
  • the .rcc files need to be rebuilt if new icons are added

Tiago once suggested that using the icon files directly instead of via the .rcc files may not have a significant performance hit (if any at all).
Considering that the "taurus-way" of using icons/pixmaps is via the get{Theme}{Icon,Pixmap} functions from the taurus.qt.qtgui.resource module, we just need to refactor these methods in order to implement this change.

Also note that with the drop of support for PyQt<4.8 in taurus4, there is no need to support the case in which qt does not provide theme icons. This also helps in the refactoring.

Once this is done, implementing [#272] (use of xstatic for the icon files) or making this part of [TEP13] (plugins support) may be considered. Also, implementing this, facilitates the implementation of [#279]

Related

OLD Tickets: #272
OLD Tickets: #279
OLD Tickets: #282
OLD Tickets: #304
Wiki: TEP13

Discussion

  • Carlos Pascual

    Carlos Pascual - 2016-04-22

    See an implementation of this feature as part of the implementation of [#279] in the setuptools branch of my fork: https://github.com/cpascual/taurus.git

    As it is now, the implementation is complete, but the taurus needs to be adapted to avoid throwing icon-related deprecation warnings

     

    Related

    OLD Tickets: #279

  • Carlos Pascual

    Carlos Pascual - 2016-04-27
    • status: waiting --> resolved
    • assigned_to: Carlos Pascual
    • Milestone: unassigned --> Jul16
     
  • Carlos Pascual

    Carlos Pascual - 2016-04-27

    My proposed implementation was integrated by teresa to the develop branch. The remaining changes (removing deprecation warnings will be handled as a new ticket [#282])

     

    Related

    OLD Tickets: #282