diff --git a/apps/opencs/view/settings/dialog.cpp b/apps/opencs/view/settings/dialog.cpp
index 331cbc3f3..3f8143aa2 100644
--- a/apps/opencs/view/settings/dialog.cpp
+++ b/apps/opencs/view/settings/dialog.cpp
@@ -154,9 +154,30 @@ CSVSettings::Dialog::Dialog(QTabWidget *parent)
// to update the checkbox on the view menu
connect(cbStatusBar, SIGNAL(toggled(bool)), this, SIGNAL (toggleStatusBar(bool)));
+ displayGroup_Window->installEventFilter(this);
+
setupDialog();
}
+bool CSVSettings::Dialog::eventFilter(QObject *target, QEvent *event)
+{
+ if (event->type() == QEvent::MouseButtonDblClick)
+ {
+ if(stackedWidget->currentWidget() == page_1)
+ {
+ stackedWidget->setCurrentWidget(page_2);
+ return false;
+ }
+ else if(stackedWidget->currentWidget() == page_2)
+ {
+ stackedWidget->setCurrentWidget(page_1);
+ return false;
+ }
+ }
+
+ return QTabWidget::eventFilter(target, event);
+}
+
void CSVSettings::Dialog::slotRendererChanged(const QString &renderer)
{
cmbAntiAlias->clear();
@@ -254,7 +275,6 @@ void CSVSettings::Dialog::buildPages()
{
// show the values in ini file
cmbStdWinSize->setCurrentIndex(index);
- //slotStandardToggled(true);
}
else
{
@@ -263,9 +283,6 @@ void CSVSettings::Dialog::buildPages()
Qt::DisplayRole, Qt::MatchStartsWith);
if(index != -1)
cmbStdWinSize->setCurrentIndex(index);
-
- //rbCustWinSize->setChecked(true);
- //slotStandardToggled(false);
}
// status bar
@@ -331,7 +348,7 @@ void CSVSettings::Dialog::closeEvent (QCloseEvent *event)
QStringList(cmbShaderLang->currentText().toLower()));
// window size
- if(0) //rbStdWinSize->isChecked())
+ if(page_2->isEnabled())
{
QRegExp re("^(\\d+) x (\\d+)");
if(re.indexIn(cmbStdWinSize->currentText()) > -1)
@@ -339,9 +356,9 @@ void CSVSettings::Dialog::closeEvent (QCloseEvent *event)
model()->setDefinitions("Window Size/Width", QStringList(re.cap(1)));
model()->setDefinitions("Window Size/Height", QStringList(re.cap(2)));
}
- //}
- //else
- //{
+ }
+ else
+ {
model()->setDefinitions("Window Size/Width",
QStringList(QString::number(sbWidth->value())));
model()->setDefinitions("Window Size/Height",
diff --git a/apps/opencs/view/settings/dialog.hpp b/apps/opencs/view/settings/dialog.hpp
index d1c09fb1e..e2e93d8a1 100644
--- a/apps/opencs/view/settings/dialog.hpp
+++ b/apps/opencs/view/settings/dialog.hpp
@@ -33,6 +33,8 @@ namespace CSVSettings {
void setupDialog();
+ bool eventFilter(QObject *target, QEvent *event);
+
private:
void buildPages();
diff --git a/files/ui/settingstab.ui b/files/ui/settingstab.ui
index ceb0a898f..de7014b4a 100644
--- a/files/ui/settingstab.ui
+++ b/files/ui/settingstab.ui
@@ -14,121 +14,8 @@
User Settings
- 1
+ 0
-
-
- Video Settings
-
-
-
-
- 20
- 26
- 351
- 129
-
-
-
- -
-
-
- Use Render System Settings from OpenMW
-
-
- true
-
-
-
- -
-
-
- Rendering Subsystem
-
-
-
- -
-
-
- false
-
-
-
- -
-
-
- Antialiasing
-
-
-
- -
-
-
- Vertical Sync
-
-
-
- -
-
-
- Shader Language
-
-
-
- -
-
-
- -
-
-
- -
-
-
-
- 16777215
- 2
-
-
-
- color: rgb(215, 215, 215);
-
-
- Qt::Horizontal
-
-
-
-
-
-
-
-
- 10
- 8
- 371
- 156
-
-
-
- Render System
-
-
-
-
-
- 9
- 169
- 371
- 101
-
-
-
- title
-
-
- displayGroup_Render
- layoutWidget_Render
- groupBox
-
Display Settings
@@ -284,7 +171,7 @@
10
100
- 191
+ 201
51
@@ -299,14 +186,14 @@
10
20
- 171
- 21
+ 181
+ 22
0
-
+
true
@@ -315,7 +202,7 @@
0
0
- 171
+ 181
22
@@ -344,15 +231,15 @@
+
+ true
+
-
- false
-
0
0
- 171
+ 181
22
@@ -373,13 +260,142 @@
Show Status Bar
+ layoutWidget_Subviews
displayGroup_Window
displayGroup_DisplayFormat
displayGroup_Subviews
- displayGroup_WindowSize
cbStatusBar
+
+
+ Video Settings
+
+
+
+
+ 20
+ 26
+ 351
+ 129
+
+
+
+ -
+
+
+ Use Render System Settings from OpenMW
+
+
+ true
+
+
+
+ -
+
+
+ Rendering Subsystem
+
+
+
+ -
+
+
+ false
+
+
+
+ -
+
+
+ Antialiasing
+
+
+
+ -
+
+
+ Vertical Sync
+
+
+
+ -
+
+
+ Shader Language
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+ 16777215
+ 2
+
+
+
+ color: rgb(215, 215, 215);
+
+
+ Qt::Horizontal
+
+
+
+
+
+
+
+
+ 10
+ 8
+ 371
+ 156
+
+
+
+ Render System
+
+
+
+
+
+ 9
+ 169
+ 371
+ 101
+
+
+
+ title
+
+
+ displayGroup_Render
+ layoutWidget_Render
+ groupBox
+
+
+ cmbRecStatus
+ cmbRefIdType
+ sbWidth
+ sbHeight
+ cbStatusBar
+ spinBox_max_subviews
+ spinBox_min_subview_width
+ checkBox_reuse_subview
+ cbOverride
+ cmbRenderSys
+ cbVsync
+ cmbAntiAlias
+ cmbShaderLang
+ cmbStdWinSize
+