Open ockham opened 11 years ago
I'm going to have a go at working on this.
Great, I'd be happy to welcome you as a contributor! Let me know if you run into any blockers, I'll try to help you work around them. BTW, thx for the triaging help!
Ok, I've got the title on the index view wrapping to fit the column when it is resized: https://github.com/pounamu/gourmet/tree/word_wrap_bug
However the cell height doesn't change even if the wrapping will make it take up one more row than previously.
I can make the cell height refresh appropriately by clicking on the column heading (to sort the recipes) but I can't figure out how to call that function in the code. And doing this also resets the column width to the default, but it does that after adjusting the height so the height may now not be appropriate for the new width anyway.
Also the really long recipe title I have doesn't get wrapped at all when I start gourmet (it just makes the title column very wide).
Hm. I guess we'll need to put some more work into this, as this is apparently non-trivial.
FWIW, there's a SO question on this, with two possibly helpful links to writing a custom TreeCellRenderer to that effect in one answer.
Converted from SourceForge issue 2962324, submitted by SourceForge user beelsr on 2010-03-03 01:49:09 UTC.
Using XP SP3; gourmet-0.15.4-alpha
On the main screen, for example, the recipe "Bourbon And Honey Smoke-Roasted Pork Tenderloin" gets wrapped as "Bourbon And Honey Smoke-Roasted" \n "Pork Tenderloin".
On the edit ingredients screen, for example, " beef, cut into cubes for stewing" gets wrapped as "beef, cut into cubes for" \n "stewing" but displays on a single line in the card view.
expected behavior: word-wrapping should follow the width of the column and not some other arbitrary value.