Re: heads up on table change

Robin Becker <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
On 18/03/2016 17:15, Glenn Linderman wrote:
> On 3/18/2016 9:25 AM, Robin Becker wrote:
>> In version 3.3.2,
>>
>> https://bitbucket.org/rptlab/reportlab/commits
>> /967759f7f778f1c03c6a8e1e248a525a9072a003
>>
>> a bug fix found by Vytis Banaitis (vytis @ bitbucket) removes double padding
>> in Table._calcPreliminaryWidths which can have effects on table column sizes.
>>
>> I looked at differences in all the reportlab test cases and there were only a
>> few. Personally I preferred the earlier outcomes, but using the padding twice
>> is clearly wrong.
>>
>> If you want to restore the earlier outcome then shout loudly here and I will
>> add some settings mechanism to accomplish that.
>



> Would it not be simple, for folks that want the earlier outcomes, to double
> their padding width?  Or would that have an effect on the outer padding of the
> outer columns that is different from before? In other words, you didn't really
> describe the effect of the bug completely, but the code you linked to makes it
> look like simply doubling the padding would recreate the original effect.
>
........
Unfortunately, I am almost certain it would not work. The left right+padding got 
added twice into the width estimation for columns without a specified width.

Later during layout the padding was used correctly. It ought to have more effect 
on smaller columns and my observations of the changes in the outcomes of 
test_platypus_tables seem to bear that out. The column width estimation in 
platypus tables seems a bit ad hoc to me so there is room for improvement.
-- 
Robin Becker
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.