Comment 1 for bug 324435

Revision history for this message
Michael Rooney (mrooney) wrote : Re: [0.5] amount column is not always large enough

Yes, it should be simple enough to make this as wide as the longest entry. Getting text extents of thousands of transactions could be slow, so we should make a guess and sort transactions by highest amount, then use the text extend of the largest value. The negative sign also takes up room in every currency that I know of, so perhaps we should compare based on highest value, but multiple negative numbers by -10 to make up for the extra character.

We can do this on account setting, as well as currency change events and recalculate the extent here as well. It might be ideal to keep a "largestValue" attribute, so when transactions are added they can be compared against this and grow if necessary, without comparing everything on every addition.