aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.cc
diff options
context:
space:
mode:
authorLajos Koszti <ajnasz@ajnasz.hu>2015-03-14 11:03:52 (GMT)
committerLajos Koszti <ajnasz@ajnasz.hu>2015-05-01 20:16:03 (GMT)
commitc8a1c67494bc6941b4a2f1298bf88a80543988ad (patch)
tree9d080d20942cffb03cab27d4a0f07fe4f1e13506 /src/FbTk/Menu.cc
parent88a74ff1cde22be3e894498ffd88934dc92dfef0 (diff)
downloadfluxbox-c8a1c67494bc6941b4a2f1298bf88a80543988ad.zip
fluxbox-c8a1c67494bc6941b4a2f1298bf88a80543988ad.tar.bz2
Make sure render new styles into full menu
Different styles makes the menu width different. When the original menu width is bigger than the newly selected style's width, the rendering produces pretty strange effects: The old style's frame not cleared, so it was rendered and visible next to the new style edge. With this change, the menu width will be as wide as the widest menu item. Style switching still not perfect, because the height of a menu item is from the "first" selected menu, also font color are not updated.
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r--src/FbTk/Menu.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 0a7c20a..333a609 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -430,6 +430,8 @@ void Menu::updateMenu() {
430 m_item_w = std::max(iw, m_item_w); 430 m_item_w = std::max(iw, m_item_w);
431 } 431 }
432 432
433 // the menu width should be as wide as the widest menu item
434 w = m_item_w;
433 435
434 // calculate needed columns 436 // calculate needed columns
435 m_columns = 0; 437 m_columns = 0;