Well, if I was going to design it again from scratch then using FlexBox would be ideal. In this case though it was very easy to add a minimum num columns.
I think flexbox would be overkill, as you possibly only need 3-4 columns max. Anything more would mean that there are too many choice and a different input method should maybe be used altogether
I don’t really see how. How can I detect in “drawPopupMenuItem” that this item is part of a multi-column menu? Or that it’s not the last column, so it doesn’t have to draw a line on the right hand side?
Hmm, I guess there’s not enough info in the callback to know that.
Actually, given that you’re forcing a known number of columns, it might be better to draw the lines in the drawPopupMenuBackground call instead, where you know the overall size so it’s easy to figure out.
Yes, but I’m not always forcing multiple columns. Since the drawPopupMenuBackground doesn’t get any additional information either (only width and height), I can’t dynamically detect how many columns are used. I would need to create one custom LookAndFeel class for each number of columns…