Tribler Graphical user interface development

The graphical user interface (GUI) of Tribler versions up to 3.5.0 resembles the GUI of ABC client. This GUI is implemented using wxPython and uses standard widgets. Currently Maarten ten Brinke and Jelle Roozenburg are developing a much more advanced and intuitive GUI with a strong focus on media and content.

GUI in coming releases

Tribler release 3.6 will already give a more direct overview over contents automatically collected by Tribler, still using a standard widget look-and-feel. In later releases this look-and-feel will be replaced by the designs of Maarten (link), which are implemented using a RAD design tool. After comparing some of the RAD tools out there that could generate ready-to-use python code, we decided to use VisualWx. There is a seperate page for a more detailed description about the GUI concepts for future releases.

Skinning / XRC

VisualWx supports the possibility to export GUI designs in a XML format called XRC. In wxPython you can load GUI designs in runtime using wx.XRCResources. Some example code can be found on the wxPython wiki. This functionality that enables the use of skins/custom designs can be included in future releases of Tribler. In the short future we will however use the python exported code from VisualWx. An inspection of VisualWX's XRC functionality show two shortcomings:

  • For the xrc exportation of custom subclasses of wx-classes (for instance MyFrame, TriblerPanel, etc.), visualWX uses a different syntax from the standard one in the xrc file (class=MyFrame) instead of (class=wx.Frame subclass=MyFrame). This could be solved by manually editing the xrc files after exportation from visualWX.
  • The background images on panels are not usable when exported through xrc. This could be solved by giving images the same filename as the panels, thereby losing the need for a defined image name.

Interesting docs:

wxPython experiences

Current tests show that wxPython/ wxWidgets give you a hard time when you want to implement transparency (in icons/panels/static texts). Furthermore, under Windows (mouse)event propagation is different from Linux platforms and refreshing of panels (f.i. those created by VisualWx code) breaks under aggressive resizing of the main window. Under Linux, the GTK layer often gives warnings on wxPython code.

triblerGUI discussion