mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 21:20:07 -05:00
--Bug fixes
-Allow group dragging and floating of dock widgets. --Note this has a bug where if tabls are grouped while floating, the tab position is placed on the bottom. It restores to the top when dropping on a dock location. I've filed a bug at qt.io -Make some tables auto size to their contents because some text appeared obscured on Linux. -The size of the xforms and palette tabs were preventing the main window from being resized to a small size on lower resolution monitors when docked. So rework scroll areas, minimum sizes and layouts to allow for a smaller main window.
This commit is contained in:
parent
5646b5162a
commit
244d2f5dc2
1
.gitignore
vendored
1
.gitignore
vendored
@ -253,3 +253,4 @@ Builds/include/GL
|
|||||||
/Builds/MSVC/VS2017/UpgradeLog.htm
|
/Builds/MSVC/VS2017/UpgradeLog.htm
|
||||||
/Builds/MSVC/VS2017/zlib.props
|
/Builds/MSVC/VS2017/zlib.props
|
||||||
*last.flame
|
*last.flame
|
||||||
|
/Source/Fractorium/Fractorium - Copy.ui
|
||||||
|
@ -73,6 +73,8 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(QWidget* p, Qt::WindowF
|
|||||||
ui.FinalRenderStartButton->disconnect(SIGNAL(clicked(bool)));
|
ui.FinalRenderStartButton->disconnect(SIGNAL(clicked(bool)));
|
||||||
connect(ui.FinalRenderStartButton, SIGNAL(clicked(bool)), this, SLOT(OnRenderClicked(bool)), Qt::QueuedConnection);
|
connect(ui.FinalRenderStartButton, SIGNAL(clicked(bool)), this, SLOT(OnRenderClicked(bool)), Qt::QueuedConnection);
|
||||||
connect(ui.FinalRenderStopButton, SIGNAL(clicked(bool)), this, SLOT(OnCancelRenderClicked(bool)), Qt::QueuedConnection);
|
connect(ui.FinalRenderStopButton, SIGNAL(clicked(bool)), this, SLOT(OnCancelRenderClicked(bool)), Qt::QueuedConnection);
|
||||||
|
table->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
|
ui.FinalRenderSizeTable->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
table = ui.FinalRenderDeviceTable;
|
table = ui.FinalRenderDeviceTable;
|
||||||
table->clearContents();
|
table->clearContents();
|
||||||
table->setRowCount(0);
|
table->setRowCount(0);
|
||||||
|
@ -28,14 +28,13 @@ Fractorium::Fractorium(QWidget* p)
|
|||||||
qRegisterMetaType<vector<byte>>("vector<byte>");
|
qRegisterMetaType<vector<byte>>("vector<byte>");
|
||||||
qRegisterMetaType<vv4F>("vv4F");
|
qRegisterMetaType<vv4F>("vv4F");
|
||||||
qRegisterMetaType<EmberTreeWidgetItemBase*>("EmberTreeWidgetItemBase*");
|
qRegisterMetaType<EmberTreeWidgetItemBase*>("EmberTreeWidgetItemBase*");
|
||||||
setDockOptions(DockOption::AllowNestedDocks | DockOption::AllowTabbedDocks);
|
|
||||||
setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::TabPosition::North);
|
|
||||||
setTabShape(QTabWidget::TabShape::Triangular);
|
|
||||||
tabifyDockWidget(ui.LibraryDockWidget, ui.FlameDockWidget);
|
tabifyDockWidget(ui.LibraryDockWidget, ui.FlameDockWidget);
|
||||||
tabifyDockWidget(ui.FlameDockWidget, ui.XformsDockWidget);
|
tabifyDockWidget(ui.FlameDockWidget, ui.XformsDockWidget);
|
||||||
tabifyDockWidget(ui.XformsDockWidget, ui.XaosDockWidget);
|
tabifyDockWidget(ui.XformsDockWidget, ui.XaosDockWidget);
|
||||||
tabifyDockWidget(ui.XaosDockWidget, ui.PaletteDockWidget);
|
tabifyDockWidget(ui.XaosDockWidget, ui.PaletteDockWidget);
|
||||||
tabifyDockWidget(ui.PaletteDockWidget, ui.InfoDockWidget);
|
tabifyDockWidget(ui.PaletteDockWidget, ui.InfoDockWidget);
|
||||||
|
setTabPosition(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea, QTabWidget::TabPosition::North);
|
||||||
|
setTabShape(QTabWidget::TabShape::Triangular);
|
||||||
m_Docks.reserve(8);
|
m_Docks.reserve(8);
|
||||||
m_Docks.push_back(ui.LibraryDockWidget);
|
m_Docks.push_back(ui.LibraryDockWidget);
|
||||||
m_Docks.push_back(ui.FlameDockWidget);
|
m_Docks.push_back(ui.FlameDockWidget);
|
||||||
@ -43,6 +42,13 @@ Fractorium::Fractorium(QWidget* p)
|
|||||||
m_Docks.push_back(ui.XaosDockWidget);
|
m_Docks.push_back(ui.XaosDockWidget);
|
||||||
m_Docks.push_back(ui.PaletteDockWidget);
|
m_Docks.push_back(ui.PaletteDockWidget);
|
||||||
m_Docks.push_back(ui.InfoDockWidget);
|
m_Docks.push_back(ui.InfoDockWidget);
|
||||||
|
|
||||||
|
for (auto dock : m_Docks)//Prevents a dock from ever getting accidentally hidden.
|
||||||
|
{
|
||||||
|
dock->setWindowFlags(dock->windowFlags() & Qt::WindowStaysOnTopHint);
|
||||||
|
dock->setAllowedAreas(Qt::DockWidgetArea::LeftDockWidgetArea | Qt::DockWidgetArea::RightDockWidgetArea);
|
||||||
|
}
|
||||||
|
|
||||||
m_FontSize = 9;
|
m_FontSize = 9;
|
||||||
m_VarSortMode = 1;//Sort by weight by default.
|
m_VarSortMode = 1;//Sort by weight by default.
|
||||||
m_PaletteSortMode = 0;//Sort by palette ascending by default.
|
m_PaletteSortMode = 0;//Sort by palette ascending by default.
|
||||||
@ -286,6 +292,7 @@ bool Fractorium::HaveFinal()
|
|||||||
/// <param name="topLevel">True if top level, else false.</param>
|
/// <param name="topLevel">True if top level, else false.</param>
|
||||||
void Fractorium::OnDockTopLevelChanged(bool topLevel)
|
void Fractorium::OnDockTopLevelChanged(bool topLevel)
|
||||||
{
|
{
|
||||||
|
//setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::TabPosition::North);
|
||||||
//if (topLevel)
|
//if (topLevel)
|
||||||
//{
|
//{
|
||||||
// if (ui.DockWidget->y() <= 0)
|
// if (ui.DockWidget->y() <= 0)
|
||||||
@ -306,6 +313,7 @@ void Fractorium::OnDockTopLevelChanged(bool topLevel)
|
|||||||
/// <param name="area">The dock widget area</param>
|
/// <param name="area">The dock widget area</param>
|
||||||
void Fractorium::dockLocationChanged(Qt::DockWidgetArea area)
|
void Fractorium::dockLocationChanged(Qt::DockWidgetArea area)
|
||||||
{
|
{
|
||||||
|
//setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::TabPosition::North);
|
||||||
//ui.DockWidget->resize(500, ui.DockWidget->height());
|
//ui.DockWidget->resize(500, ui.DockWidget->height());
|
||||||
//ui.DockWidget->update();
|
//ui.DockWidget->update();
|
||||||
//ui.dockWidget->setFloating(true);
|
//ui.dockWidget->setFloating(true);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -40,6 +40,7 @@ void Fractorium::InitParamsUI()
|
|||||||
comboVals.push_back("Linear");
|
comboVals.push_back("Linear");
|
||||||
SetupCombo(table, this, row, 1, m_PaletteModeCombo, comboVals, SIGNAL(currentIndexChanged(int)), SLOT(OnPaletteModeComboCurrentIndexChanged(int)));
|
SetupCombo(table, this, row, 1, m_PaletteModeCombo, comboVals, SIGNAL(currentIndexChanged(int)), SLOT(OnPaletteModeComboCurrentIndexChanged(int)));
|
||||||
m_PaletteModeCombo->SetCurrentIndexStealth(int(ePaletteMode::PALETTE_LINEAR));
|
m_PaletteModeCombo->SetCurrentIndexStealth(int(ePaletteMode::PALETTE_LINEAR));
|
||||||
|
table->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
//Geometry.
|
//Geometry.
|
||||||
row = 0;
|
row = 0;
|
||||||
table = ui.GeometryTable;
|
table = ui.GeometryTable;
|
||||||
@ -61,6 +62,7 @@ void Fractorium::InitParamsUI()
|
|||||||
m_ZPosSpin->setDecimals(3);
|
m_ZPosSpin->setDecimals(3);
|
||||||
m_PerspectiveSpin->setDecimals(4);
|
m_PerspectiveSpin->setDecimals(4);
|
||||||
m_DepthBlurSpin->setDecimals(3);
|
m_DepthBlurSpin->setDecimals(3);
|
||||||
|
table->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
//Filter.
|
//Filter.
|
||||||
row = 0;
|
row = 0;
|
||||||
table = ui.FilterTable;
|
table = ui.FilterTable;
|
||||||
@ -71,6 +73,7 @@ void Fractorium::InitParamsUI()
|
|||||||
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_DEFilterMinRadiusSpin, spinHeight, 0, 25, 1, SIGNAL(valueChanged(double)), SLOT(OnDEFilterMinRadiusWidthChanged(double)), true, 0, 0, 0);
|
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_DEFilterMinRadiusSpin, spinHeight, 0, 25, 1, SIGNAL(valueChanged(double)), SLOT(OnDEFilterMinRadiusWidthChanged(double)), true, 0, 0, 0);
|
||||||
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_DEFilterMaxRadiusSpin, spinHeight, 0, 25, 1, SIGNAL(valueChanged(double)), SLOT(OnDEFilterMaxRadiusWidthChanged(double)), true, 0.0, 9.0, 0);
|
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_DEFilterMaxRadiusSpin, spinHeight, 0, 25, 1, SIGNAL(valueChanged(double)), SLOT(OnDEFilterMaxRadiusWidthChanged(double)), true, 0.0, 9.0, 0);
|
||||||
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_DECurveSpin, spinHeight, 0.15, 5, 0.1, SIGNAL(valueChanged(double)), SLOT(OnDEFilterCurveWidthChanged(double)), true, 0.4, 0.4, 0.4);
|
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_DECurveSpin, spinHeight, 0.15, 5, 0.1, SIGNAL(valueChanged(double)), SLOT(OnDEFilterCurveWidthChanged(double)), true, 0.4, 0.4, 0.4);
|
||||||
|
table->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
//Iteration.
|
//Iteration.
|
||||||
row = 0;
|
row = 0;
|
||||||
table = ui.IterationTable;
|
table = ui.IterationTable;
|
||||||
@ -79,6 +82,7 @@ void Fractorium::InitParamsUI()
|
|||||||
SetupSpinner<SpinBox, int>( table, this, row, 1, m_FuseSpin, spinHeight, 1, 1000, 5, SIGNAL(valueChanged(int)), SLOT(OnFuseChanged(int)), true, 15, 15, 15);
|
SetupSpinner<SpinBox, int>( table, this, row, 1, m_FuseSpin, spinHeight, 1, 1000, 5, SIGNAL(valueChanged(int)), SLOT(OnFuseChanged(int)), true, 15, 15, 15);
|
||||||
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_QualitySpin, spinHeight, 1, dmax, 50, SIGNAL(valueChanged(double)), SLOT(OnQualityChanged(double)), true, quality, 10, 10);
|
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_QualitySpin, spinHeight, 1, dmax, 50, SIGNAL(valueChanged(double)), SLOT(OnQualityChanged(double)), true, quality, 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_SupersampleSpin, spinHeight, 1, 4, 1, SIGNAL(valueChanged(int)), SLOT(OnSupersampleChanged(int)), true, 1, 1, 1);
|
||||||
|
table->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
//Animation.
|
//Animation.
|
||||||
row = 0;
|
row = 0;
|
||||||
table = ui.AnimationTable;
|
table = ui.AnimationTable;
|
||||||
@ -96,6 +100,7 @@ void Fractorium::InitParamsUI()
|
|||||||
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_TemporalFilterWidthSpin, spinHeight, 1, 10, 1, SIGNAL(valueChanged(double)), SLOT(OnTemporalFilterWidthChanged(double)), true, 1);
|
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_TemporalFilterWidthSpin, spinHeight, 1, 10, 1, SIGNAL(valueChanged(double)), SLOT(OnTemporalFilterWidthChanged(double)), true, 1);
|
||||||
comboVals = TemporalFilterCreator<float>::FilterTypes();
|
comboVals = TemporalFilterCreator<float>::FilterTypes();
|
||||||
SetupCombo( table, this, row, 1, m_TemporalFilterTypeCombo, comboVals, SIGNAL(currentIndexChanged(const QString&)), SLOT(OnTemporalFilterTypeComboCurrentIndexChanged(const QString&)));
|
SetupCombo( table, this, row, 1, m_TemporalFilterTypeCombo, comboVals, SIGNAL(currentIndexChanged(const QString&)), SLOT(OnTemporalFilterTypeComboCurrentIndexChanged(const QString&)));
|
||||||
|
table->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -28,6 +28,8 @@ FractoriumOptionsDialog::FractoriumOptionsDialog(QWidget* p, Qt::WindowFlags f)
|
|||||||
ui.OptionsIdentityTable->setCellWidget(1, 1, m_UrlEdit);
|
ui.OptionsIdentityTable->setCellWidget(1, 1, m_UrlEdit);
|
||||||
m_NickEdit = new QLineEdit(ui.OptionsIdentityTable);
|
m_NickEdit = new QLineEdit(ui.OptionsIdentityTable);
|
||||||
ui.OptionsIdentityTable->setCellWidget(2, 1, m_NickEdit);
|
ui.OptionsIdentityTable->setCellWidget(2, 1, m_NickEdit);
|
||||||
|
table->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
|
ui.OptionsIdentityTable->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
table = ui.DeviceTable;
|
table = ui.DeviceTable;
|
||||||
table->clearContents();
|
table->clearContents();
|
||||||
table->setRowCount(0);
|
table->setRowCount(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user