Replies: 1 comment
-
Q1. This appears to be a bug on Windows. I'm not sure why it isn't honoring background transparency; it does on macOS. I've opened #1665 to track this problem. Q2 is somewhere between a bug and feature. The Pack algorithm is doing right thing as currently defined; however, there's definitely debate to be had over whether that's the right thing. You're not the first person to hit problems like this one. The core of the issue here is that Pack has inherited a bunch of behavior from web browsers, which primarily interpret documents as a page of fixed width, but arbitrary height, with the assumption that a vertical scrollbar will be the preferred handling for content overflow; however, in the context of app layout, the height of the document is an important constraint. CSS has mechanisms to handle this, but Pack hasn't fully inherited those mechanisms. As a result, when you have a box that contains children whose height is all fix collection of boxes with a fixed height in a column, the containing box has it's height constrained to the fixed height of it's children. The workaround is to add a box into the column that is flexible, so that box can expand to fill the available vertical space. Q4 - If you remove the fixed width from textbox_style, it will become flexible, and will expand to the width of the window. Q5 is a "feature"; Toga won't allow a window to be smaller than the minimum size required by the layout. In your case, you've described a fixed width requirement on TextInputs; Toga is honoring that and preventing the window from being any smaller than that. The fix here is to avoid hard-defined width/height definitions unless you really mean it. Q6 is a different manifestation of Q2. When you take the fixed height elements out of the layout, there's no children influencing the height/width of the vertical box; as a result, the box fully participates in the layout, expanding to the available height. |
Beta Was this translation helpful? Give feedback.
-
DOCUMENTED CODE BELOW (runs on Windows 10)
Hi guys, I cannot seem to be able to get the following code to do what I want.
Questions
Beta Was this translation helpful? Give feedback.
All reactions