Merge pull request #4554 from nextcloud/bugfix/login-webview-fill-height

Stretch WebView to fit dialog's height.
This commit is contained in:
allexzander 2022-05-18 18:46:31 +03:00 committed by GitHub
commit 847e8baa17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -55,7 +55,7 @@ WebFlowCredentialsDialog::WebFlowCredentialsDialog(Account *account, bool useFlo
} else { } else {
#ifdef WITH_WEBENGINE #ifdef WITH_WEBENGINE
_webView = new WebView(); _webView = new WebView();
_containerLayout->addWidget(_webView); _containerLayout->addWidget(_webView, 1);
connect(_webView, &WebView::urlCatched, this, &WebFlowCredentialsDialog::urlCatched); connect(_webView, &WebView::urlCatched, this, &WebFlowCredentialsDialog::urlCatched);
#endif // WITH_WEBENGINE #endif // WITH_WEBENGINE

View file

@ -107,7 +107,7 @@ WebView::WebView(QWidget *parent)
} }
_webview->setPage(_page); _webview->setPage(_page);
_ui.verticalLayout->addWidget(_webview); _ui.verticalLayout->addWidget(_webview, 1);
connect(_webview, &QWebEngineView::loadProgress, _ui.progressBar, &QProgressBar::setValue); connect(_webview, &QWebEngineView::loadProgress, _ui.progressBar, &QProgressBar::setValue);
connect(_schemeHandler, &WebViewPageUrlSchemeHandler::urlCatched, this, &WebView::urlCatched); connect(_schemeHandler, &WebViewPageUrlSchemeHandler::urlCatched, this, &WebView::urlCatched);

View file

@ -26,7 +26,7 @@ WebViewPage::WebViewPage(QWidget *parent)
auto *layout = new QVBoxLayout(this); auto *layout = new QVBoxLayout(this);
layout->setMargin(0); layout->setMargin(0);
layout->addWidget(_webView); layout->addWidget(_webView, 1);
setLayout(layout); setLayout(layout);
connect(_webView, &WebView::urlCatched, this, &WebViewPage::urlCatched); connect(_webView, &WebView::urlCatched, this, &WebViewPage::urlCatched);