Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 25, 2024
1 parent a99b145 commit c61ef27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down
4 changes: 4 additions & 0 deletions tests/snapshot_tests/test_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

Expand All @@ -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 = """
Expand Down

0 comments on commit c61ef27

Please sign in to comment.