diff options
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r-- | src/Toolbar.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 1be10e2..97dfea3 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Toolbar.cc,v 1.149 2004/08/29 08:33:12 rathnor Exp $ | 25 | // $Id: Toolbar.cc,v 1.150 2004/08/29 12:33:53 rathnor Exp $ |
26 | 26 | ||
27 | #include "Toolbar.hh" | 27 | #include "Toolbar.hh" |
28 | 28 | ||
@@ -609,7 +609,10 @@ void Toolbar::setPlacement(Toolbar::Placement where) { | |||
609 | head_h = screen().getHeadHeight(head); | 609 | head_h = screen().getHeadHeight(head); |
610 | } | 610 | } |
611 | 611 | ||
612 | frame.width = head_w * (*m_rc_width_percent) / 100; | 612 | int bevel_width = theme().bevelWidth(); |
613 | int border_width = theme().border().width(); | ||
614 | |||
615 | frame.width = (head_w - 2*border_width) * (*m_rc_width_percent) / 100; | ||
613 | //!! TODO: change this | 616 | //!! TODO: change this |
614 | // max height of each toolbar items font... | 617 | // max height of each toolbar items font... |
615 | unsigned int max_height = m_tool_factory.maxFontHeight(); | 618 | unsigned int max_height = m_tool_factory.maxFontHeight(); |
@@ -625,9 +628,6 @@ void Toolbar::setPlacement(Toolbar::Placement where) { | |||
625 | frame.height += 2; | 628 | frame.height += 2; |
626 | frame.height += (frame.bevel_w * 2); | 629 | frame.height += (frame.bevel_w * 2); |
627 | 630 | ||
628 | int bevel_width = theme().bevelWidth(); | ||
629 | int border_width = theme().border().width(); | ||
630 | |||
631 | // should we flipp sizes? | 631 | // should we flipp sizes? |
632 | if (isVertical()) { | 632 | if (isVertical()) { |
633 | frame.width = frame.height; | 633 | frame.width = frame.height; |
@@ -660,7 +660,7 @@ void Toolbar::setPlacement(Toolbar::Placement where) { | |||
660 | break; | 660 | break; |
661 | 661 | ||
662 | case TOPCENTER: | 662 | case TOPCENTER: |
663 | frame.x = head_x + (head_w - frame.width) / 2; | 663 | frame.x = head_x + (head_w - frame.width) / 2 - border_width; |
664 | frame.y = head_y; | 664 | frame.y = head_y; |
665 | frame.x_hidden = frame.x; | 665 | frame.x_hidden = frame.x; |
666 | frame.y_hidden = head_y + bevel_width - border_width - frame.height; | 666 | frame.y_hidden = head_y + bevel_width - border_width - frame.height; |
@@ -686,7 +686,7 @@ void Toolbar::setPlacement(Toolbar::Placement where) { | |||
686 | 686 | ||
687 | case BOTTOMCENTER: // default is BOTTOMCENTER | 687 | case BOTTOMCENTER: // default is BOTTOMCENTER |
688 | default: | 688 | default: |
689 | frame.x = head_x + (head_w - frame.width) / 2; | 689 | frame.x = head_x + (head_w - frame.width) / 2 - border_width; |
690 | frame.y = head_y + head_h - frame.height - border_width*2; | 690 | frame.y = head_y + head_h - frame.height - border_width*2; |
691 | frame.x_hidden = frame.x; | 691 | frame.x_hidden = frame.x; |
692 | frame.y_hidden = head_y + head_h - bevel_width - border_width; | 692 | frame.y_hidden = head_y + head_h - bevel_width - border_width; |
@@ -695,7 +695,7 @@ void Toolbar::setPlacement(Toolbar::Placement where) { | |||
695 | break; | 695 | break; |
696 | case LEFTCENTER: | 696 | case LEFTCENTER: |
697 | frame.x = head_x; | 697 | frame.x = head_x; |
698 | frame.y = head_y + (head_h - frame.height)/2; | 698 | frame.y = head_y + (head_h - frame.height)/2 - border_width; |
699 | frame.x_hidden = frame.x - frame.width + bevel_width + border_width; | 699 | frame.x_hidden = frame.x - frame.width + bevel_width + border_width; |
700 | frame.y_hidden = frame.y; | 700 | frame.y_hidden = frame.y; |
701 | if (m_shape.get()) | 701 | if (m_shape.get()) |
@@ -719,7 +719,7 @@ void Toolbar::setPlacement(Toolbar::Placement where) { | |||
719 | break; | 719 | break; |
720 | case RIGHTCENTER: | 720 | case RIGHTCENTER: |
721 | frame.x = head_x + head_w - frame.width - border_width*2; | 721 | frame.x = head_x + head_w - frame.width - border_width*2; |
722 | frame.y = head_y + (head_h - frame.height)/2; | 722 | frame.y = head_y + (head_h - frame.height)/2 - border_width; |
723 | frame.x_hidden = frame.x + frame.width - bevel_width - border_width; | 723 | frame.x_hidden = frame.x + frame.width - bevel_width - border_width; |
724 | frame.y_hidden = frame.y; | 724 | frame.y_hidden = frame.y; |
725 | if (m_shape.get()) | 725 | if (m_shape.get()) |