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:
parent
f9359da446
commit
5808f3c581
@ -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())) {
|
||||
|
Loading…
Reference in New Issue
Block a user