mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
[Fix] Setting correct popup window size when site requested it.
- now resizing webview to desired size, not the whole popupwindow * popupwindow is containg statusbar + locationbar
This commit is contained in:
parent
7536da24e1
commit
bbec6d2ca4
|
@ -74,6 +74,6 @@ FAQ and Changelog
|
|||
|
||||
If you are experiencing some sort of problem, please read the FAQ before you open an issue.
|
||||
|
||||
FAQ: https://github.com/nowrep/QupZilla/blob/master/FAQ
|
||||
FAQ: https://github.com/nowrep/QupZilla/wiki/FAQ
|
||||
|
||||
Changelog: https://github.com/nowrep/QupZilla/wiki/Changelog
|
||||
|
|
|
@ -550,7 +550,7 @@ void QupZilla::loadSettings()
|
|||
bool showAddTab = settings.value("showAddTabButton", false).toBool();
|
||||
bool makeTransparent = settings.value("useTransparentBackground", false).toBool();
|
||||
m_sideBarWidth = settings.value("SideBarWidth", 250).toInt();
|
||||
m_webViewWidth = settings.value("WebViewWidth", 390).toInt();
|
||||
m_webViewWidth = settings.value("WebViewWidth", 2000).toInt();
|
||||
QString activeSideBar = settings.value("SideBar", "None").toString();
|
||||
settings.endGroup();
|
||||
bool adBlockEnabled = settings.value("AdBlock/enabled", true).toBool();
|
||||
|
|
|
@ -65,6 +65,10 @@ PopupWindow::PopupWindow(PopupWebView* view)
|
|||
}
|
||||
|
||||
m_locationBar->showUrl(urlToShow);
|
||||
|
||||
// Ensuring correct sizes for widgets in layout are calculated even
|
||||
// before calling QWidget::show()
|
||||
m_layout->activate();
|
||||
}
|
||||
|
||||
void PopupWindow::showNotification(QWidget* notif)
|
||||
|
@ -94,7 +98,12 @@ void PopupWindow::setWindowGeometry(const QRect &newRect)
|
|||
{
|
||||
if (newRect.isValid()) {
|
||||
QRect oldRect = rect();
|
||||
setGeometry(newRect);
|
||||
move(newRect.topLeft());
|
||||
|
||||
QSize newSize = newRect.size();
|
||||
int additionalHeight = height() - m_view->height();
|
||||
newSize.setHeight(newSize.height() + additionalHeight);
|
||||
resize(newSize);
|
||||
|
||||
if (newRect.topLeft() == QPoint(0, 0) && oldRect.topLeft() == QPoint(0, 0)) {
|
||||
qz_centerWidgetOnScreen(this);
|
||||
|
|
Loading…
Reference in New Issue
Block a user