diff --git a/src/textual/widget.py b/src/textual/widget.py index 36e8616ae8..c0f9d61d58 100644 --- a/src/textual/widget.py +++ b/src/textual/widget.py @@ -308,8 +308,8 @@ class Widget(DOMNode): """Defines default logic to allow the widget to be maximized. - `None` Use default behavior (Focusable widgets may be maximized) - - `False` Do not allow widget to be maximized. - - `True` Allow widget to be maximized. + - `False` Do not allow widget to be maximized + - `True` Allow widget to be maximized """ diff --git a/tests/snapshot_tests/test_snapshots.py b/tests/snapshot_tests/test_snapshots.py index c57dfc6d35..2f86c6772c 100644 --- a/tests/snapshot_tests/test_snapshots.py +++ b/tests/snapshot_tests/test_snapshots.py @@ -1492,6 +1492,8 @@ def test_scroll_page_down(snap_compare): def test_maximize(snap_compare): + """Check that maximize isolates a single widget.""" + class MaximizeApp(App): BINDINGS = [("m", "screen.maximize", "maximize focused widget")] @@ -1504,6 +1506,8 @@ def compose(self) -> ComposeResult: def test_maximize_container(snap_compare): + """Check maximizing a widget in a maximizeable container, maximizes the container.""" + class FormContainer(Vertical): ALLOW_MAXIMIZE = True DEFAULT_CSS = """