diff --git a/src/lib/popupwindow/popupwebview.cpp b/src/lib/popupwindow/popupwebview.cpp index a87f5ad96..3cf0accef 100644 --- a/src/lib/popupwindow/popupwebview.cpp +++ b/src/lib/popupwindow/popupwebview.cpp @@ -1,6 +1,6 @@ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2010-2016 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2010-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ PopupWebView::PopupWebView(QWidget* parent) QWidget* PopupWebView::overlayWidget() { - return this; + return parentWidget(); } void PopupWebView::loadInNewTab(const LoadRequest &req, Qz::NewTabPositionFlags position) diff --git a/src/lib/popupwindow/popupwindow.cpp b/src/lib/popupwindow/popupwindow.cpp index 298a498ab..025c8d894 100644 --- a/src/lib/popupwindow/popupwindow.cpp +++ b/src/lib/popupwindow/popupwindow.cpp @@ -1,6 +1,6 @@ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2010-2016 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2010-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -97,9 +97,17 @@ PopupWindow::PopupWindow(PopupWebView* view) addAction(action); } + QVBoxLayout *l = new QVBoxLayout(); + l->setContentsMargins(0, 0, 0, 0); + l->setSpacing(0); + l->addWidget(m_view); + + QWidget *viewWidget = new QWidget(this); + viewWidget->setLayout(l); + m_layout->insertWidget(0, m_menuBar); m_layout->addWidget(m_locationBar); - m_layout->addWidget(m_view); + m_layout->addWidget(viewWidget); m_layout->addWidget(m_statusBar); setLayout(m_layout);