diff options
author | Johannes Tröscher <fritz_van_tom@hotmail.com> | 2011-09-18 10:22:08 +0200 |
---|---|---|
committer | Johannes Tröscher <fritz_van_tom@hotmail.com> | 2011-09-18 10:22:08 +0200 |
commit | 571da29d02ff5e57e4e1ffa48e85c409950d7156 (patch) | |
tree | 393cbec874ba2c680d5f3ffd2d99aab49ffdefd8 /src | |
parent | Improve code in plugin loading (not yet perfect, I fear...) (diff) | |
download | rekonq-571da29d02ff5e57e4e1ffa48e85c409950d7156.tar.xz |
show notifyPopup at right edge if find- or zoombar is visible
REVIEW: 102649
REVIEWED-BY: adjam
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ebf8d676..12ecf7a8 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1196,8 +1196,9 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status) m_popup->setFixedSize(labelSize); m_popup->setText(fm.elidedText(msg, Qt::ElideMiddle, labelSize.width())); - bool horizontalScrollbarIsVisible = tab->page()->currentFrame()->scrollBarMaximum(Qt::Horizontal); - bool verticalScrollbarIsVisible = tab->page()->currentFrame()->scrollBarMaximum(Qt::Vertical); + const bool horizontalScrollbarIsVisible = tab->page()->currentFrame()->scrollBarMaximum(Qt::Horizontal); + const bool verticalScrollbarIsVisible = tab->page()->currentFrame()->scrollBarMaximum(Qt::Vertical); + const bool actionBarsVisible = m_findBar->isVisible() || m_zoomBar->isVisible(); const int scrollbarExtent = style()->pixelMetric(QStyle::PM_ScrollBarExtent); const int hScrollbarSize = horizontalScrollbarIsVisible ? scrollbarExtent : 0; @@ -1207,7 +1208,7 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status) const QPoint bottomPoint = m_view->mapTo(this, m_view->geometry().bottomLeft()); // +1 because bottom() returns top() + height() - 1 , see QRect doku int y = bottomPoint.y() + 1 - m_popup->height() - hScrollbarSize; - int x = QRect(QPoint(0, y), labelSize).contains(mousePos) + int x = QRect(QPoint(0, y), labelSize).contains(mousePos) || actionBarsVisible ? width() - labelSize.width() - vScrollbarSize : 0; |