Skip to content

Commit

Permalink
doc formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jchanvfx committed May 21, 2021
1 parent 742e24b commit fafbd80
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
4 changes: 2 additions & 2 deletions NodeGraphQt/base/port.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __repr__(self):
@property
def view(self):
"""
returns the :class:`QtWidgets.QGraphicsItem` used in the scene.
Returns the :class:`QtWidgets.QGraphicsItem` used in the scene.
Returns:
NodeGraphQt.qgraphics.port.PortItem: port item.
Expand All @@ -49,7 +49,7 @@ def view(self):
@property
def model(self):
"""
returns the port model.
Returns the port model.
Returns:
NodeGraphQt.base.model.PortModel: port model.
Expand Down
10 changes: 6 additions & 4 deletions docs/_static/pygments.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.linenos,
td.lineos {
background: #2e3133;
margin: 0px 10px;
padding: 1px 8px;
}
.linenos pre {
background-color: transparent;
Expand All @@ -9,9 +11,9 @@ td.lineos {
-moz-box-shadow: none;
}
.hll { background-color: #233150 }
.code{ background: #232629; !important }
.highlight pre { background: #232629; !important }
.highlight pre {
.code { background: #232629; !important }
.highlight pre { background: #1a1c1f; !important }
.highlight pre {
color: #f8f8f2;
border: 0px;
border-radius: 0px;
Expand Down Expand Up @@ -76,4 +78,4 @@ td.lineos {
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
5 changes: 3 additions & 2 deletions docs/_themes/sphinx_rtd_theme/static/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -3465,7 +3465,7 @@ a.wy-text-neutral:hover{
p{
line-height:24px;
font-size:16px;
margin:0 0 24px
margin:0 0 2px
}
h1{
font-size:175%
Expand Down Expand Up @@ -4266,7 +4266,7 @@ footer p{
.rst-content div[class^=highlight] pre{
white-space:pre;
margin:0;
padding:12px;
padding:4px;
display:block;
overflow:auto
}
Expand Down Expand Up @@ -4734,6 +4734,7 @@ h2, h3, h4, h5 {color: #6dcfd9;}
h2 {
border-bottom: 1px solid #1e2023;
padding-bottom: 6px;
padding-top: 6px;
}

/* kwargs tweaks */
Expand Down
13 changes: 8 additions & 5 deletions docs/examples/ex_node.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Node Examples
Creating Nodes
**************

| Creating a node is done by calling the :func:`NodeGraphQt.NodeGraph.create_node` function.
| (`see example below` ``line: 22``)
| Creating a node is done by calling the :func:`NodeGraph.create_node` function.
| (`see example below` ``line: 23``)
.. code-block:: python
:linenos:
:emphasize-lines: 22
:emphasize-lines: 23
from Qt import QtWidgets
from NodeGraphQt import BaseNode, NodeGraph
Expand All @@ -34,8 +34,11 @@ Creating Nodes
node_graph.widget.show()
# here we create a couple nodes in the node graph.
node_a = node_graph.create_node('com.chantasticvfx.MyNode', name='node a')
node_b = node_graph.create_node('com.chantasticvfx.MyNode', name='node b', pos=[300, 100])
node_a = node_graph.create_node('com.chantasticvfx.MyNode',
name='node a')
node_b = node_graph.create_node('com.chantasticvfx.MyNode',
name='node b',
pos=[300, 100])
app.exec_()
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/ex_port.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Creating Custom Shapes

(*Implemented on* ``v0.1.1``)

To have custom port shapes the :meth:`NodeGraphQt.BaseNode.add_input` and
:meth:`NodeGraphQt.BaseNode.add_output` functions now have a ``painter_func``
To have custom port shapes the :meth:`BaseNode.add_input` and
:meth:`BaseNode.add_output` functions now have a ``painter_func``
argument where you specify you custom port painter function.

.. image:: ../_images/custom_ports.png
Expand Down Expand Up @@ -136,4 +136,4 @@ And here's another example function for drawing a Square port.
painter.setBrush(color)
painter.drawRect(rect)
painter.restore()
painter.restore()
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NodeGraphQt documentation.
----

.. toctree::
:caption: API Reference
:caption: API
:name: apitoc
:maxdepth: 2

Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/Port.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Port

.. autoclass:: NodeGraphQt.Port
:members:
:exclude-members: model
:exclude-members: model, view

0 comments on commit fafbd80

Please sign in to comment.