Selaa lähdekoodia

Merge pull request #2136 from cg2121/simplify-fullscreen

UI: Simplify fullscreen toggle code
Jim 6 vuotta sitten
vanhempi
sitoutus
6410bc646f
2 muutettua tiedostoa jossa 1 lisäystä ja 7 poistoa
  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);
 #endif
 
-	if (windowState().testFlag(Qt::WindowFullScreen))
-		fullscreenInterface = true;
-
 	bool has_last_version = config_has_user_value(App()->GlobalConfig(),
 						      "General", "LastVersion");
 	bool first_run =
@@ -6612,12 +6609,10 @@ void OBSBasic::OpenSavedProjectors()
 
 void OBSBasic::on_actionFullscreenInterface_triggered()
 {
-	if (!fullscreenInterface)
+	if (!isFullScreen())
 		showFullScreen();
 	else
 		showNormal();
-
-	fullscreenInterface = !fullscreenInterface;
 }
 
 void OBSBasic::UpdateTitleBar()

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

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