diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-08-03 23:12:29 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-08-03 23:12:29 +0200 |
commit | 727ddc59aae582421f1663a57f90e465656c31c3 (patch) | |
tree | d9fd4e8e0920d2a0d75201eb3f9cfc67ded9a042 /src/mainwindow.cpp | |
parent | 0.1.96 version dropping (for now) KIO::AccessManager support (diff) | |
parent | popup max width = window width (diff) | |
download | rekonq-727ddc59aae582421f1663a57f90e465656c31c3.tar.xz |
Merge branch 'POPUP3'
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 27ed8e37..7f00f201 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -933,16 +933,22 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status) m_popup->setFrameShape(QFrame::NoFrame); QLabel *label = new QLabel(msg); + label->setMaximumWidth(width()-8); m_popup->setLineWidth(0); m_popup->setView(label); m_popup->setFixedSize(0, 0); m_popup->layout()->setAlignment(Qt::AlignTop); m_popup->layout()->setMargin(4); - int h = KGlobalSettings::generalFont().pointSize(); // setting popus in bottom-left position + int pageHeight = m_view->currentWebView()->page()->viewportSize().height(); + int labelHeight = KGlobalSettings::generalFont().pointSize()*2 + 7; + bool scrollbarIsVisible = m_view->currentWebView()->page()->currentFrame()->scrollBarMaximum(Qt::Horizontal); + int scrollbarSize = 0; + if (scrollbarIsVisible) scrollbarSize = 17; //TODO: detect QStyle size + int x = geometry().x(); - int y = geometry().y() + height() - h*3; + int y = m_view->currentWebView()->mapToGlobal(QPoint(0,pageHeight)).y() - labelHeight -scrollbarSize; QPoint p(x,y); m_popup->show(p); |