aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 2920925..3ceb880 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -364,6 +364,12 @@ void Toolbar::screenChanged(BScreen &screen) {
364 reconfigure(); 364 reconfigure();
365} 365}
366 366
367void Toolbar::relayout() {
368 forAll(m_item_list, std::mem_fun(&ToolbarItem::updateSizing));
369 rearrangeItems();
370 forAll(m_item_list, std::bind2nd(std::mem_fun(&ToolbarItem::renderTheme), alpha()));
371}
372
367void Toolbar::reconfigure() { 373void Toolbar::reconfigure() {
368 374
369 updateVisibleState(); 375 updateVisibleState();
@@ -404,6 +410,7 @@ void Toolbar::reconfigure() {
404 410
405 // destroy tools and rebuild them 411 // destroy tools and rebuild them
406 deleteItems(); 412 deleteItems();
413 screen().clearToolButtonMap();
407 // they will be readded later 414 // they will be readded later
408 menu().removeAll(); 415 menu().removeAll();
409 setupMenus(true); // rebuild menu but skip rebuild of placement menu 416 setupMenus(true); // rebuild menu but skip rebuild of placement menu
@@ -489,11 +496,7 @@ void Toolbar::reconfigure() {
489 if (theme()->shape() && m_shape.get()) 496 if (theme()->shape() && m_shape.get())
490 m_shape->update(); 497 m_shape->update();
491 498
492 forAll(m_item_list, std::mem_fun(&ToolbarItem::updateSizing)); 499 relayout();
493
494 rearrangeItems();
495
496 forAll(m_item_list, std::bind2nd(std::mem_fun(&ToolbarItem::renderTheme), alpha()));
497 500
498 // we're done with all resizing and stuff now we can request a new 501 // we're done with all resizing and stuff now we can request a new
499 // area to be reserved on screen 502 // area to be reserved on screen