Code: Select all
vpgrid:
cols 2
rows len(dics) # List length value
for i, k in dics.items():
frame:
style_prefix 'prefix_stats_only_left_frames'
text str(i)
frame:
style_prefix 'prefix_stats_only_right_frames'
text str(k)
I use this approach because I want the result to be a table, but the right side with the values should have a small width, and the left side with the variable names should be wide enough, that is, at least 300 wide.
But I have some extra width here, which is measured as a percentage and which I want to get rid of. I need to be able to define the minimum width myself, and the parent frame adjusts to these dimensions.
XFILL False does not help.
What is this value that affects the size? Where is it? I used SHIFT+i and didn't see anything that would affect it.
How can I set this invisible value to 0, or how can I make a fluid (automatic) width that will adjust to child elements?
In the screenshots, the values go in this order:
1. Left frame minwidth
2. Right frame minwidth
3. The xsize of the main frame
Some invisible value of 20-40 pixels affects the situation.
Because when both frames have a minimum width of 60 and the parent frame has a width of 130, the right frame part does not fit in the parent frame. Padding has no effect on this.
As I understand, this phantom width is set not in the number of pixels, but in percentage, because if I put:
300 - for the left frame
100 - for the right frame
and 610 - for the main frame
then some of the content of the right frame will not fit.
That is, in this case (610 - (300+100)) I have an extra 220 pixels.
I counted 220 and not 210, because I took into account the necessary number so that the content on the right side does not crawl out of the parent frame.
If I divide all values by 2:
150 - for the left frame
50 - for the right frame
305 - for the main frame
then the extra size will be 115 pixels (taking into account the required number so that the content on the right side does not crawl out of the frame).
75 - for the left frame
25 - for the right frame
165 - for the main frame
then the extra size will be 65 pixels (taking into account the number needed so that the content of the right side does not crawl out of the frame).
As you can see, this is a percentage of the width, not a specific value...
What should I do? I don't want to use fixed sizes because I think it's bad practice. Perhaps it has something to do with vpgrid?
I was also very surprised that Renpy has a minwidth property, but no maxwidth...