summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-24 00:14:35 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-24 00:14:35 +0200
commitaab62d76ead2253d8389f2a0814e42ae06070ef3 (patch)
tree32f80093bef6062ce81c67d0dc930695f651ae54 /src
parentno shift + arrows scrolling actions for rekonq 0.3 (diff)
downloadrekonq-aab62d76ead2253d8389f2a0814e42ae06070ef3.tar.xz
popup Lionel's idea. In Italy we say "Capra e Cavoli" :D
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 787ecdce..275f64eb 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -961,7 +961,6 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status)
}
// useful values
- int windowWidth = width();
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);
@@ -975,21 +974,25 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status)
// setting the popup
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(windowWidth/3, labelHeight);
+ m_popup->setFixedSize(0, 0);
m_popup->layout()->setAlignment(Qt::AlignTop);
m_popup->layout()->setMargin(4);
// setting popus in bottom-(left/right) position
int x = geometry().x();
+ int y;
if(m_flickeringZone)
{
- x = width() - m_popup->width();
- label->setAlignment(Qt::AlignRight);
+ y = m_view->currentWebView()->mapToGlobal(QPoint(0,0)).y();
}
-
- int y = m_view->currentWebView()->mapToGlobal(QPoint(0,pageHeight)).y() - labelHeight - scrollbarSize;
+ else
+ {
+ y = m_view->currentWebView()->mapToGlobal(QPoint(0,pageHeight)).y() - labelHeight - scrollbarSize;
+ }
+
QPoint p(x,y);
m_popup->show(p);