UI: Add UpdateTitleBar function to basic UI

This commit is contained in:
jp9000 2015-07-03 17:55:55 -07:00
parent 5d826a86cb
commit fabb99c35a
2 changed files with 13 additions and 5 deletions

View file

@ -150,13 +150,9 @@ OBSBasic::OBSBasic(QWidget *parent)
ResizePreview(ovi.base_width, ovi.base_height);
});
stringstream name;
name << "OBS " << App()->GetVersionString();
installEventFilter(CreateShortcutFilter());
blog(LOG_INFO, "%s", name.str().c_str());
setWindowTitle(QT_UTF8(name.str().c_str()));
UpdateTitleBar();
connect(ui->scenes->itemDelegate(),
SIGNAL(closeEditor(QWidget*,
@ -3385,3 +3381,13 @@ void OBSBasic::OpenSceneProjector()
OpenProjector(obs_scene_get_source(scene), monitor);
}
void OBSBasic::UpdateTitleBar()
{
stringstream name;
name << "OBS " << App()->GetVersionString();
blog(LOG_INFO, "%s", name.str().c_str());
setWindowTitle(QT_UTF8(name.str().c_str()));
}

View file

@ -270,6 +270,8 @@ public:
void CreateSourcePopupMenu(QListWidgetItem *item, bool preview);
void UpdateTitleBar();
protected:
virtual void closeEvent(QCloseEvent *event) override;
virtual void changeEvent(QEvent *event) override;