2012-04-19 09:14:04 +00:00
|
|
|
Font style in list views
|
|
|
|
========================
|
2012-04-19 05:26:44 +00:00
|
|
|
|
2012-04-19 09:14:04 +00:00
|
|
|
.. versionadded:: 7.0
|
2012-04-19 05:26:44 +00:00
|
|
|
|
2012-04-19 09:14:04 +00:00
|
|
|
This revision adds font styles in list views. Before this revision it was
|
|
|
|
possible to define some colors in list view. This revision allows to define
|
|
|
|
the a font style, based on an evaluated Python expression. The definition syntax is
|
|
|
|
the same than the colors feature. Supported styles are bold, italic and
|
|
|
|
underline.
|
2012-04-19 05:26:44 +00:00
|
|
|
|
|
|
|
Rng modification
|
|
|
|
+++++++++++++++++
|
|
|
|
|
2012-04-19 09:14:04 +00:00
|
|
|
This revision adds the ``fonts`` optional attribute in ``view.rng``.
|
2012-04-19 05:26:44 +00:00
|
|
|
|
|
|
|
Addon implementation example
|
|
|
|
++++++++++++++++++++++++++++
|
|
|
|
|
2012-04-19 09:14:04 +00:00
|
|
|
In your ``foo`` module, you want to specify that when any record is in ``pending``
|
|
|
|
state then it should be displayed in bold in the list view. Edit your foo_view.xml
|
|
|
|
file that define the views, and add the fonts attribute to the tree tag.
|
2012-04-19 05:26:44 +00:00
|
|
|
|
2012-04-19 09:14:04 +00:00
|
|
|
.. code-block:: xml
|
2012-04-19 05:26:44 +00:00
|
|
|
|
2012-04-19 09:14:04 +00:00
|
|
|
<tree string="Foo List View" fonts="bold:state=='pending'">
|
|
|
|
[...]
|
|
|
|
</tree>
|