From 69d13337fe7c54ef26e02ca285246ccdfe03c319 Mon Sep 17 00:00:00 2001 From: Peter Ganzhorn Date: Sun, 3 May 2015 18:18:40 +0200 Subject: Fix hidden toolbar placement --- src/Toolbar.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 4f8804f..b607f21 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -648,24 +648,29 @@ void Toolbar::setPlacement(Toolbar::Placement where) { break; case TOPCENTER: frame.x += (head_w - static_cast(frame.width))/2 - bw; + frame.x_hidden = frame.x; frame.y_hidden += pixel - bw - static_cast(frame.height); break; case TOPRIGHT: frame.x += head_w - static_cast(frame.width) - bw*2; + frame.x_hidden = frame.x; frame.y_hidden += pixel - bw - static_cast(frame.height); break; case BOTTOMRIGHT: frame.x += head_w - static_cast(frame.width) - bw*2; frame.y += head_h - static_cast(frame.height) - bw*2; + frame.x_hidden = frame.x; frame.y_hidden += head_h - bw - pixel; break; case BOTTOMCENTER: // default is BOTTOMCENTER frame.x += (head_w - static_cast(frame.width))/2 - bw; frame.y += head_h - static_cast(frame.height) - bw*2; + frame.x_hidden = frame.x; frame.y_hidden += head_h - bw - pixel; break; case LEFTCENTER: frame.y += (head_h - static_cast(frame.height))/2 - bw; + frame.y_hidden = frame.y; frame.x_hidden += pixel - static_cast(frame.width) - bw; break; case LEFTTOP: @@ -673,21 +678,24 @@ void Toolbar::setPlacement(Toolbar::Placement where) { break; case LEFTBOTTOM: frame.y = head_h - static_cast(frame.height) - bw*2; + frame.y_hidden = frame.y; frame.x_hidden += pixel - static_cast(frame.width) - bw; break; case RIGHTCENTER: frame.x += head_w - static_cast(frame.width) - bw*2; frame.y += (head_h - static_cast(frame.height))/2 - bw; - frame.x_hidden += static_cast(frame.width) + bw - pixel; + frame.x_hidden += head_w - bw - pixel; + frame.y_hidden = frame.y; break; case RIGHTTOP: frame.x += head_w - static_cast(frame.width) - bw*2; - frame.x_hidden += static_cast(frame.width) + bw - pixel; + frame.x_hidden += head_w - bw - pixel; break; case RIGHTBOTTOM: frame.x += head_w - static_cast(frame.width) - bw*2; frame.y += head_h - static_cast(frame.height) - bw*2; - frame.x_hidden += static_cast(frame.width) + bw - pixel; + frame.x_hidden += head_w - bw - pixel; + frame.y_hidden = frame.y; break; } -- cgit v0.11.2