提交 b8d907f3 编写于 作者: C cg2121 提交者: jp9000

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
上级 50103825
...@@ -489,6 +489,7 @@ Basic.MainMenu.View.Toolbars="&Toolbars" ...@@ -489,6 +489,7 @@ Basic.MainMenu.View.Toolbars="&Toolbars"
Basic.MainMenu.View.Toolbars.Listboxes="&Listboxes" Basic.MainMenu.View.Toolbars.Listboxes="&Listboxes"
Basic.MainMenu.View.SceneTransitions="S&cene Transitions" Basic.MainMenu.View.SceneTransitions="S&cene Transitions"
Basic.MainMenu.View.StatusBar="&Status Bar" Basic.MainMenu.View.StatusBar="&Status Bar"
Basic.MainMenu.View.Fullscreen.Interface="Fullscreen Interface"
# basic mode profile/scene collection menus # basic mode profile/scene collection menus
Basic.MainMenu.SceneCollection="&Scene Collection" Basic.MainMenu.SceneCollection="&Scene Collection"
......
...@@ -978,6 +978,16 @@ ...@@ -978,6 +978,16 @@
</property> </property>
<addaction name="toggleListboxToolbars"/> <addaction name="toggleListboxToolbars"/>
</widget> </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="viewMenuToolbars"/>
<addaction name="toggleSceneTransitions"/> <addaction name="toggleSceneTransitions"/>
<addaction name="toggleStatusBar"/> <addaction name="toggleStatusBar"/>
......
...@@ -1431,6 +1431,9 @@ void OBSBasic::OBSInit() ...@@ -1431,6 +1431,9 @@ void OBSBasic::OBSInit()
OpenSavedProjectors(); OpenSavedProjectors();
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 = config_get_bool(App()->GlobalConfig(), "General", bool first_run = config_get_bool(App()->GlobalConfig(), "General",
...@@ -5177,6 +5180,16 @@ void OBSBasic::RemoveSavedProjectors(int monitor) ...@@ -5177,6 +5180,16 @@ void OBSBasic::RemoveSavedProjectors(int monitor)
projectorArray.at((size_t)monitor) = ""; projectorArray.at((size_t)monitor) = "";
} }
void OBSBasic::on_actionFullscreenInterface_triggered()
{
if (!fullscreenInterface)
showFullScreen();
else
showNormal();
fullscreenInterface = !fullscreenInterface;
}
void OBSBasic::UpdateTitleBar() void OBSBasic::UpdateTitleBar()
{ {
stringstream name; stringstream name;
......
...@@ -119,6 +119,7 @@ private: ...@@ -119,6 +119,7 @@ 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; const char *copyFiltersString;
...@@ -529,6 +530,8 @@ protected: ...@@ -529,6 +530,8 @@ protected:
virtual void changeEvent(QEvent *event) override; virtual void changeEvent(QEvent *event) override;
private slots: private slots:
void on_actionFullscreenInterface_triggered();
void on_actionShow_Recordings_triggered(); void on_actionShow_Recordings_triggered();
void on_actionRemux_triggered(); void on_actionRemux_triggered();
void on_action_Settings_triggered(); void on_action_Settings_triggered();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册