Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ppizarror committed Dec 21, 2024
1 parent 10271c1 commit 947d496
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pygame_menu/widgets/widget/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def button(
- ``font_size`` (int) – Font size of the widget
- ``leading`` (int) - Font leading for ``wordwrap``. If ``None`` retrieves from widget font
- ``margin`` (tuple, list) – Widget (left, bottom) margin in px
- ``max_nlines`` (int) - Number of maximum lines for ``wordwrap``. If ``None`` the number is dynamically computed. If exceded, ``button.get_overflow_lines()`` will return the lines not displayed
- ``max_nlines`` (int) - Number of maximum lines for ``wordwrap``. If ``None`` the number is dynamically computed. If exceeded, ``get_overflow_lines()`` will return the non displayed lines
- ``onselect`` (callable, None) – Callback executed when selecting the widget
- ``padding`` (int, float, tuple, list) – Widget padding according to CSS rules. General shape: (top, right, bottom, left)
- ``readonly_color`` (tuple, list, str, int, :py:class:`pygame.Color`) – Color of the widget if readonly mode
Expand Down
10 changes: 5 additions & 5 deletions pygame_menu/widgets/widget/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Label(Widget):
:param onselect: Function when selecting the label widget
:param wordwrap: Wraps label if newline is found on widget
:param leading: Font leading for ``wordwrap``. If ``None`` retrieves from widget font
:param max_nlines: Number of maximum lines for ``wordwrap``. If ``None`` the number is dynamically computed. If exceded, ``label.get_overflow_lines()`` will return the lines not displayed
:param max_nlines: Number of maximum lines for ``wordwrap``. If ``None`` the number is dynamically computed. If exceeded, ``get_overflow_lines()`` will return the non displayed lines
"""
_last_underline: List[Union[str, Optional[Tuple[ColorType, int, int]]]]
_leading: Optional[int]
Expand Down Expand Up @@ -83,7 +83,7 @@ def add_underline(
) -> 'Label':
"""
Adds an underline to text. This is added if widget is rendered. Underline
is only enabled for non wordwrap label.
is only enabled for non wordwrap mode.
:param color: Underline color
:param offset: Underline offset
Expand Down Expand Up @@ -235,7 +235,7 @@ def get_overflow_lines(self) -> List[str]:
"""
Return the overflow lines if ``wordwrap`` is active and ``max_nlines`` is set.
:return: Lines not displayed
:return: Non displayed lines
"""
assert self._wordwrap, 'wordwrap must be enabled'
assert isinstance(self._max_nlines, int), 'max_nlines must be defined'
Expand Down Expand Up @@ -382,7 +382,7 @@ def label(
- ``font_size`` (int) – Font size of the widget
- ``leading`` (int) - Font leading for ``wordwrap``. If ``None`` retrieves from widget font
- ``margin`` (tuple, list) – Widget (left, bottom) margin in px
- ``max_nlines`` (int) - Number of maximum lines for ``wordwrap``. If ``None`` the number is dynamically computed. If exceded, ``label.get_overflow_lines()`` will return the lines not displayed
- ``max_nlines`` (int) - Number of maximum lines for ``wordwrap``. If ``None`` the number is dynamically computed. If exceeded, ``get_overflow_lines()`` will return the non displayed lines
- ``padding`` (int, float, tuple, list) – Widget padding according to CSS rules. General shape: (top, right, bottom, left)
- ``selection_color`` (tuple, list, str, int, :py:class:`pygame.Color`) – Color of the selected widget; only affects the font color
- ``selection_effect`` (:py:class:`pygame_menu.widgets.core.Selection`) – Widget selection effect. Applied only if ``selectable`` is ``True``
Expand Down Expand Up @@ -563,7 +563,7 @@ def clock(
- ``font_size`` (int) – Font size of the widget
- ``leading`` (int) - Font leading for ``wordwrap``. If ``None`` retrieves from widget font
- ``margin`` (tuple, list) – Widget (left, bottom) margin in px
- ``max_nlines`` (int) - Number of maximum lines for ``wordwrap``. If ``None`` the number is dynamically computed. If exceded, ``label.get_overflow_lines()`` will return the lines not displayed
- ``max_nlines`` (int) - Number of maximum lines for ``wordwrap``. If ``None`` the number is dynamically computed. If exceeded, ``get_overflow_lines()`` will return the non displayed lines
- ``padding`` (int, float, tuple, list) – Widget padding according to CSS rules. General shape: (top, right, bottom, left)
- ``selection_color`` (tuple, list, str, int, :py:class:`pygame.Color`) – Color of the selected widget; only affects the font color
- ``selection_effect`` (:py:class:`pygame_menu.widgets.core.Selection`) – Widget selection effect. Applied only if ``selectable`` is ``True``
Expand Down

0 comments on commit 947d496

Please sign in to comment.