Adapt the plugin help viewer to the dark style and darkOrange style

Issue #136 resolved
M. Gronle created an issue

Currently, the html view of content in the plugin help viewer has fixed colors, that are adapted to the default bright style under windows.

However, if the darkStyle or darkOrangeStyle is applied, the colors look weired:

Goal:

Change the colors depending on the stylesheet, by adding further user-defined entries in the qss-stylesheet files in itom/styles/stylesheets.

The current color palette is:

darkStyle:

darkOrangeStyle:

Todo:

  1. For each color, that has to be changed, add a Q_PROPERTY to class HelpTreeDockWidget, including getter and setter method.
    Store the color as QColor in separate members of this class. Use the current colors for the bright theme as defaults for these members.
  2. Modify the html templates for the different help pages in itom/Qitom/styles/help and replace the fixed color tags there by placeholder strings, e.g. %TITLE_BGCOLOR% for the background color of the title. The overall background color and the general text color is already given by the stylesheet. It has not to be changed.
  3. Add specific colors to the different qss files, by writing:
    ito--HelpTreeDockWidget {
    qproperty-NAMEOFTHEPROPERTY: #ffaa33;

    }
    The, when this qss file is loaded, the setter of the property of HelpTreeDockWidget is called once with the value, given in the qss file.
  4. In class HelpTreeDockWidget change the render method, that reads the template html file, and replace all color placeholders by the QColor.name() of the desired color member.

Further information
https://doc.qt.io/Qt-5/stylesheet-syntax.html#setting-qobject-properties

Comments (2)

  1. Log in to comment