aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc35
1 files changed, 4 insertions, 31 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 84a6afb..0a9461a 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -609,21 +609,6 @@ void Toolbar::update(FbTk::Subject *subj) {
609void Toolbar::setPlacement(Toolbar::Placement where) { 609void Toolbar::setPlacement(Toolbar::Placement where) {
610 // disable vertical toolbar 610 // disable vertical toolbar
611 611
612/*
613 switch (where) {
614 case LEFTTOP:
615 case LEFTCENTER:
616 case LEFTBOTTOM:
617 case RIGHTTOP:
618 case RIGHTCENTER:
619 case RIGHTBOTTOM:
620 where = BOTTOMCENTER;
621 break;
622 default:
623 break;
624 }
625*/
626
627 *m_rc_placement = where; 612 *m_rc_placement = where;
628 int head_x = 0, 613 int head_x = 0,
629 head_y = 0, 614 head_y = 0,
@@ -638,10 +623,6 @@ void Toolbar::setPlacement(Toolbar::Placement where) {
638 head_h = screen().getHeadHeight(head); 623 head_h = screen().getHeadHeight(head);
639 } 624 }
640 625
641 FbTk::Orientation was_orient = FbTk::ROT0;
642 if (!m_item_list.empty())
643 was_orient = m_item_list.front()->orientation(); // all save orient (for rendering)
644
645 int bevel_width = theme().bevelWidth(); 626 int bevel_width = theme().bevelWidth();
646 int border_width = theme().border().width(); 627 int border_width = theme().border().width();
647 628
@@ -784,18 +765,10 @@ void Toolbar::setPlacement(Toolbar::Placement where) {
784 break; 765 break;
785 } 766 }
786 767
787 if (was_orient != orient) { 768 ItemList::iterator item_it = m_item_list.begin();
788 // hide for all this moving around 769 ItemList::iterator item_it_end = m_item_list.end();
789 if (*m_rc_visible) 770 for (; item_it != item_it_end; ++item_it)
790 frame.window.hide(); 771 (*item_it)->setOrientation(orient);
791 ItemList::iterator item_it = m_item_list.begin();
792 ItemList::iterator item_it_end = m_item_list.end();
793 for (; item_it != item_it_end; ++item_it) {
794 (*item_it)->setOrientation(orient);
795 }
796 if (*m_rc_visible)
797 frame.window.show();
798 }
799} 772}
800 773
801void Toolbar::updateVisibleState() { 774void Toolbar::updateVisibleState() {