Skip to content

Commit

Permalink
Tweak visibility handling to ensure complete coverage in testbed cond…
Browse files Browse the repository at this point in the history
…itions.
  • Loading branch information
freakboy3742 committed Aug 3, 2023
1 parent 42ba6cd commit 0c3afa9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions gtk/src/toga_gtk/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,7 @@ def do_size_allocate(self, allocation):
# the Toga widget. Toga maintains a tree of children; all nodes
# in that tree are direct children of the container.
for widget in self.get_children():
if not widget.get_visible():
# print(" not visible {widget.interface}")
pass
else:
if widget.get_visible():
# Set the size of the child widget to the computed layout size.
# print(f" allocate child {widget.interface}: {widget.interface.layout}")
widget_allocation = Gdk.Rectangle()
Expand Down
2 changes: 2 additions & 0 deletions gtk/src/toga_gtk/widgets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def set_alignment(self, alignment):

def set_hidden(self, hidden):
self.native.set_visible(not hidden)
if self.container:
self.container.make_dirty()

def set_color(self, color):
self.apply_css("color", get_color_css(color))
Expand Down

0 comments on commit 0c3afa9

Please sign in to comment.