Explorar o código

UI: Simplify fullscreen toggle code

Clayton Groeneveld %!s(int64=6) %!d(string=hai) anos
pai
achega
52a3a61a6e
Modificáronse 2 ficheiros con 1 adicións e 7 borrados
  1. 1 6
      UI/window-basic-main.cpp
  2. 0 1
      UI/window-basic-main.hpp

+ 1 - 6
UI/window-basic-main.cpp

@@ -1758,9 +1758,6 @@ void OBSBasic::OBSInit()
 	SystemTray(true);
 	SystemTray(true);
 #endif
 #endif
 
 
-	if (windowState().testFlag(Qt::WindowFullScreen))
-		fullscreenInterface = true;
-
 	bool has_last_version = config_has_user_value(App()->GlobalConfig(),
 	bool has_last_version = config_has_user_value(App()->GlobalConfig(),
 						      "General", "LastVersion");
 						      "General", "LastVersion");
 	bool first_run =
 	bool first_run =
@@ -6612,12 +6609,10 @@ void OBSBasic::OpenSavedProjectors()
 
 
 void OBSBasic::on_actionFullscreenInterface_triggered()
 void OBSBasic::on_actionFullscreenInterface_triggered()
 {
 {
-	if (!fullscreenInterface)
+	if (!isFullScreen())
 		showFullScreen();
 		showFullScreen();
 	else
 	else
 		showNormal();
 		showNormal();
-
-	fullscreenInterface = !fullscreenInterface;
 }
 }
 
 
 void OBSBasic::UpdateTitleBar()
 void OBSBasic::UpdateTitleBar()

+ 0 - 1
UI/window-basic-main.hpp

@@ -153,7 +153,6 @@ private:
 	long disableSaving = 1;
 	long disableSaving = 1;
 	bool projectChanged = false;
 	bool projectChanged = false;
 	bool previewEnabled = true;
 	bool previewEnabled = true;
-	bool fullscreenInterface = false;
 
 
 	const char *copyString;
 	const char *copyString;
 	const char *copyFiltersString = nullptr;
 	const char *copyFiltersString = nullptr;