From cb15750e402327137273c0f57d13a5c2ff174cb5 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Wed, 17 Sep 2014 06:29:11 +1000 Subject: [PATCH] Removed fullscreen checkbox and associated code. Doesn't really make sense for opencs and a fullscreen windowed mode is just a click or keyboard shortcut away, anyway. --- apps/opencs/editor.cpp | 4 +- apps/opencs/view/settings/settingsdialog.cpp | 33 ---------- apps/opencs/view/settings/settingsdialog.hpp | 1 - files/ui/settingstab.ui | 67 +++++++------------- 4 files changed, 24 insertions(+), 81 deletions(-) diff --git a/apps/opencs/editor.cpp b/apps/opencs/editor.cpp index 1c54062d8f..79e33e56b0 100644 --- a/apps/opencs/editor.cpp +++ b/apps/opencs/editor.cpp @@ -283,9 +283,7 @@ std::auto_ptr CS::Editor::setupGraphics() #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE params.insert(std::make_pair("macAPI", "cocoa")); #endif - // FIXME: don't apply the fullscreen here, apply to the editor window - //bool fullscreen = mUserSettings.settingValue("Video/fullscreen").toStdString() == "true" ? true : false; - //Ogre::RenderWindow* hiddenWindow = Ogre::Root::getSingleton().createRenderWindow("InactiveHidden", 1, 1, fullscreen, ¶ms); + // NOTE: fullscreen mode not supported (doesn't really make sense for opencs) Ogre::RenderWindow* hiddenWindow = Ogre::Root::getSingleton().createRenderWindow("InactiveHidden", 1, 1, false, ¶ms); hiddenWindow->setActive(false); diff --git a/apps/opencs/view/settings/settingsdialog.cpp b/apps/opencs/view/settings/settingsdialog.cpp index 9162aa449a..92447664fc 100644 --- a/apps/opencs/view/settings/settingsdialog.cpp +++ b/apps/opencs/view/settings/settingsdialog.cpp @@ -164,7 +164,6 @@ CSVSettings::SettingsDialog::SettingsDialog(QTabWidget *parent) spinBox_y->setMaximum(res.height()); connect(comboBox_rendersystem, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(rendererChanged(const QString&))); - connect(checkBox_fullscreen, SIGNAL(stateChanged(int)), this, SLOT(slotFullScreenChanged(int))); connect(radioButton_standard_res, SIGNAL(toggled(bool)), this, SLOT(slotStandardToggled(bool))); } @@ -174,27 +173,6 @@ void CSVSettings::SettingsDialog::rendererChanged() comboBox_antialiasing->addItems(getAvailableOptions(QString("FSAA"))); } -void CSVSettings::SettingsDialog::slotFullScreenChanged(int state) -{ - if (state == Qt::Checked) { - label_Resolution->setEnabled(false); - radioButton_standard_res->setEnabled(false); - radioButton_custom_res->setEnabled(false); - comboBox_std_window_size->setEnabled(false); - spinBox_x->setEnabled(false); - spinBox_y->setEnabled(false); - } - else - { - label_Resolution->setEnabled(true); - radioButton_standard_res->setEnabled(true); - radioButton_custom_res->setEnabled(true); - comboBox_std_window_size->setEnabled(true); - spinBox_x->setEnabled(true); - spinBox_y->setEnabled(true); - } -} - // FIXME: what to do with updating window size void CSVSettings::SettingsDialog::slotStandardToggled(bool checked) { @@ -254,17 +232,6 @@ void CSVSettings::SettingsDialog::setViewValues() comboBox_std_window_size->setCurrentIndex(index); slotStandardToggled(radioButton_standard_res->isChecked() ? true : false); - - if(CSMSettings::UserSettings::instance().settingValue("Video/fullscreen") == "true") - { - checkBox_fullscreen->setChecked(true); - slotFullScreenChanged(Qt::Checked); - } - else - { - checkBox_fullscreen->setChecked(false); - slotFullScreenChanged(Qt::Unchecked); - } } void CSVSettings::SettingsDialog::closeEvent (QCloseEvent *event) diff --git a/apps/opencs/view/settings/settingsdialog.hpp b/apps/opencs/view/settings/settingsdialog.hpp index 8f80fbc124..d971b9c2a8 100644 --- a/apps/opencs/view/settings/settingsdialog.hpp +++ b/apps/opencs/view/settings/settingsdialog.hpp @@ -37,7 +37,6 @@ namespace CSVSettings { void show(); void rendererChanged(); - void slotFullScreenChanged(int state); void slotStandardToggled(bool checked); }; } diff --git a/files/ui/settingstab.ui b/files/ui/settingstab.ui index 8e69767f5d..2b1b561da0 100644 --- a/files/ui/settingstab.ui +++ b/files/ui/settingstab.ui @@ -26,11 +26,24 @@ 20 188 351 - 81 + 51 - + + + + + + + + 186 + 16777215 + + + + + Standard: @@ -43,21 +56,7 @@ - - - - Resolution - - - - - - - Full Screen - - - - + Custom; @@ -67,20 +66,14 @@ - - - - - 186 - 16777215 - + + + + Window Size - - - - + @@ -90,19 +83,6 @@ - - - - - 16777215 - 2 - - - - Qt::Horizontal - - - @@ -124,7 +104,7 @@ 10 170 371 - 108 + 81 @@ -211,8 +191,7 @@ - - +