Skip to content

Commit a840d9f

Browse files
committed
Ensure recompute on check for height/width
1 parent 91b8a24 commit a840d9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gtk/src/toga_gtk/container.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ def width(self):
151151
if self._content is None:
152152
return 0
153153
return self.get_width()
154+
if self._dirty_widgets and self.needs_redraw:
155+
self.recompute()
154156

155157
@property
156158
def height(self):
@@ -161,6 +163,8 @@ def height(self):
161163
if self._content is None:
162164
return 0
163165
return self.get_height()
166+
if self._dirty_widgets and self.needs_redraw:
167+
self.recompute()
164168

165169
@property
166170
def content(self):

0 commit comments

Comments
 (0)