Skip to content

Commit

Permalink
More testbed fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HalfWhitt committed Dec 9, 2024
1 parent e71b659 commit a919c45
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/reference/style/pack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ indicates children will be packed horizontally; left-to-right if
``text_direction`` is ``ltr``, or right-to-left if ``text_direction`` is ``rtl``.

``align_items``
-------------
---------------

**Values:** ``top`` | ``bottom`` | ``left`` | ``right`` | ``center``

Expand Down
2 changes: 1 addition & 1 deletion gtk/src/toga_gtk/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, interface, title, position, size):
# Because expand and fill are True, the container will fill the available
# space, and will get a size_allocate callback if the window is resized.
self.container = TogaContainer()
self.layout.pack_end(self.container, expand=True, fill=True, margin=0)
self.layout.pack_end(self.container, expand=True, fill=True, padding=0)

self.native.add(self.layout)

Expand Down
4 changes: 2 additions & 2 deletions gtk/tests_backend/widgets/numberinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def text_alignment(self):

def assert_text_alignment(self, expected):
if expected == JUSTIFY:
assert self.alignment == LEFT
assert self.text_alignment == LEFT
else:
assert self.alignment == expected
assert self.text_alignment == expected

def assert_vertical_text_alignment(self, expected):
# GTK.SpinButton vertical alignment is non-configurable
Expand Down
4 changes: 2 additions & 2 deletions gtk/tests_backend/widgets/textinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def text_alignment(self):

def assert_text_alignment(self, expected):
if expected == JUSTIFY:
assert self.alignment == LEFT
assert self.text_alignment == LEFT
else:
assert self.alignment == expected
assert self.text_alignment == expected

def assert_vertical_text_alignment(self, expected):
# GTK.Entry vertical alignment is non-configurable
Expand Down
4 changes: 2 additions & 2 deletions testbed/tests/widgets/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def verify_focus_handlers():


@fixture
def verify_vertical_alignment():
"""The widget's default vertical alignment"""
def verify_vertical_text_alignment():
"""The widget's default vertical text alignment"""
return TOP


Expand Down
2 changes: 1 addition & 1 deletion winforms/tests_backend/widgets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def assert_not_contained(self):

def assert_text_alignment(self, expected):
# Winforms doesn't have a "Justified" text alignment; it falls back to LEFT
actual = self.alignment
actual = self.text_alignment
if expected == JUSTIFY:
assert actual == LEFT
else:
Expand Down

0 comments on commit a919c45

Please sign in to comment.