aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-03-28 14:26:25 +0200
committerVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2022-04-08 15:32:58 +0200
commit6cbdefd9fbbbd1343998d449cc12ae4b5961af9c (patch)
tree9b92dc071ba8c20c4e4ca859bd9cfe90d4953e9b /sources/pyside6
parent530cfb8c9fb3a050635577afa5ae23145a3ecc30 (diff)
doc: new theme to follow the new Qt Doc style
- Use 'furo' sphinx theme which offers a look-and-feel similar to the new Qt Documentation theme. - Change a few colors and styles to keep some details of the previous look-and-feel. - Add sphinx-copybutton extension to enable the copy-button feature against the snippet blocks. - Remove the 'pysidedocs' theme. Change-Id: I2be7186c5b043b4c75c65783abc2eab4056c493e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/doc/_static/css/qt_font.css15
-rw-r--r--sources/pyside6/doc/_static/css/qt_style.css80
-rw-r--r--sources/pyside6/doc/_static/qtforpython.png (renamed from sources/pyside6/doc/_themes/pysidedocs/static/pysidelogo.png)bin4936 -> 4936 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/domainindex.html57
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/searchbox.html12
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/bg_header.pngbin36012 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpgbin14237 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/fakebar.pngbin101 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpgbin2660 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.pngbin1936 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/minus.pngbin199 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/plus.pngbin199 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.pngbin130 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/theme.conf7
-rw-r--r--sources/pyside6/doc/conf.py.in28
-rw-r--r--sources/pyside6/libpyside/libpyside.qrc2
16 files changed, 119 insertions, 82 deletions
diff --git a/sources/pyside6/doc/_static/css/qt_font.css b/sources/pyside6/doc/_static/css/qt_font.css
new file mode 100644
index 000000000..ce39943ef
--- /dev/null
+++ b/sources/pyside6/doc/_static/css/qt_font.css
@@ -0,0 +1,15 @@
+@font-face {
+ font-family: 'Titillium Web';
+ font-style: normal;
+ font-weight: 400;
+ src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.eot");
+ /* IE9 Compat Modes */
+ src: local("Titillium Web"),
+ local("TitilliumWeb-Regular"),
+ url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.eot?#iefix") format("embedded-opentype"),
+ url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.woff2") format("woff2"),
+ url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.woff") format("woff"),
+ url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.ttf") format("truetype"),
+ url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.svg#TitilliumWeb") format("svg");
+ /* Legacy iOS */
+}
diff --git a/sources/pyside6/doc/_static/css/qt_style.css b/sources/pyside6/doc/_static/css/qt_style.css
new file mode 100644
index 000000000..4b9b17fe7
--- /dev/null
+++ b/sources/pyside6/doc/_static/css/qt_style.css
@@ -0,0 +1,80 @@
+.btn-qt:hover,
+.btn-qt:active,
+.btn-qt:focus,
+.btn-qt.active {
+ background: #41cd52;
+ color: #fff !important;
+ border-color: #fff;
+}
+
+.btn-link {
+ color: #41cd52 !important;
+}
+
+.btn-link:hover {
+ color: #222840 !important;
+ text-decoration: underline;
+}
+
+/* Using !important is not recommended, but out CSS is being added
+ * to the pages before the bootstrap ones, so we cannot override them
+ * without using it */
+.btn-qt {
+ color: #41cd52 !important;
+ border-color: #41cd52 !important;
+ font-weight: bold !important;
+}
+.card-img-top-main {
+ padding-top: 10px;
+ height: 70px !important;
+}
+
+.card-img-top {
+ object-fit: contain;
+ height: 120px;
+ padding-top: 20px;
+ transform: scale(1.3, 1.3);
+}
+
+/* Tables */
+.section .docutils.container td {
+ float:left;
+}
+
+table.docutils {
+ margin-right: auto;
+ margin-bottom: 10px;
+ border: none;
+ width: initial;
+ font-size: 0.8em;
+}
+
+table.docutils.colwidths-given td {
+ float: none;
+}
+
+table.docutils th,
+table.docutils td {
+ padding-left:0;
+ border: none;
+}
+
+table.docutils td ul {
+ margin:0
+}
+
+table.docutils td ul > li {
+ margin: 0 0 0.5em;
+}
+
+.hide {
+ display: none;
+}
+
+.fixed .container {
+ max-width:1280px;
+ margin:0 auto;
+ padding:0 3.9%; /* 0? */
+ position:relative;
+ overflow:visible
+}
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/pysidelogo.png b/sources/pyside6/doc/_static/qtforpython.png
index 3a2f2bd17..3a2f2bd17 100644
--- a/sources/pyside6/doc/_themes/pysidedocs/static/pysidelogo.png
+++ b/sources/pyside6/doc/_static/qtforpython.png
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/domainindex.html b/sources/pyside6/doc/_themes/pysidedocs/domainindex.html
deleted file mode 100644
index c136cdd1c..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/domainindex.html
+++ /dev/null
@@ -1,57 +0,0 @@
-{#
- basic/domainindex.html
- ~~~~~~~~~~~~~~~~~~~~~~
-
- Template for domain indices (module index, ...).
-
- :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-#}
-{% extends "layout.html" %}
-{% set title = indextitle %}
-{% block extrahead %}
-{{ super() }}
-{% if not embedded and collapse_index %}
- <script type="text/javascript">
- DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true;
- </script>
-{% endif %}
-{% endblock %}
-{% block body %}
-<div class="section">
- {%- set curr_group = 0 %}
-
- <h1>{{ indextitle }}</h1>
-
- <div class="modindex-jumpbox">
- {%- for (letter, entries) in content %}
- <a href="#cap-{{ letter }}"><strong>{{ letter }}</strong></a>
- {%- if not loop.last %} | {% endif %}
- {%- endfor %}
- </div>
-
- <table class="indextable modindextable" cellspacing="0" cellpadding="2">
- {%- for letter, entries in content %}
- <tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>
- <tr class="cap"><td></td><td><a name="cap-{{ letter }}">
- <strong>{{ letter }}</strong></a></td><td></td></tr>
- {%- for (name, grouptype, page, anchor, extra, qualifier, description)
- in entries %}
- {%- if grouptype == 1 %}{% set curr_group = curr_group + 1 %}{% endif %}
- <tr{% if grouptype == 2 %} class="cg-{{ curr_group }}"{% endif %}>
- <td>{% if grouptype == 1 -%}
- <img src="{{ pathto('_static/minus.png', 1) }}" id="toggle-{{ curr_group }}"
- class="toggler" style="display: none" alt="-" />
- {%- endif %}</td>
- <td>{% if grouptype == 2 %}&nbsp;&nbsp;&nbsp;{% endif %}
- {% if page %}<a href="{{ pathto(page) }}#{{ anchor }}">{% endif -%}
- <tt class="xref">{{ name|e }}</tt>
- {%- if page %}</a>{% endif %}
- {%- if extra %} <em>({{ extra|e }})</em>{% endif -%}
- </td><td>{% if qualifier %}<strong>{{ qualifier|e }}:</strong>{% endif %}
- <em>{{ description|e }}</em></td></tr>
- {%- endfor %}
- {%- endfor %}
- </table>
-</div>
-{% endblock %}
diff --git a/sources/pyside6/doc/_themes/pysidedocs/searchbox.html b/sources/pyside6/doc/_themes/pysidedocs/searchbox.html
deleted file mode 100644
index 55a972156..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/searchbox.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{%- if pagename != "search" %}
-<div id="searchbox" style="display: none">
- <h3>{{ _('Quick search') }}</h3>
- <form class="search" action="{{ pathto('search') }}" method="get">
- <input type="text" name="q" id="q" size="18" />
- <input type="submit" value="{{ _('Go') }}" id="search_button" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
-</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
-{%- endif %}
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/bg_header.png b/sources/pyside6/doc/_themes/pysidedocs/static/bg_header.png
deleted file mode 100644
index 843e7e2c5..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/bg_header.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpg b/sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpg
deleted file mode 100644
index 4229ae8db..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpg
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/fakebar.png b/sources/pyside6/doc/_themes/pysidedocs/static/fakebar.png
deleted file mode 100644
index b45830e00..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/fakebar.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpg b/sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpg
deleted file mode 100644
index cd474efba..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpg
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.png b/sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.png
deleted file mode 100644
index 3bc03b7c7..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/minus.png b/sources/pyside6/doc/_themes/pysidedocs/static/minus.png
deleted file mode 100644
index da1c5620d..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/minus.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/plus.png b/sources/pyside6/doc/_themes/pysidedocs/static/plus.png
deleted file mode 100644
index b3cb37425..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/plus.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.png b/sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.png
deleted file mode 100644
index 4036733a7..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/theme.conf b/sources/pyside6/doc/_themes/pysidedocs/theme.conf
deleted file mode 100644
index 01a4dd4a1..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/theme.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[theme]
-inherit = default
-stylesheet = pyside.css
-pygments_style = none
-
-[options]
-nosidebar = false
diff --git a/sources/pyside6/doc/conf.py.in b/sources/pyside6/doc/conf.py.in
index 85c789010..f9ceaf86f 100644
--- a/sources/pyside6/doc/conf.py.in
+++ b/sources/pyside6/doc/conf.py.in
@@ -106,6 +106,7 @@ add_function_parentheses = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
+pygments_dark_style = "monokai"
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
@@ -115,13 +116,26 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'pysidedocs'
+html_theme = 'furo'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
-#html_theme_options = {
-#}
+html_theme_options = {
+ "dark_css_variables": {
+ "color-brand-primary": "#66689d",
+ "color-brand-content": "#66689d",
+ "color-admonition-title--important": "#41cd52",
+ "color-admonition-title-background--important": "#474b53",
+ "font-stack": "'Titillium Web', sans-serif",
+ },
+ "light_css_variables": {
+ "color-brand-primary": "#66689d",
+ "color-brand-content": "#41cd52",
+ "color-admonition-title--important": "#41cd52",
+ "font-stack": "'Titillium Web', sans-serif",
+ },
+}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_themes']
@@ -135,7 +149,7 @@ html_title = u'Qt for Python'
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-#html_logo = None
+html_logo = "@CMAKE_CURRENT_SOURCE_DIR@/_static/qtforpython.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -145,8 +159,12 @@ html_title = u'Qt for Python'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_static']
+html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_static']
+html_css_files = [
+ 'css/qt_font.css',
+ 'css/qt_style.css',
+]
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
diff --git a/sources/pyside6/libpyside/libpyside.qrc b/sources/pyside6/libpyside/libpyside.qrc
index 927c676a7..1e652eb4c 100644
--- a/sources/pyside6/libpyside/libpyside.qrc
+++ b/sources/pyside6/libpyside/libpyside.qrc
@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/qt-project.org/logos">
- <file alias="pysidelogo.png">../doc/_themes/pysidedocs/static/pysidelogo.png</file>
+ <file alias="pysidelogo.png">../doc/_static/qtforpython.png</file>
</qresource>
</RCC>