- edited description
Adapt the plugin help viewer to the dark style and darkOrange style
Issue #136
resolved
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:
- 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. - 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.
- 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. - 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)
-
reporter -
reporter - changed status to resolved
fixes issue
#136: the plugin help viewer is now also adapted to the dark and dark orange style sheets.→ <<cset e5eeee576de4>>
- Log in to comment