Jelajahi Sumber

UI: Remove help icon from auth/what's new titlebars

jp9000 6 tahun lalu
induk
melakukan
3f59e2fb13
2 mengubah file dengan 8 tambahan dan 0 penghapusan
  1. 4 0
      UI/auth-oauth.cpp
  2. 4 0
      UI/window-basic-main.cpp

+ 4 - 0
UI/auth-oauth.cpp

@@ -30,6 +30,10 @@ OAuthLogin::OAuthLogin(QWidget *parent, const std::string &url, bool token)
 	setMinimumSize(400, 400);
 	resize(700, 700);
 
+	Qt::WindowFlags flags = windowFlags();
+	Qt::WindowFlags helpFlag = Qt::WindowContextHelpButtonHint;
+	setWindowFlags(flags & (~helpFlag));
+
 	OBSBasic::InitBrowserPanelSafeBlock(true);
 
 	cefWidget = cef->create_widget(nullptr, url, panel_cookies);

+ 4 - 0
UI/window-basic-main.cpp

@@ -1923,6 +1923,10 @@ void OBSBasic::ReceivedIntroJson(const QString &text)
 	dlg->setWindowTitle("What's New");
 	dlg->resize(700, 600);
 
+	Qt::WindowFlags flags = dlg->windowFlags();
+	Qt::WindowFlags helpFlag = Qt::WindowContextHelpButtonHint;
+	dlg->setWindowFlags(flags & (~helpFlag));
+
 	QCefWidget *cefWidget = cef->create_widget(nullptr, info_url);
 	if (!cefWidget) {
 		return;