diff --git a/obs/data/locale/en-US.ini b/obs/data/locale/en-US.ini index 6baa2e89b..c284616c2 100644 --- a/obs/data/locale/en-US.ini +++ b/obs/data/locale/en-US.ini @@ -341,6 +341,13 @@ Basic.MainMenu.Edit.Order.MoveToTop="Move to &Top" Basic.MainMenu.Edit.Order.MoveToBottom="Move to &Bottom" Basic.MainMenu.Edit.AdvAudio="&Advanced Audio Properties" +# basic mode view menu +Basic.MainMenu.View="&View +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 mode profile/scene collection menus Basic.MainMenu.SceneCollection="&Scene Collection" Basic.MainMenu.Profile="&Profile" diff --git a/obs/forms/OBSBasic.ui b/obs/forms/OBSBasic.ui index f962edef0..ca0e35fd9 100644 --- a/obs/forms/OBSBasic.ui +++ b/obs/forms/OBSBasic.ui @@ -575,213 +575,224 @@ - - - - 4 - - - - - - 120 - 0 - - - - - - - - 4 - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 22 - 22 - - - - Basic.AddTransition - - - Basic.AddTransition - - - - - - - :/res/images/add.png:/res/images/add.png - - - true - - - addIconSmall - - - - - - - - 0 - 0 - - - - - 22 - 22 - - - - Basic.RemoveTransition - - - Basic.RemoveTransition - - - - - - - :/res/images/list_remove.png:/res/images/list_remove.png - - - true - - - removeIconSmall - - - - - - - - 0 - 0 - - - - - 22 - 22 - - - - Basic.TransitionProperties - - - Basic.TransitionProperties - - - - - - - :/res/images/configuration21_16.png:/res/images/configuration21_16.png - - - true - - - configIconSmall - - - - - - - - - 4 - - - - - - 0 - 0 - - - - Basic.TransitionDuration - - - transitionDuration - - - - - - - ms - - - 2 - - - 10000 - - - 50 - - - 300 - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - + Basic.SceneTransitions + + + + + 4 + + + 1 + + + 1 + + + 1 + + + 2 + + + + + + 120 + 0 + + + + + + + + 4 + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 22 + 22 + + + + Basic.AddTransition + + + Basic.AddTransition + + + + + + + :/res/images/add.png:/res/images/add.png + + + true + + + addIconSmall + + + + + + + + 0 + 0 + + + + + 22 + 22 + + + + Basic.RemoveTransition + + + Basic.RemoveTransition + + + + + + + :/res/images/list_remove.png:/res/images/list_remove.png + + + true + + + removeIconSmall + + + + + + + + 0 + 0 + + + + + 22 + 22 + + + + Basic.TransitionProperties + + + Basic.TransitionProperties + + + + + + + :/res/images/configuration21_16.png:/res/images/configuration21_16.png + + + true + + + configIconSmall + + + + + + + + + 4 + + + + + + 0 + 0 + + + + Basic.TransitionDuration + + + + + + + ms + + + 2 + + + 10000 + + + 50 + + + 300 + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + @@ -887,8 +898,23 @@ + + + Basic.MainMenu.View + + + + Basic.MainMenu.View.Toolbars + + + + + + + + @@ -1251,6 +1277,39 @@ Basic.MainMenu.AlwaysOnTop + + + true + + + true + + + Basic.MainMenu.View.Toolbars.Listboxes + + + + + true + + + true + + + Basic.MainMenu.View.SceneTransitions + + + + + true + + + true + + + Basic.MainMenu.View.StatusBar + + diff --git a/obs/obs-app.cpp b/obs/obs-app.cpp index cd89f8fa5..5a9831248 100644 --- a/obs/obs-app.cpp +++ b/obs/obs-app.cpp @@ -358,6 +358,12 @@ bool OBSApp::InitGlobalConfigDefaults() "RecordWhenStreaming", false); config_set_default_bool(globalConfig, "BasicWindow", "KeepRecordingWhenStreamStops", false); + config_set_default_bool(globalConfig, "BasicWindow", + "ShowTransitions", true); + config_set_default_bool(globalConfig, "BasicWindow", + "ShowListboxToolbars", true); + config_set_default_bool(globalConfig, "BasicWindow", + "ShowStatusBar", true); #ifdef __APPLE__ config_set_default_bool(globalConfig, "Video", "DisableOSXVSync", true); diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index b5427f973..dcd34dda0 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -1022,6 +1022,21 @@ void OBSBasic::OBSInit() SetPreviewProgramMode(config_get_bool(App()->GlobalConfig(), "BasicWindow", "PreviewProgramMode")); +#define SET_VISIBILITY(name, control) \ + do { \ + if (config_has_user_value(App()->GlobalConfig(), \ + "BasicWindow", name)) { \ + bool visible = config_get_bool(App()->GlobalConfig(), \ + "BasicWindow", name); \ + ui->control->setChecked(visible); \ + } \ + } while (false) + + SET_VISIBILITY("ShowTransitions", toggleSceneTransitions); + SET_VISIBILITY("ShowListboxToolbars", toggleListboxToolbars); + SET_VISIBILITY("ShowStatusBar", toggleStatusBar); +#undef SET_VISIBILITY + { ProfileScope("OBSBasic::Load"); disableSaving--; @@ -4179,3 +4194,29 @@ int OBSBasic::GetProfilePath(char *path, size_t size, const char *file) const return snprintf(path, size, "%s/%s/%s", profiles_path, profile, file); } + +void OBSBasic::on_toggleSceneTransitions_toggled(bool visible) +{ + ui->sceneTransitionsLabel->setVisible(visible); + ui->transitionsContainer->setVisible(visible); + + config_set_bool(App()->GlobalConfig(), "BasicWindow", + "ShowTransitions", visible); +} + +void OBSBasic::on_toggleListboxToolbars_toggled(bool visible) +{ + ui->sourcesToolbar->setVisible(visible); + ui->scenesToolbar->setVisible(visible); + + config_set_bool(App()->GlobalConfig(), "BasicWindow", + "ShowListboxToolbars", visible); +} + +void OBSBasic::on_toggleStatusBar_toggled(bool visible) +{ + ui->statusbar->setVisible(visible); + + config_set_bool(App()->GlobalConfig(), "BasicWindow", + "ShowStatusBar", visible); +} diff --git a/obs/window-basic-main.hpp b/obs/window-basic-main.hpp index 5f9034873..c82b4c1c6 100644 --- a/obs/window-basic-main.hpp +++ b/obs/window-basic-main.hpp @@ -483,6 +483,10 @@ private slots: void on_actionAlwaysOnTop_triggered(); + void on_toggleSceneTransitions_toggled(bool visible); + void on_toggleListboxToolbars_toggled(bool visible); + void on_toggleStatusBar_toggled(bool visible); + void on_transitions_currentIndexChanged(int index); void on_transitionAdd_clicked(); void on_transitionRemove_clicked();