|
|
|
@ -94,6 +94,17 @@ void GMainWindow::InitializeWidgets() {
|
|
|
|
|
|
|
|
|
|
game_list = new GameList();
|
|
|
|
|
ui.horizontalLayout->addWidget(game_list);
|
|
|
|
|
|
|
|
|
|
// Create status bar
|
|
|
|
|
emu_speed_label = new QLabel();
|
|
|
|
|
game_fps_label = new QLabel();
|
|
|
|
|
emu_frametime_label = new QLabel();
|
|
|
|
|
|
|
|
|
|
for (auto& label : {emu_speed_label, game_fps_label, emu_frametime_label}) {
|
|
|
|
|
label->setVisible(false);
|
|
|
|
|
statusBar()->addPermanentWidget(label);
|
|
|
|
|
}
|
|
|
|
|
statusBar()->setVisible(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GMainWindow::InitializeDebugWidgets() {
|
|
|
|
@ -229,6 +240,9 @@ void GMainWindow::RestoreUIState() {
|
|
|
|
|
|
|
|
|
|
ui.action_Display_Dock_Widget_Headers->setChecked(UISettings::values.display_titlebar);
|
|
|
|
|
OnDisplayTitleBars(ui.action_Display_Dock_Widget_Headers->isChecked());
|
|
|
|
|
|
|
|
|
|
ui.action_Show_Status_Bar->setChecked(UISettings::values.show_status_bar);
|
|
|
|
|
statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GMainWindow::ConnectWidgetEvents() {
|
|
|
|
@ -261,6 +275,7 @@ void GMainWindow::ConnectMenuEvents() {
|
|
|
|
|
&GMainWindow::ToggleWindowMode);
|
|
|
|
|
connect(ui.action_Display_Dock_Widget_Headers, &QAction::triggered, this,
|
|
|
|
|
&GMainWindow::OnDisplayTitleBars);
|
|
|
|
|
connect(ui.action_Show_Status_Bar, &QAction::triggered, statusBar(), &QStatusBar::setVisible);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GMainWindow::OnDisplayTitleBars(bool show) {
|
|
|
|
@ -624,6 +639,7 @@ void GMainWindow::closeEvent(QCloseEvent* event) {
|
|
|
|
|
#endif
|
|
|
|
|
UISettings::values.single_window_mode = ui.action_Single_Window_Mode->isChecked();
|
|
|
|
|
UISettings::values.display_titlebar = ui.action_Display_Dock_Widget_Headers->isChecked();
|
|
|
|
|
UISettings::values.show_status_bar = ui.action_Show_Status_Bar->isChecked();
|
|
|
|
|
UISettings::values.first_start = false;
|
|
|
|
|
|
|
|
|
|
game_list->SaveInterfaceLayout();
|
|
|
|
|