Skip to content

Commit

Permalink
refresh docs look
Browse files Browse the repository at this point in the history
  • Loading branch information
swistakm committed Nov 17, 2016
1 parent 988001e commit c778ae5
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 22 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![completion](https://img.shields.io/badge/completion-38%25%20%28152%20of%20391%29-blue.svg)](https://github.com/swistakm/pyimgui)
[![completion](https://img.shields.io/badge/completion-39%25%20%28154%20of%20391%29-blue.svg)](https://github.com/swistakm/pyimgui)

Builds:

* [![Build status](https://ci.appveyor.com/api/projects/status/s7pud6on7dww89iv?svg=true)](https://ci.appveyor.com/project/swistakm/pyimgui) (Windows)
* [![Build Status](https://travis-ci.org/swistakm/pyimgui.svg?branch=master)](https://travis-ci.org/swistakm/pyimgui) (OS X & Linux)

Expand Down
55 changes: 55 additions & 0 deletions doc/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Custom stylesheets for alabaster Sphinx theme.
*/


/* do not hyphenate "Parameters" and <code> tags */
th.field-name, code {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
}

/* add negative space between autodoc members */
dl + dl, dd > dl {
margin-top: 2em;
}

dl + dl.class {
margin-top: 3.5em;
}

/* reformat class attributes ... */
/* ... to be close together ... */
dl.attribute + dl.attribute {
padding-top: 0;
}
/* ... to have a pseudo-heading ... */
dl.attribute:first-of-type:before {
content: "Attributes:";
margin-left: -1em;
font-weight: bold;
}
/* ... and to be indented slightly */
dl.attribute {
padding-left: 1em;
}

/* fix negative margin for code-blocks */
dl dl pre, .admonition.note {
margin-left: 0;
padding-left: 30px;
}

/* fix negative margin and padding for admonition notes */
.admonition.note {
margin-left: 0;
padding-left: 30px;
padding-right: 30px;
}

.admonition.note .first.admonition-title {
line-height: 1.5;
}

27 changes: 24 additions & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,28 @@ def get_version(version_tuple):
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# html_theme = 'sphinx_rtd_theme'

html_theme = 'alabaster'

html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html',
'searchbox.html',
'donate.html',
]
}

html_theme_options = {
'github_user': 'swistakm',
'github_repo': 'imgui',
'github_button': True,
'github_type': 'star',
'sidebar_includehidden': True,
'description': "Python wrapper for dear ImGui",
}

# 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
Expand Down Expand Up @@ -386,7 +407,7 @@ def get_version(version_tuple):
intersphinx_mapping = {'https://docs.python.org/': None}


# -- Additional settings: Napoleon ----------------------------------------
# -- Additional settings: Napoleon and autodoc -----------------------------

napoleon_google_docstring = True
napoleon_numpy_docstring = False
Expand All @@ -396,5 +417,5 @@ def get_version(version_tuple):
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = False
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_param = False
napoleon_use_rtype = False
12 changes: 0 additions & 12 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
.. pyimgui documentation master file, created by
sphinx-quickstart on Mon Oct 31 22:03:15 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
pyimgui - Python wrapper for dear ImGui
=======================================


contents:
=========

.. toctree::
:maxdepth: 2

Expand Down
23 changes: 17 additions & 6 deletions imgui/core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,9 @@ def set_next_window_collapsed(
:any:`imgui.ALWAYS`.
.. wraps::
void SetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond = 0)
void SetNextWindowCollapsed(
bool collapsed, ImGuiSetCond cond = 0
)
"""
cimgui.SetNextWindowCollapsed(collapsed, condition)
Expand Down Expand Up @@ -1352,7 +1354,9 @@ def set_next_window_size(
.. wraps::
void SetNextWindowSize(const ImVec2& size, ImGuiSetCond cond = 0)
void SetNextWindowSize(
const ImVec2& size, ImGuiSetCond cond = 0
)
"""
cimgui.SetNextWindowSize(_cast_args_ImVec2(width, height), condition)

Expand Down Expand Up @@ -1414,7 +1418,7 @@ def text_colored(char* text, float r, float g, float b, float a=1.):
r (float): red color intensity.
g (float): green color intensity.
b (float): blue color instensity.
a (float): alpha color intensity.
a (float): alpha intensity.
.. wraps::
TextColored(const ImVec4& col, const char* fmt, ...)
Expand Down Expand Up @@ -1599,7 +1603,7 @@ def color_button(
r (float): red color intensity.
g (float): green color intensity.
b (float): blue color instensity.
a (float): alpha color intensity.
a (float): alpha intensity.
small_height (bool): Small height. Default to False
outline_border (bool): Diplay outline border. Defaults to True.
Expand Down Expand Up @@ -1805,7 +1809,10 @@ def checkbox_flags(str label, unsigned int flags, unsigned int flags_value):
current state of the flags controlled with this checkbox.
.. wraps::
bool CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value)
bool CheckboxFlags(
const char* label, unsigned int* flags,
unsigned int flags_value
)
"""
cdef unsigned int inout_flags = flags

Expand Down Expand Up @@ -1869,7 +1876,11 @@ def combo(str label, int current, list items, int height_in_items=-1):
and current index of selected item.
.. wraps::
bool Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int height_in_items = -1)
bool Combo(
const char* label, int* current_item,
const char* items_separated_by_zeros,
int height_in_items = -1
)
"""
cdef int inout_current = current
Expand Down

0 comments on commit c778ae5

Please sign in to comment.