UI: Pass parent QWidget to Browser Docks
parent
3dbdd4b312
commit
bc9911f5a6
|
@ -142,7 +142,7 @@ void RestreamAuth::LoadUI()
|
||||||
chat->setWindowTitle(QTStr("Auth.Chat"));
|
chat->setWindowTitle(QTStr("Auth.Chat"));
|
||||||
chat->setAllowedAreas(Qt::AllDockWidgetAreas);
|
chat->setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||||
|
|
||||||
browser = cef->create_widget(nullptr, url, panel_cookies);
|
browser = cef->create_widget(chat.get(), url, panel_cookies);
|
||||||
chat->SetWidget(browser);
|
chat->SetWidget(browser);
|
||||||
|
|
||||||
main->addDockWidget(Qt::RightDockWidgetArea, chat.data());
|
main->addDockWidget(Qt::RightDockWidgetArea, chat.data());
|
||||||
|
@ -159,7 +159,7 @@ void RestreamAuth::LoadUI()
|
||||||
info->setWindowTitle(QTStr("Auth.StreamInfo"));
|
info->setWindowTitle(QTStr("Auth.StreamInfo"));
|
||||||
info->setAllowedAreas(Qt::AllDockWidgetAreas);
|
info->setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||||
|
|
||||||
browser = cef->create_widget(nullptr, url, panel_cookies);
|
browser = cef->create_widget(info.get(), url, panel_cookies);
|
||||||
info->SetWidget(browser);
|
info->SetWidget(browser);
|
||||||
|
|
||||||
main->addDockWidget(Qt::LeftDockWidgetArea, info.data());
|
main->addDockWidget(Qt::LeftDockWidgetArea, info.data());
|
||||||
|
@ -176,7 +176,7 @@ void RestreamAuth::LoadUI()
|
||||||
channels->setWindowTitle(QTStr("RestreamAuth.Channels"));
|
channels->setWindowTitle(QTStr("RestreamAuth.Channels"));
|
||||||
channels->setAllowedAreas(Qt::AllDockWidgetAreas);
|
channels->setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||||
|
|
||||||
browser = cef->create_widget(nullptr, url, panel_cookies);
|
browser = cef->create_widget(channels.get(), url, panel_cookies);
|
||||||
channels->SetWidget(browser);
|
channels->SetWidget(browser);
|
||||||
|
|
||||||
main->addDockWidget(Qt::LeftDockWidgetArea, channels.data());
|
main->addDockWidget(Qt::LeftDockWidgetArea, channels.data());
|
||||||
|
|
|
@ -225,7 +225,7 @@ void TwitchAuth::LoadUI()
|
||||||
chat->setWindowTitle(QTStr("Auth.Chat"));
|
chat->setWindowTitle(QTStr("Auth.Chat"));
|
||||||
chat->setAllowedAreas(Qt::AllDockWidgetAreas);
|
chat->setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||||
|
|
||||||
browser = cef->create_widget(nullptr, url, panel_cookies);
|
browser = cef->create_widget(chat.get(), url, panel_cookies);
|
||||||
chat->SetWidget(browser);
|
chat->SetWidget(browser);
|
||||||
cef->add_force_popup_url(moderation_tools_url, chat.data());
|
cef->add_force_popup_url(moderation_tools_url, chat.data());
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ void TwitchAuth::LoadSecondaryUIPanes()
|
||||||
info->setWindowTitle(QTStr("Auth.StreamInfo"));
|
info->setWindowTitle(QTStr("Auth.StreamInfo"));
|
||||||
info->setAllowedAreas(Qt::AllDockWidgetAreas);
|
info->setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||||
|
|
||||||
browser = cef->create_widget(nullptr, url, panel_cookies);
|
browser = cef->create_widget(info.get(), url, panel_cookies);
|
||||||
info->SetWidget(browser);
|
info->SetWidget(browser);
|
||||||
browser->setStartupScript(script);
|
browser->setStartupScript(script);
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ void TwitchAuth::LoadSecondaryUIPanes()
|
||||||
stat->setWindowTitle(QTStr("TwitchAuth.Stats"));
|
stat->setWindowTitle(QTStr("TwitchAuth.Stats"));
|
||||||
stat->setAllowedAreas(Qt::AllDockWidgetAreas);
|
stat->setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||||
|
|
||||||
browser = cef->create_widget(nullptr, url, panel_cookies);
|
browser = cef->create_widget(stat.get(), url, panel_cookies);
|
||||||
stat->SetWidget(browser);
|
stat->SetWidget(browser);
|
||||||
browser->setStartupScript(script);
|
browser->setStartupScript(script);
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ void TwitchAuth::LoadSecondaryUIPanes()
|
||||||
feed->setWindowTitle(QTStr("TwitchAuth.Feed"));
|
feed->setWindowTitle(QTStr("TwitchAuth.Feed"));
|
||||||
feed->setAllowedAreas(Qt::AllDockWidgetAreas);
|
feed->setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||||
|
|
||||||
browser = cef->create_widget(nullptr, url, panel_cookies);
|
browser = cef->create_widget(feed.get(), url, panel_cookies);
|
||||||
feed->SetWidget(browser);
|
feed->SetWidget(browser);
|
||||||
browser->setStartupScript(script);
|
browser->setStartupScript(script);
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ void YoutubeAuth::LoadUI()
|
||||||
chat->setWindowTitle(QTStr("Auth.Chat"));
|
chat->setWindowTitle(QTStr("Auth.Chat"));
|
||||||
chat->setAllowedAreas(Qt::AllDockWidgetAreas);
|
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);
|
panel_cookies);
|
||||||
browser->setStartupScript(ytchat_script);
|
browser->setStartupScript(ytchat_script);
|
||||||
|
|
||||||
|
|
|
@ -530,7 +530,7 @@ void OBSBasic::AddExtraBrowserDock(const QString &title, const QString &url,
|
||||||
dock->setAllowedAreas(Qt::AllDockWidgetAreas);
|
dock->setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||||
|
|
||||||
QCefWidget *browser =
|
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)
|
if (browser && panel_version >= 1)
|
||||||
browser->allowAllPopups(true);
|
browser->allowAllPopups(true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue