all repos — fluxbox @ 5d90b7984cb73ede2763346382fb6e038ae5d16d

custom fork of the fluxbox windowmanager

Fix menus over a single column wide

Fixes menus more than 1 column wide (such as the Placement menus for
the Toolbar/Slit/Tabs) which stopped working with commit 3e4570b.
Juan Gonzalez Lopez j.gonzalez@nubalia.com
commit

5d90b7984cb73ede2763346382fb6e038ae5d16d

parent

7b8e4413f8c68f13a36945b9482218ec6be4be5e

1 files changed, 4 insertions(+), 3 deletions(-)

jump to
M src/FbTk/Menu.ccsrc/FbTk/Menu.cc

@@ -430,9 +430,6 @@ iw = m_items[i]->width(theme());

m_item_w = std::max(iw, m_item_w); } - // the menu width should be as wide as the widest menu item - w = m_item_w; - // calculate needed columns m_columns = 0; m_rows_per_column = 0;

@@ -444,6 +441,10 @@ m_columns++;

} m_columns = std::max(m_min_columns, m_columns); + + // the menu width should be as wide as the widest menu item + w = m_item_w * m_columns; + m_rows_per_column = m_items.size() / m_columns; if (m_items.size() % m_columns) m_rows_per_column++;