1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Fix position of status bar message popup

This commit is contained in:
David Rosca 2016-01-24 16:42:09 +01:00
parent f9359da446
commit 5808f3c581

View File

@ -126,15 +126,11 @@ void StatusBarMessage::showMessage(const QString &message)
#endif
WebView* view = m_window->weView();
// Hardcode some sane value as we can't get the real value with QtWebEngine
int horizontalScrollSize = 20;
int verticalScrollSize = 20;
m_statusBarText->setText(message);
m_statusBarText->setMaximumWidth(view->width() - verticalScrollSize);
m_statusBarText->setMaximumWidth(view->width() - 20);
m_statusBarText->resize(m_statusBarText->sizeHint());
QPoint position(0, view->height() - horizontalScrollSize - m_statusBarText->height());
QPoint position(0, view->height() - m_statusBarText->height());
const QRect statusRect = QRect(view->mapToGlobal(QPoint(0, position.y())), m_statusBarText->size());
if (statusRect.contains(QCursor::pos())) {