From c0f98bf6326a88a88cff984a575fa972408b2843 Mon Sep 17 00:00:00 2001 From: mfeemster Date: Fri, 12 Dec 2014 02:37:29 -0800 Subject: [PATCH] Linux. --- Source/Fractorium/Fractorium.ui | 129 ++++++++++++++++--- Source/Fractorium/FractoriumRender.cpp | 3 + Source/Fractorium/FractoriumXforms.cpp | 10 ++ Source/Fractorium/FractoriumXformsAffine.cpp | 42 ++++++ 4 files changed, 163 insertions(+), 21 deletions(-) diff --git a/Source/Fractorium/Fractorium.ui b/Source/Fractorium/Fractorium.ui index 41063f4..ab6fb9b 100644 --- a/Source/Fractorium/Fractorium.ui +++ b/Source/Fractorium/Fractorium.ui @@ -42,6 +42,9 @@ 0 + + true + QFrame::NoFrame @@ -59,8 +62,8 @@ 0 0 - 923 - 942 + 926 + 941 @@ -167,7 +170,7 @@ true - false + true @@ -178,7 +181,7 @@ 0 0 1214 - 21 + 20 @@ -270,7 +273,7 @@ - 350 + 330 524287 @@ -319,6 +322,18 @@ + + + 0 + 24 + + + + + 16777215 + 24 + + Save the current flame as an xml file @@ -333,6 +348,18 @@ + + + 0 + 24 + + + + + 16777215 + 24 + + Save all flames as a single xml file @@ -347,6 +374,18 @@ + + + 0 + 24 + + + + + 16777215 + 24 + + <html><head/><body><p>Save the currently displayed flame back to the opened file in memory.</p><p>This overwrites the original flame but does not store the file back to disk.</p></body></html> @@ -435,8 +474,8 @@ 0 0 - 259 - 852 + 261 + 845 @@ -542,8 +581,8 @@ 0 0 - 259 - 852 + 261 + 845 @@ -2114,7 +2153,13 @@ 25 - 0 + 24 + + + + + 16777215 + 24 @@ -2140,7 +2185,13 @@ 25 - 0 + 24 + + + + + 16777215 + 24 @@ -2166,7 +2217,13 @@ 25 - 0 + 24 + + + + + 16777215 + 24 @@ -2192,7 +2249,13 @@ 25 - 0 + 24 + + + + + 16777215 + 24 @@ -2218,13 +2281,13 @@ 58 - 0 + 24 58 - 16777215 + 24 @@ -2839,8 +2902,8 @@ SpinBox 0 0 - 245 - 747 + 247 + 728 @@ -3039,7 +3102,7 @@ SpinBox - + QLayout::SetDefaultConstraint @@ -3634,7 +3697,7 @@ SpinBox - + QLayout::SetDefaultConstraint @@ -4952,6 +5015,18 @@ SpinBox + + + 0 + 24 + + + + + 16777215 + 24 + + Select a random palette from the list @@ -4962,6 +5037,18 @@ SpinBox + + + 0 + 24 + + + + + 16777215 + 24 + + Random Adjustment @@ -5031,8 +5118,8 @@ SpinBox 0 0 - 259 - 853 + 98 + 470 diff --git a/Source/Fractorium/FractoriumRender.cpp b/Source/Fractorium/FractoriumRender.cpp index 90a6fdc..5990afa 100644 --- a/Source/Fractorium/FractoriumRender.cpp +++ b/Source/Fractorium/FractoriumRender.cpp @@ -434,7 +434,10 @@ bool FractoriumEmberController::Render() { if (m_FinalImage.size() == m_Renderer->FinalBufferSize())//Make absolutely sure the correct amount of data is passed. gl->repaint(); + //gl->update(); + //m_Fractorium->update(); + //m_Fractorium->ui.GLParentScrollArea->update(); //Uncomment for debugging kernel build and execution errors. //m_Fractorium->ui.InfoRenderingTextEdit->setText(QString::fromStdString(m_Fractorium->m_Wrapper.DumpInfo())); //if (rendererCL) diff --git a/Source/Fractorium/FractoriumXforms.cpp b/Source/Fractorium/FractoriumXforms.cpp index 1f04e5e..cafd799 100644 --- a/Source/Fractorium/FractoriumXforms.cpp +++ b/Source/Fractorium/FractoriumXforms.cpp @@ -30,6 +30,16 @@ void Fractorium::InitXformsUI() connect(ui.XformWeightNameTable, SIGNAL(cellChanged(int, int)), this, SLOT(OnXformNameChanged(int, int)), Qt::QueuedConnection); ui.CurrentXformCombo->setProperty("soloxform", -1); + +#ifndef WIN32 + //For some reason linux makes these 24x24, even though the designer explicitly says 16x16. + ui.AddXformButton->setIconSize(QSize(16, 16)); + ui.DuplicateXformButton->setIconSize(QSize(16, 16)); + ui.ClearXformButton->setIconSize(QSize(16, 16)); + ui.DeleteXformButton->setIconSize(QSize(16, 16)); + ui.AddFinalXformButton->setIconSize(QSize(16, 16)); + ui.CurrentXformCombo->setIconSize(QSize(16, 16)); +#endif } /// diff --git a/Source/Fractorium/FractoriumXformsAffine.cpp b/Source/Fractorium/FractoriumXformsAffine.cpp index 5607f7b..66d5e84 100644 --- a/Source/Fractorium/FractoriumXformsAffine.cpp +++ b/Source/Fractorium/FractoriumXformsAffine.cpp @@ -97,6 +97,48 @@ void Fractorium::InitXformsAffineUI() connect(ui.ShowPostAffineAllRadio, SIGNAL(toggled(bool)), this, SLOT(OnAffineDrawAllCurrentRadioButtonToggled(bool)), Qt::QueuedConnection); connect(ui.ShowPostAffineCurrentRadio, SIGNAL(toggled(bool)), this, SLOT(OnAffineDrawAllCurrentRadioButtonToggled(bool)), Qt::QueuedConnection); +#ifndef WIN32 + //For some reason linux makes these 24x24, even though the designer explicitly says 16x16. + //Also, in order to get 4 pixels of spacing between elements in the grid layout, 0 must be specified. + ui.PreFlipHorizontalButton->setIconSize(QSize(16, 16)); + ui.PreFlipVerticalButton->setIconSize(QSize(16, 16)); + ui.PreRotate90CButton->setIconSize(QSize(16, 16)); + ui.PreRotate90CcButton->setIconSize(QSize(16, 16)); + ui.PreRotateCButton->setIconSize(QSize(16, 16)); + ui.PreRotateCcButton->setIconSize(QSize(16, 16)); + ui.PreMoveUpButton->setIconSize(QSize(16, 16)); + ui.PreMoveDownButton->setIconSize(QSize(16, 16)); + ui.PreMoveLeftButton->setIconSize(QSize(16, 16)); + ui.PreMoveRightButton->setIconSize(QSize(16, 16)); + ui.PreScaleDownButton->setIconSize(QSize(16, 16)); + ui.PreScaleUpButton->setIconSize(QSize(16, 16)); + ui.PreResetButton->setIconSize(QSize(16, 16)); + ui.PreAffineGridLayout->setHorizontalSpacing(0); + ui.PreAffineGridLayout->setVerticalSpacing(0); + + ui.PostFlipHorizontalButton->setIconSize(QSize(16, 16)); + ui.PostFlipVerticalButton->setIconSize(QSize(16, 16)); + ui.PostRotate90CButton->setIconSize(QSize(16, 16)); + ui.PostRotate90CcButton->setIconSize(QSize(16, 16)); + ui.PostRotateCButton->setIconSize(QSize(16, 16)); + ui.PostRotateCcButton->setIconSize(QSize(16, 16)); + ui.PostMoveUpButton->setIconSize(QSize(16, 16)); + ui.PostMoveDownButton->setIconSize(QSize(16, 16)); + ui.PostMoveLeftButton->setIconSize(QSize(16, 16)); + ui.PostMoveRightButton->setIconSize(QSize(16, 16)); + ui.PostScaleDownButton->setIconSize(QSize(16, 16)); + ui.PostScaleUpButton->setIconSize(QSize(16, 16)); + ui.PostResetButton->setIconSize(QSize(16, 16)); + ui.PostAffineGridLayout->setHorizontalSpacing(0); + ui.PostAffineGridLayout->setVerticalSpacing(0); + + //Further, the size of the dock widget won't be properly adjusted until the xforms tab is shown. + //So show it here and it will be switched back in Fractorium's constructor. + ui.ParamsTabWidget->setCurrentIndex(2); + ui.DockWidget->update(); +#endif + + ui.PostAffineGroupBox->setChecked(true);//Flip it once to force the disabling of the group box. ui.PostAffineGroupBox->setChecked(false); }