Comment 2 for bug 1966514

Revision history for this message
ronso0 (ronso0) wrote (last edit ):

I agree.

For best experience for all users (all submenus fit the screen)
we should
a) show hierarchical menus only if required
b) adjust the splitting so submenus are equally sized and don't overflow (A-M, O-Z, or
   A-N, M-T, U-Z)

Since 'fits the screen' depends on skin stylesheets it can only be detected _after_ the Crates menu was constructed, for example by reading (protected) QMenu::columnCount and QMenu::size. So, if it would overflow we'd need to rebuild the menu with N submenus.
That feels inefficient. Maybe we can construct a dummy menu with one action, read its size, add some buffer for separators and possible QMenu padding, then compare that to the available screen height and create the submenus so everything fits nicely.