提交 206ae650 编写于 作者: J jp9000

UI: Rename "MainWindow" ini section

Rather than using [MainWindow] in the global ini, explicitly state
BasicWindow instead so we know it's for the basic user interface.
上级 0e496953
......@@ -87,21 +87,20 @@ OBSBasic::OBSBasic(QWidget *parent)
ui->sources->setItemDelegate(new VisibilityItemDelegate(ui->sources));
int width = config_get_int(App()->GlobalConfig(), "MainWindow", "cx");
int width = config_get_int(App()->GlobalConfig(), "BasicWindow", "cx");
// Check if no values are saved (new installation).
if (width != 0) {
int height = config_get_int(App()->GlobalConfig(), "MainWindow",
"cy");
int posx = config_get_int(App()->GlobalConfig(), "MainWindow",
int height = config_get_int(App()->GlobalConfig(),
"BasicWindow", "cy");
int posx = config_get_int(App()->GlobalConfig(), "BasicWindow",
"posx");
int posy = config_get_int(App()->GlobalConfig(), "MainWindow",
int posy = config_get_int(App()->GlobalConfig(), "BasicWindow",
"posy");
setGeometry(posx, posy, width, height);
}
char styleSheetPath[512];
int ret = os_get_config_path(styleSheetPath, sizeof(styleSheetPath),
"obs-studio/basic/stylesheet.qss");
......@@ -709,13 +708,13 @@ OBSBasic::~OBSBasic()
QRect lastGeom = normalGeometry();
config_set_int(App()->GlobalConfig(), "MainWindow", "cx",
config_set_int(App()->GlobalConfig(), "BasicWindow", "cx",
lastGeom.width());
config_set_int(App()->GlobalConfig(), "MainWindow", "cy",
config_set_int(App()->GlobalConfig(), "BasicWindow", "cy",
lastGeom.height());
config_set_int(App()->GlobalConfig(), "MainWindow", "posx",
config_set_int(App()->GlobalConfig(), "BasicWindow", "posx",
lastGeom.x());
config_set_int(App()->GlobalConfig(), "MainWindow", "posy",
config_set_int(App()->GlobalConfig(), "BasicWindow", "posy",
lastGeom.y());
config_save(App()->GlobalConfig());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册