Update documentation

This commit is contained in:
Yeison 2020-12-12 14:15:43 -05:00
parent 30d96fc084
commit 5377710048
5 changed files with 21 additions and 3 deletions

View File

@ -5,6 +5,7 @@ with open('../README.rst', 'r') as file:
content = file.read()
content = content.replace('images/dark.gif', 'https://github.com/UN-GCPDS/qt-material/raw/master/docs/source/images/dark.gif')
content = content.replace('images/light.gif', 'https://github.com/UN-GCPDS/qt-material/raw/master/docs/source/images/light.gif')
content = content.replace('images/theme.gif', 'https://github.com/UN-GCPDS/qt-material/raw/master/docs/source/images/theme.gif')
end = content.find('Indices and tables')
with open('../README.rst', 'w') as file:
file.write(content[:end])

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1023 KiB

After

Width:  |  Height:  |  Size: 978 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

View File

@ -122,14 +122,31 @@ Save it as `my_theme.xml` or similar and apply the style sheet from Python.
Light themes
------------
Light themes will need to add `light_secondary` argument as `True`.
Light themes will need to add `invert_secondary` argument as `True`.
.. code:: python
apply_stylesheet(app, theme='dark_teal.xml', light_secondary=True)
apply_stylesheet(app, theme='light_red.xml', invert_secondary=True)
New Themes
Run example
-----------
A window with almost all widgets (see the previous screenshots) are available to
test all themes and **create new ones**.
.. code:: bash
git clone https://github.com/UN-GCPDS/qt-material.git
cd qt-material
python setup.py install
cd test
python main.py --PySide6
.. image:: images/theme.gif
New themes
----------
Do you have a custom theme? it looks good? create a