Browse Source

UI: Add fullscreen UI option to view menu

(Edit by Jim: Removed "Fullscreen Preview" because that's already sort
of served by the normal fullscreen projector option via the preview
context menu)

Closes jp9000/obs-studio#846
cg2121 8 years ago
parent
commit
b8d907f399
4 changed files with 27 additions and 0 deletions
  1. 1 0
      UI/data/locale/en-US.ini
  2. 10 0
      UI/forms/OBSBasic.ui
  3. 13 0
      UI/window-basic-main.cpp
  4. 3 0
      UI/window-basic-main.hpp

+ 1 - 0
UI/data/locale/en-US.ini

@@ -489,6 +489,7 @@ Basic.MainMenu.View.Toolbars="&Toolbars"
 Basic.MainMenu.View.Toolbars.Listboxes="&Listboxes"
 Basic.MainMenu.View.SceneTransitions="S&cene Transitions"
 Basic.MainMenu.View.StatusBar="&Status Bar"
+Basic.MainMenu.View.Fullscreen.Interface="Fullscreen Interface"
 
 # basic mode profile/scene collection menus
 Basic.MainMenu.SceneCollection="&Scene Collection"

+ 10 - 0
UI/forms/OBSBasic.ui

@@ -978,6 +978,16 @@
      </property>
      <addaction name="toggleListboxToolbars"/>
     </widget>
+    <addaction name="actionFullscreenInterface"/>
+    <action name="actionFullscreenInterface">
+     <property name="shortcut">
+      <string>F11</string>
+     </property>
+     <property name="text">
+      <string>Basic.MainMenu.View.Fullscreen.Interface</string>
+     </property>
+    </action>
+    <addaction name="separator"/>
     <addaction name="viewMenuToolbars"/>
     <addaction name="toggleSceneTransitions"/>
     <addaction name="toggleStatusBar"/>

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

@@ -1431,6 +1431,9 @@ void OBSBasic::OBSInit()
 
 	OpenSavedProjectors();
 
+	if (windowState().testFlag(Qt::WindowFullScreen))
+		fullscreenInterface = true;
+
 	bool has_last_version = config_has_user_value(App()->GlobalConfig(),
 			"General", "LastVersion");
 	bool first_run = config_get_bool(App()->GlobalConfig(), "General",
@@ -5177,6 +5180,16 @@ void OBSBasic::RemoveSavedProjectors(int monitor)
 	projectorArray.at((size_t)monitor) = "";
 }
 
+void OBSBasic::on_actionFullscreenInterface_triggered()
+{
+	if (!fullscreenInterface)
+		showFullScreen();
+	else
+		showNormal();
+
+	fullscreenInterface = !fullscreenInterface;
+}
+
 void OBSBasic::UpdateTitleBar()
 {
 	stringstream name;

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

@@ -119,6 +119,7 @@ private:
 	long disableSaving = 1;
 	bool projectChanged = false;
 	bool previewEnabled = true;
+	bool fullscreenInterface = false;
 
 	const char *copyString;
 	const char *copyFiltersString;
@@ -529,6 +530,8 @@ protected:
 	virtual void changeEvent(QEvent *event) override;
 
 private slots:
+	void on_actionFullscreenInterface_triggered();
+
 	void on_actionShow_Recordings_triggered();
 	void on_actionRemux_triggered();
 	void on_action_Settings_triggered();