summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp15
-rw-r--r--src/webview.cpp34
2 files changed, 18 insertions, 31 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);
diff --git a/src/webview.cpp b/src/webview.cpp
index ce38d2ef..7efded7f 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -545,32 +545,16 @@ void WebView::openLinkInNewTab()
void WebView::keyPressEvent(QKeyEvent *event)
{
- // CTRL has been promoted rekonq favorite modifier.. :D
- if ( event->modifiers() == Qt::ControlModifier )
+ if ((event->modifiers() == Qt::ControlModifier) && (event->key() == Qt::Key_C))
{
- switch (event->key())
- {
- case Qt::Key_A:
- triggerPageAction(QWebPage::SelectAll);
- return;
- case Qt::Key_C:
- triggerPageAction(QWebPage::Copy);
- return;
- case Qt::Key_Down:
- startScrollAnimation(WebView::Down);
- return;
- case Qt::Key_Up:
- startScrollAnimation(WebView::Up);
- return;
- case Qt::Key_Left:
- startScrollAnimation(WebView::Left);
- return;
- case Qt::Key_Right:
- startScrollAnimation(WebView::Right);
- return;
- default:
- break;
- }
+ triggerPageAction(QWebPage::Copy);
+ return;
+ }
+
+ if ((event->modifiers() == Qt::ControlModifier) && (event->key() == Qt::Key_A))
+ {
+ triggerPageAction(QWebPage::SelectAll);
+ return;
}
QWebView::keyPressEvent(event);