Skip to content

Commit 947d496

Browse files
committed
Fix docs
1 parent 10271c1 commit 947d496

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pygame_menu/widgets/widget/button.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def button(
307307
- ``font_size`` (int) – Font size of the widget
308308
- ``leading`` (int) - Font leading for ``wordwrap``. If ``None`` retrieves from widget font
309309
- ``margin`` (tuple, list) – Widget (left, bottom) margin in px
310-
- ``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
310+
- ``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
311311
- ``onselect`` (callable, None) – Callback executed when selecting the widget
312312
- ``padding`` (int, float, tuple, list) – Widget padding according to CSS rules. General shape: (top, right, bottom, left)
313313
- ``readonly_color`` (tuple, list, str, int, :py:class:`pygame.Color`) – Color of the widget if readonly mode

pygame_menu/widgets/widget/label.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Label(Widget):
3939
:param onselect: Function when selecting the label widget
4040
:param wordwrap: Wraps label if newline is found on widget
4141
:param leading: Font leading for ``wordwrap``. If ``None`` retrieves from widget font
42-
: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
42+
: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
4343
"""
4444
_last_underline: List[Union[str, Optional[Tuple[ColorType, int, int]]]]
4545
_leading: Optional[int]
@@ -83,7 +83,7 @@ def add_underline(
8383
) -> 'Label':
8484
"""
8585
Adds an underline to text. This is added if widget is rendered. Underline
86-
is only enabled for non wordwrap label.
86+
is only enabled for non wordwrap mode.
8787
8888
:param color: Underline color
8989
:param offset: Underline offset
@@ -235,7 +235,7 @@ def get_overflow_lines(self) -> List[str]:
235235
"""
236236
Return the overflow lines if ``wordwrap`` is active and ``max_nlines`` is set.
237237
238-
:return: Lines not displayed
238+
:return: Non displayed lines
239239
"""
240240
assert self._wordwrap, 'wordwrap must be enabled'
241241
assert isinstance(self._max_nlines, int), 'max_nlines must be defined'
@@ -382,7 +382,7 @@ def label(
382382
- ``font_size`` (int) – Font size of the widget
383383
- ``leading`` (int) - Font leading for ``wordwrap``. If ``None`` retrieves from widget font
384384
- ``margin`` (tuple, list) – Widget (left, bottom) margin in px
385-
- ``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
385+
- ``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
386386
- ``padding`` (int, float, tuple, list) – Widget padding according to CSS rules. General shape: (top, right, bottom, left)
387387
- ``selection_color`` (tuple, list, str, int, :py:class:`pygame.Color`) – Color of the selected widget; only affects the font color
388388
- ``selection_effect`` (:py:class:`pygame_menu.widgets.core.Selection`) – Widget selection effect. Applied only if ``selectable`` is ``True``
@@ -563,7 +563,7 @@ def clock(
563563
- ``font_size`` (int) – Font size of the widget
564564
- ``leading`` (int) - Font leading for ``wordwrap``. If ``None`` retrieves from widget font
565565
- ``margin`` (tuple, list) – Widget (left, bottom) margin in px
566-
- ``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
566+
- ``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
567567
- ``padding`` (int, float, tuple, list) – Widget padding according to CSS rules. General shape: (top, right, bottom, left)
568568
- ``selection_color`` (tuple, list, str, int, :py:class:`pygame.Color`) – Color of the selected widget; only affects the font color
569569
- ``selection_effect`` (:py:class:`pygame_menu.widgets.core.Selection`) – Widget selection effect. Applied only if ``selectable`` is ``True``

0 commit comments

Comments
 (0)