From c103b5d3b3be19d2332a1c97972bffdceccd93c3 Mon Sep 17 00:00:00 2001 From: Dave Andreoli Date: Tue, 6 Jan 2015 20:51:57 +0100 Subject: [PATCH] Docs: try to improve the style of the Inheritance Diagram --- INSTALL | 1 - doc/conf.py | 46 ++++++++++++++++++++++++++++------------------ 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/INSTALL b/INSTALL index 1fca811..1b1b118 100644 --- a/INSTALL +++ b/INSTALL @@ -18,7 +18,6 @@ * To build the DOCS you will also need: - python-sphinx - [optional] graphviz - - [optional] youtube module from the sphinx contrib repository. diff --git a/doc/conf.py b/doc/conf.py index 849c79e..1b4abd8 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -43,24 +43,6 @@ extensions = [ 'sphinx.ext.coverage', ] -try: - import gv -except ImportError: - pass -else: - extensions.append('sphinx.ext.inheritance_diagram') - graphviz_output_format = "svg" # png (default) or svg - graphviz_dot_args = ["-Gbgcolor=transparent", "-Ncolor=#4399FF", - "-Nfontcolor=white", "-Ecolor=blue"] - -try: - import sphinxcontrib.youtube -except ImportError: - pass -else: - extensions.append('sphinxcontrib.youtube') - - # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -178,6 +160,34 @@ def autodoc_process_signature(app, what, name, obj, options, signature, return_a return ('(%s)' % ', '.join(params), return_annotation) +# -- Inheritance Diagram ------------------------------------------------------ + +try: + import gv +except ImportError: + pass +else: + extensions.append('sphinx.ext.inheritance_diagram') + # svg scale better (look at the full elm dia) + # but svg links are broken :( + graphviz_output_format = "svg" # png (default) or svg + inheritance_graph_attrs = dict( + bgcolor = 'gray25', #404040 + ) + inheritance_node_attrs = dict( + style = 'rounded', # or 'filled', + # fillcolor = "gray20", # bg color (should be #CCCCCC) + color = 'gray10', # border color (should be #202020) + fontcolor = 'white', + font = 'sans', + + ) + inheritance_edge_attrs = dict( + color = 'dodgerblue3', # arrow color (should be #4399FF) + dir = 'none', # arrow direction (back, forward, both or none) + ) + + # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for