You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is a small bug in Box widget, when we have padding for most outer Box the current implementation of min_width, and also of min_height, does not calculate it. This bug can be solve easily by adding these padding as following for both do_get_preferred_width and do_get_preferred_height functions:
defdo_get_preferred_width(self):
# Calculate the minimum and natural width of the container.# print("GET PREFERRED WIDTH", self._impl.native)width=self._impl.interface.layout.width-min_width=0ifself._impl.min_widthisNoneelseself._impl.min_widthforwidgetinself.get_children():
if (
min_width<=widget.interface.layout.absolute_content_right+widget.interface.style.padding_right
):
min_width= (
widget.interface.layout.absolute_content_right+widget.interface.style.padding_right
)
+min_width+=self._impl.interface.style.padding_rightifmin_width>width:
width=min_widthreturnmin_width, width
Unfortunately, solve this bug make the bug #1205 dominant in any widget that has Gtk.ScrolledWindow as a native layer
To Reproduce
Steps to reproduce the behavior:
Fix min_width bug in Box widget as shown above.
Run detailedlist example, for example.
Try make window size bigger.
Try now, make window size smaller.
You will not be able to make it smaller
Expected behavior
You must be able to make it smaller
Environment:
Operating System: Kali
Python version: 3.9.2
Software versions:
Toga: 0.3.0.dev27
Additional context
I think the problem is in the our approach of implementation of the Box widget that may be contrasts with the Gtk.scrolledWindow behavior, also the problem may be related to #1047 question.
Describe the bug
There is a small bug in
Box
widget, when we have padding for most outerBox
the current implementation ofmin_width
, and also ofmin_height
, does not calculate it. This bug can be solve easily by adding these padding as following for bothdo_get_preferred_width
anddo_get_preferred_height
functions:Unfortunately, solve this bug make the bug #1205 dominant in any widget that has
Gtk.ScrolledWindow
as anative
layerTo Reproduce
Steps to reproduce the behavior:
min_width
bug inBox
widget as shown above.Expected behavior
You must be able to make it smaller
Environment:
Additional context
I think the problem is in the our approach of implementation of the
Box
widget that may be contrasts with theGtk.scrolledWindow
behavior, also the problem may be related to #1047 question.@freakboy3742, please take look at this.
The text was updated successfully, but these errors were encountered: