UI: Pass parent QWidget to Browser Docks

master
Matt Gajownik 2021-11-30 21:11:36 +11:00 committed by Jim
parent 3dbdd4b312
commit bc9911f5a6
4 changed files with 9 additions and 9 deletions

View File

@ -142,7 +142,7 @@ void RestreamAuth::LoadUI()
chat->setWindowTitle(QTStr("Auth.Chat"));
chat->setAllowedAreas(Qt::AllDockWidgetAreas);
browser = cef->create_widget(nullptr, url, panel_cookies);
browser = cef->create_widget(chat.get(), url, panel_cookies);
chat->SetWidget(browser);
main->addDockWidget(Qt::RightDockWidgetArea, chat.data());
@ -159,7 +159,7 @@ void RestreamAuth::LoadUI()
info->setWindowTitle(QTStr("Auth.StreamInfo"));
info->setAllowedAreas(Qt::AllDockWidgetAreas);
browser = cef->create_widget(nullptr, url, panel_cookies);
browser = cef->create_widget(info.get(), url, panel_cookies);
info->SetWidget(browser);
main->addDockWidget(Qt::LeftDockWidgetArea, info.data());
@ -176,7 +176,7 @@ void RestreamAuth::LoadUI()
channels->setWindowTitle(QTStr("RestreamAuth.Channels"));
channels->setAllowedAreas(Qt::AllDockWidgetAreas);
browser = cef->create_widget(nullptr, url, panel_cookies);
browser = cef->create_widget(channels.get(), url, panel_cookies);
channels->SetWidget(browser);
main->addDockWidget(Qt::LeftDockWidgetArea, channels.data());

View File

@ -225,7 +225,7 @@ void TwitchAuth::LoadUI()
chat->setWindowTitle(QTStr("Auth.Chat"));
chat->setAllowedAreas(Qt::AllDockWidgetAreas);
browser = cef->create_widget(nullptr, url, panel_cookies);
browser = cef->create_widget(chat.get(), url, panel_cookies);
chat->SetWidget(browser);
cef->add_force_popup_url(moderation_tools_url, chat.data());
@ -313,7 +313,7 @@ void TwitchAuth::LoadSecondaryUIPanes()
info->setWindowTitle(QTStr("Auth.StreamInfo"));
info->setAllowedAreas(Qt::AllDockWidgetAreas);
browser = cef->create_widget(nullptr, url, panel_cookies);
browser = cef->create_widget(info.get(), url, panel_cookies);
info->SetWidget(browser);
browser->setStartupScript(script);
@ -333,7 +333,7 @@ void TwitchAuth::LoadSecondaryUIPanes()
stat->setWindowTitle(QTStr("TwitchAuth.Stats"));
stat->setAllowedAreas(Qt::AllDockWidgetAreas);
browser = cef->create_widget(nullptr, url, panel_cookies);
browser = cef->create_widget(stat.get(), url, panel_cookies);
stat->SetWidget(browser);
browser->setStartupScript(script);
@ -353,7 +353,7 @@ void TwitchAuth::LoadSecondaryUIPanes()
feed->setWindowTitle(QTStr("TwitchAuth.Feed"));
feed->setAllowedAreas(Qt::AllDockWidgetAreas);
browser = cef->create_widget(nullptr, url, panel_cookies);
browser = cef->create_widget(feed.get(), url, panel_cookies);
feed->SetWidget(browser);
browser->setStartupScript(script);

View File

@ -148,7 +148,7 @@ void YoutubeAuth::LoadUI()
chat->setWindowTitle(QTStr("Auth.Chat"));
chat->setAllowedAreas(Qt::AllDockWidgetAreas);
browser = cef->create_widget(nullptr, YOUTUBE_CHAT_PLACEHOLDER_URL,
browser = cef->create_widget(chat.get(), YOUTUBE_CHAT_PLACEHOLDER_URL,
panel_cookies);
browser->setStartupScript(ytchat_script);

View File

@ -530,7 +530,7 @@ void OBSBasic::AddExtraBrowserDock(const QString &title, const QString &url,
dock->setAllowedAreas(Qt::AllDockWidgetAreas);
QCefWidget *browser =
cef->create_widget(nullptr, QT_TO_UTF8(url), nullptr);
cef->create_widget(dock, QT_TO_UTF8(url), nullptr);
if (browser && panel_version >= 1)
browser->allowAllPopups(true);