Add scrollbars

Add scrollbars to various UI areas to be more friendly to low resolution
monitors. This works well down to vertical resolutions of 960. Below
that, things will get scrunched.
This commit is contained in:
mfeemster 2014-07-20 17:16:23 -07:00
parent e3b207c562
commit 280473c8a0
7 changed files with 2777 additions and 2549 deletions

5
.gitignore vendored
View File

@ -17,7 +17,6 @@
*.res
*.ipch
*.bsc
Builds/MSVC/VS2010/GeneratedFiles/Release/moc_AboutDialog.cpp
*.exe
*.xml
*.ilk
@ -26,4 +25,6 @@ Builds/MSVC/VS2010/GeneratedFiles/Release/moc_AboutDialog.cpp
*.txt
*.msi
*.idb
*.flam3
*.flam3
*moc_*
*GeneratedFiles*

View File

@ -17,6 +17,7 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
int row = 0, spinHeight = 20;
unsigned int i;
double dmax = numeric_limits<double>::max();
QTableWidget* table = ui.FinalRenderGeometryTable;
QTableWidgetItem* item = NULL;
@ -34,15 +35,15 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
connect(ui.FinalRenderScaleWidthRadioButton, SIGNAL(toggled(bool)), this, SLOT(OnScaleRadioButtonChanged(bool)), Qt::QueuedConnection);
connect(ui.FinalRenderScaleHeightRadioButton, SIGNAL(toggled(bool)), this, SLOT(OnScaleRadioButtonChanged(bool)), Qt::QueuedConnection);
SetupSpinner<SpinBox, int>(table, this, row, 1, m_WidthSpin, spinHeight, 10, 100000, 50, SIGNAL(valueChanged(int)), SLOT(OnWidthChanged(int)), true, 1980);
SetupSpinner<SpinBox, int>(table, this, row, 1, m_HeightSpin, spinHeight, 10, 100000, 50, SIGNAL(valueChanged(int)), SLOT(OnHeightChanged(int)), true, 1080);
SetupSpinner<SpinBox, int>(table, this, row, 1, m_QualitySpin, spinHeight, 1, 200000, 50, SIGNAL(valueChanged(int)), SLOT(OnQualityChanged(int)), true, 1000);
SetupSpinner<SpinBox, int>(table, this, row, 1, m_TemporalSamplesSpin, spinHeight, 1, 5000, 50, SIGNAL(valueChanged(int)), SLOT(OnTemporalSamplesChanged(int)), true, 1000);
SetupSpinner<SpinBox, int>(table, this, row, 1, m_SupersampleSpin, spinHeight, 1, 4, 1, SIGNAL(valueChanged(int)), SLOT(OnSupersampleChanged(int)), true, 2);
SetupSpinner<SpinBox, int> (table, this, row, 1, m_WidthSpin, spinHeight, 10, 100000, 50, SIGNAL(valueChanged(int)), SLOT(OnWidthChanged(int)), true, 1980);
SetupSpinner<SpinBox, int> (table, this, row, 1, m_HeightSpin, spinHeight, 10, 100000, 50, SIGNAL(valueChanged(int)), SLOT(OnHeightChanged(int)), true, 1080);
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_QualitySpin, spinHeight, 1, dmax, 50, SIGNAL(valueChanged(double)), SLOT(OnQualityChanged(double)), true, 1000);
SetupSpinner<SpinBox, int> (table, this, row, 1, m_TemporalSamplesSpin, spinHeight, 1, 5000, 50, SIGNAL(valueChanged(int)), SLOT(OnTemporalSamplesChanged(int)), true, 1000);
SetupSpinner<SpinBox, int> (table, this, row, 1, m_SupersampleSpin, spinHeight, 1, 4, 1, SIGNAL(valueChanged(int)), SLOT(OnSupersampleChanged(int)), true, 2);
row++;//Memory usage.
TwoButtonWidget* tbw = new TwoButtonWidget("...", "Open", 22, 40, 24, table);
TwoButtonWidget* tbw = new TwoButtonWidget("...", "Open", 22, 40, 22, table);
table->setCellWidget(row, 1, tbw);
table->item(row++, 1)->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
connect(tbw->m_Button1, SIGNAL(clicked(bool)), this, SLOT(OnFileButtonClicked(bool)), Qt::QueuedConnection);
@ -134,7 +135,7 @@ unsigned int FractoriumFinalRenderDialog::DeviceIndex() { return ui.FinalRenderD
unsigned int FractoriumFinalRenderDialog::ThreadCount() { return ui.FinalRenderThreadCountSpin->value(); }
unsigned int FractoriumFinalRenderDialog::Width() { return m_WidthSpin->value(); }
unsigned int FractoriumFinalRenderDialog::Height() { return m_HeightSpin->value(); }
unsigned int FractoriumFinalRenderDialog::Quality() { return m_QualitySpin->value(); }
double FractoriumFinalRenderDialog::Quality() { return m_QualitySpin->value(); }
unsigned int FractoriumFinalRenderDialog::TemporalSamples() { return m_TemporalSamplesSpin->value(); }
unsigned int FractoriumFinalRenderDialog::Supersample() { return m_SupersampleSpin->value(); }
@ -338,7 +339,7 @@ void FractoriumFinalRenderDialog::OnHeightChanged(int d)
/// The quality spinner was changed, recompute required memory.
/// </summary>
/// <param name="d">Ignored</param>
void FractoriumFinalRenderDialog::OnQualityChanged(int d)
void FractoriumFinalRenderDialog::OnQualityChanged(double d)
{
SetMemory();
}

View File

@ -64,7 +64,7 @@ public:
unsigned int ThreadCount();
unsigned int Width();
unsigned int Height();
unsigned int Quality();
double Quality();
unsigned int TemporalSamples();
unsigned int Supersample();
FinalRenderGuiState State();
@ -81,7 +81,7 @@ public Q_SLOTS:
void OnScaleRadioButtonChanged(bool checked);
void OnWidthChanged(int d);
void OnHeightChanged(int d);
void OnQualityChanged(int d);
void OnQualityChanged(double d);
void OnTemporalSamplesChanged(int d);
void OnSupersampleChanged(int d);
void OnFileButtonClicked(bool checked);
@ -101,7 +101,7 @@ private:
Timing m_RenderTimer;
SpinBox* m_WidthSpin;
SpinBox* m_HeightSpin;
SpinBox* m_QualitySpin;
DoubleSpinBox* m_QualitySpin;
SpinBox* m_TemporalSamplesSpin;
SpinBox* m_SupersampleSpin;
QLineEdit* m_PrefixEdit;

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,7 @@ struct FinalRenderGuiState
unsigned int m_ThreadCount;
unsigned int m_Width;
unsigned int m_Height;
unsigned int m_Quality;
double m_Quality;
unsigned int m_TemporalSamples;
unsigned int m_Supersample;
};

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@ void Fractorium::InitParamsUI()
{
int row = 0;
int spinHeight = 20;
double dmax = numeric_limits<double>::max();
vector<string> comboVals;
QTableWidget* table = ui.ColorTable;
@ -84,10 +85,10 @@ void Fractorium::InitParamsUI()
//Iteration.
row = 0;
table = ui.IterationTable;
SetupSpinner<SpinBox, int> (table, this, row, 1, m_PassesSpin, spinHeight, 1, 3, 1, SIGNAL(valueChanged(int)), SLOT(OnPassesChanged(int)), true, 1, 1, 1);
SetupSpinner<SpinBox, int> (table, this, row, 1, m_TemporalSamplesSpin, spinHeight, 1, 5000, 50, SIGNAL(valueChanged(int)), SLOT(OnTemporalSamplesChanged(int)), true, 1000);
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_QualitySpin, spinHeight, 1, 200000, 50, SIGNAL(valueChanged(double)), SLOT(OnQualityChanged(double)), true, 10, 10, 10);
SetupSpinner<SpinBox, int> (table, this, row, 1, m_SupersampleSpin, spinHeight, 1, 4, 1, SIGNAL(valueChanged(int)), SLOT(OnSupersampleChanged(int)), true, 1, 1, 1);
SetupSpinner<SpinBox, int> (table, this, row, 1, m_PassesSpin, spinHeight, 1, 3, 1, SIGNAL(valueChanged(int)), SLOT(OnPassesChanged(int)), true, 1, 1, 1);
SetupSpinner<SpinBox, int> (table, this, row, 1, m_TemporalSamplesSpin, spinHeight, 1, 5000, 50, SIGNAL(valueChanged(int)), SLOT(OnTemporalSamplesChanged(int)), true, 1000);
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_QualitySpin, spinHeight, 1, dmax, 50, SIGNAL(valueChanged(double)), SLOT(OnQualityChanged(double)), true, 10, 10, 10);
SetupSpinner<SpinBox, int> (table, this, row, 1, m_SupersampleSpin, spinHeight, 1, 4, 1, SIGNAL(valueChanged(int)), SLOT(OnSupersampleChanged(int)), true, 1, 1, 1);
comboVals.clear();
comboVals.push_back("Step");