[Bf-blender-cvs] [f702830a797] master: API Docs: Theme: Prevent Super Long Enums

Aaron Carlisle noreply at git.blender.org
Sat Jul 6 23:01:51 CEST 2019


Commit: f702830a7976812813e2be15c80ade2a88fb790a
Author: Aaron Carlisle
Date:   Sat Jul 6 15:53:39 2019 -0400
Branches: master
https://developer.blender.org/rBf702830a7976812813e2be15c80ade2a88fb790a

API Docs: Theme: Prevent Super Long Enums

===================================================================

M	doc/python_api/sphinx_doc_gen.py
A	doc/python_api/static/css/theme_overides.css

===================================================================

diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index fc5ab738871..ab1c1908745 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1635,6 +1635,7 @@ def write_sphinx_conf_py(basepath):
     fw("html_copy_source = False\n")
     fw("html_show_sphinx = False\n")
     fw("html_split_index = True\n")
+    fw("html_static_path = ['static']\n")
     fw("html_extra_path = ['static/favicon.ico', 'static/blender_logo.svg']\n")
     fw("html_favicon = 'static/favicon.ico'\n")
     fw("html_logo = 'static/blender_logo.svg'\n\n")
@@ -1657,12 +1658,13 @@ class PatchedPythonDomain(PythonDomain):
             del node['refspecific']
         return super(PatchedPythonDomain, self).resolve_xref(
             env, fromdocname, builder, typ, target, node, contnode)
-
-def setup(sphinx):
-    sphinx.override_domain(PatchedPythonDomain)
 """)
     # end workaround
 
+    fw("def setup(app):\n")
+    fw("    app.add_stylesheet('css/theme_overrides.css')\n")
+    fw("    app.override_domain(PatchedPythonDomain)\n\n")
+
     file.close()
 
 
diff --git a/doc/python_api/static/css/theme_overides.css b/doc/python_api/static/css/theme_overides.css
new file mode 100644
index 00000000000..6b6e35a90ae
--- /dev/null
+++ b/doc/python_api/static/css/theme_overides.css
@@ -0,0 +1,7 @@
+/* Prevent Long enum lists */
+.field-body {
+   display: block;
+   width: 100%;
+   max-height: 245px;
+   overflow-y: auto !important;
+}



More information about the Bf-blender-cvs mailing list