diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2013-08-17 01:13:37 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-08-17 01:13:37 +0200 |
commit | 6c8cf8854f957cdf2520c9d199fee80c8d09b901 (patch) | |
tree | ea68a94793211c2887203625aaac8234bfbcd56a /src | |
parent | Get sure WebIcon does NOT autodelete the icon downloader before done (diff) | |
download | rekonq-6c8cf8854f957cdf2520c9d199fee80c8d09b901.tar.xz |
span rekonq menu in the right place
BUG: 322003
Diffstat (limited to 'src')
-rw-r--r-- | src/webwindow/rekonqmenu.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/webwindow/rekonqmenu.cpp b/src/webwindow/rekonqmenu.cpp index 4ea01708..42a4af40 100644 --- a/src/webwindow/rekonqmenu.cpp +++ b/src/webwindow/rekonqmenu.cpp @@ -49,7 +49,6 @@ void RekonqMenu::showEvent(QShowEvent* event) // rekonq window to reduce the cases that sub-menus might overlap // the right screen border. QPoint position = pos(); - int y = position.y(); int w = width(); @@ -58,7 +57,13 @@ void RekonqMenu::showEvent(QShowEvent* event) int pw = parentWidget->width(); int px = widgetGlobalPos.x(); - QPoint newPosition = QPoint(px + pw - w, y); + // if menu does not overlays right border, do NOT move it + int xw = position.x() + w; + int pxw = px + pw; + if (xw < pxw) + return; + + QPoint newPosition = QPoint(px + pw - w, position.y()); // Finally, move it there... move(newPosition); |