Skip to content

Commit 22b8b6e

Browse files
authored
Update braking change notes and remove unused size_hint_min from UILayouts (#1945)
1 parent 4342f1d commit 22b8b6e

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

arcade/gui/widgets/layout.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ class UIBoxLayout(UILayout):
189189
Or use :py:meth:`arcade.gui.UIBoxLayout.fit_content` to resize the layout. The
190190
bottom-left corner is used as the default anchor point.
191191
192-
Supports the options: ``size_hint``, ``size_hint_min``, ``size_hint_max``.
192+
Supports the options: ``size_hint``, ``size_hint_min``, ``size_hint_max``. ``size_hint_min`` is automatically
193+
updated based on the minimal required space by children.
193194
194195
If a child widget provides a ``size_hint`` for a dimension, the child will
195196
be resized within the given range of ``size_hint_min`` and
@@ -208,7 +209,6 @@ class UIBoxLayout(UILayout):
208209
:param size_hint: Size hint for the :py:class:`~arcade.gui.UILayout` if
209210
the widget would like to grow. Defaults to ``0, 0`` ->
210211
minimal size to contain children.
211-
:param size_hint_min: Minimum width and height in pixels.
212212
:param size_hint_max: Maximum width and height in pixels.
213213
:param space_between: Space in pixels between the children.
214214
"""
@@ -223,7 +223,6 @@ def __init__(
223223
align="center",
224224
children: Iterable[UIWidget] = tuple(),
225225
size_hint=(0, 0),
226-
size_hint_min=None,
227226
size_hint_max=None,
228227
space_between=0,
229228
style=None,
@@ -236,7 +235,6 @@ def __init__(
236235
height=height,
237236
children=children,
238237
size_hint=size_hint,
239-
size_hint_min=size_hint_min,
240238
size_hint_max=size_hint_max,
241239
style=style,
242240
**kwargs
@@ -472,7 +470,8 @@ class UIGridLayout(UILayout):
472470
``size_hint_max``.
473471
474472
Children are resized based on ``size_hint``. Maximum and minimum
475-
``size_hint``s only take effect if a ``size_hint`` is given.
473+
``size_hint``s only take effect if a ``size_hint`` is given. ``size_hint_min`` is automatically
474+
updated based on the minimal required space by children.
476475
477476
:param x: ``x`` coordinate of bottom left corner.
478477
:param y: ``y`` coordinate of bottom left corner.
@@ -485,7 +484,6 @@ class UIGridLayout(UILayout):
485484
added later.
486485
:param size_hint: A size hint for :py:class:`~arcade.gui.UILayout`, if the
487486
:py:class:`~arcade.gui.UIWidget` would like to grow.
488-
:param size_hint_min: Minimum width and height in pixels.
489487
:param size_hint_max: Maximum width and height in pixels.
490488
:param horizontal_spacing: Space between columns.
491489
:param vertical_spacing: Space between rows.
@@ -503,7 +501,6 @@ def __init__(
503501
align_vertical="center",
504502
children: Iterable[UIWidget] = tuple(),
505503
size_hint=(0, 0),
506-
size_hint_min=None,
507504
size_hint_max=None,
508505
horizontal_spacing: int = 0,
509506
vertical_spacing: int = 0,
@@ -520,7 +517,6 @@ def __init__(
520517
height=0,
521518
children=children,
522519
size_hint=size_hint,
523-
size_hint_min=size_hint_min,
524520
size_hint_max=size_hint_max,
525521
style=style,
526522
**kwargs

doc/programming_guide/release_notes.rst

+8
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ API in a way that is not compatible with how it was used in 2.6.
4848
* The GUI package has been changed significantly.
4949
* Buffered shapes (shape list items) have been moved to their own sub-module.
5050
* `use_spatial_hash` parameter for `SpriteList` and `TileMap` is now a `bool` instead of `Optional[bool]`
51+
* GUI
52+
53+
* Removed :py:class:`~arcade.gui.widgets.UIWrapper` this is now general available in :py:class:`~arcade.gui.widgets.UILayout`
54+
* Removed :py:class:`~arcade.gui.widgets.UIBorder` this is now general available in :py:class:`~arcade.gui.widgets.UIWidget`
55+
* Removed :py:class:`~arcade.gui.widgets.UIPadding` this is now general available in :py:class:`~arcade.gui.widgets.UIWidget`
56+
* Removed :py:class:`~arcade.gui.widgets.UITexturePane` this is now general available in :py:class:`~arcade.gui.widgets.UIWidget`
57+
* Removed :py:class:`~arcade.gui.widgets.UIAnchorWidget` replaced by :py:class:`~arcade.gui.widgets.UIAnchorLayout`
58+
5159

5260
Featured Updates
5361
~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)