Implementation of screen rotation without use of additional layouts.

This is based on what was done using additional layouts, but modified
to have a variable to control rotation and making it so Single Screen
Layout behaves like Upright Single would, and Default Layout behaves
like Upright Double would, when the new variable is used.

Large Layout and Side Layout currently ignore the new variable.
New variable still currently doesn't have a hotkey.
This commit is contained in:
vitor-k 2019-10-25 20:21:10 -03:00 committed by Vitor Kiguchi
parent e74a402c69
commit 89cab445d4
14 changed files with 317 additions and 87 deletions

View file

@ -618,6 +618,8 @@ void GMainWindow::ConnectMenuEvents() {
&GMainWindow::ChangeScreenLayout);
connect(ui.action_Screen_Layout_Swap_Screens, &QAction::triggered, this,
&GMainWindow::OnSwapScreens);
connect(ui.action_Screen_Layout_Upright_Screens, &QAction::triggered, this,
&GMainWindow::OnRotateScreens);
// Movie
connect(ui.action_Record_Movie, &QAction::triggered, this, &GMainWindow::OnRecordMovie);
@ -1435,6 +1437,11 @@ void GMainWindow::OnSwapScreens() {
Settings::Apply();
}
void GMainWindow::OnRotateScreens() {
Settings::values.upright_screen = ui.action_Screen_Layout_Upright_Screens->isChecked();
Settings::Apply();
}
void GMainWindow::OnCheats() {
CheatDialog cheat_dialog(this);
cheat_dialog.exec();
@ -2032,6 +2039,7 @@ void GMainWindow::SyncMenuUISettings() {
ui.action_Screen_Layout_Side_by_Side->setChecked(Settings::values.layout_option ==
Settings::LayoutOption::SideScreen);
ui.action_Screen_Layout_Swap_Screens->setChecked(Settings::values.swap_screen);
ui.action_Screen_Layout_Upright_Screens->setChecked(Settings::values.upright_screen);
}
void GMainWindow::RetranslateStatusBar() {