mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-06 16:24:52 -04:00
--User changes
-Give tabs a height of 4px in the qss files. Looks a little large on 4k screens, but just right on HD screens which are much more common. -Allow for styling of zero and non-zero variation tree nodes via qss. -Allow for toggling whether to interpolate between colors in the palette editor, or to do hard cuts between colors. -Allow for adjusting spinner values with the + = or up arrow keys to increase, and - _ or down arrow keys to decrease. -Allow for responding to global presses of + = and - _ to cycle up or down to specify which xform is set as the current one. -Allow for adding "layers" via xaos which will add a user-specified number of xforms, and set certain xaos values to 0 or 1. -Add a new menu item under the Edit menu to copy the OpenCL iteration kernel source to the clipboard. -Show text on the status bar which indicates that an OpenCL kernel compilation is taking place. -Show xform name on xform combo box when expanded. Adjust size to fit all names. -Draw post affine circles using dashed lines. -Prevent QSS dialog from styling its editor, which makes it easier to see text when creating styles which have custom colors for text boxes. --Bug fixes -Fix up some table layouts which seemed to have regressed/decayed over time for reasons unknown. -Using undo/redo would create a new flame in the library every time. -Solo was not being preserved when using undo/redo. --Code changes -Make the solo flag be a part of the flame data now. -Fix some tabification in the OpenCL code for EllipticVariation. -Fix tabification in the varState code for OpenCL. -Add an event called m_CompileBegun to RendererCL that is called right before an OpenCL compile is begun. --This required making RendererCLBase not a pure virtual base class. Member functions just return defaults. -Filter key presses on main window to only process the third one. This is due to Qt triggering three events for every key press. -The palette preview table was installing an event filter for seemingly no reason. Remove it. -Mark certain virtual functions as override in SpinBox and DoubleSpinBox.
This commit is contained in:
@ -16,6 +16,11 @@ void Fractorium::InitXformsVariationsUI()
|
||||
//Setting dimensions in the designer with a layout is futile, so must hard code here.
|
||||
tree->setColumnWidth(0, 160);
|
||||
tree->setColumnWidth(1, 23);
|
||||
//Set Default variation tree text and background colors for zero and non zero cases.
|
||||
m_VariationTreeColorNonZero = Qt::black;
|
||||
m_VariationTreeColorZero = Qt::black;
|
||||
m_VariationTreeBgColorNonZero = Qt::lightGray;
|
||||
m_VariationTreeBgColorZero = Qt::white;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -226,8 +231,9 @@ void FractoriumEmberController<T>::VariationSpinBoxValueChanged(double d)//Would
|
||||
if (xformVar)
|
||||
xform->DeleteVariationById(var->VariationId());
|
||||
|
||||
// widgetItem->setBackgroundColor(0, QColor(255, 255, 255));//Ensure background is always white if weight goes to zero.
|
||||
widgetItem->setBackgroundColor(0, m_Fractorium->m_VariationTreeBgColorZero); }
|
||||
widgetItem->setTextColor(0, m_Fractorium->m_VariationTreeColorZero);
|
||||
widgetItem->setBackgroundColor(0, m_Fractorium->m_VariationTreeBgColorZero);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (xformVar)//The xform already contained this variation, which means they just went from a non-zero weight to another non-zero weight (the simple case).
|
||||
@ -241,8 +247,9 @@ void FractoriumEmberController<T>::VariationSpinBoxValueChanged(double d)//Would
|
||||
auto newVar = var->Copy();//Create a new one with default values.
|
||||
newVar->m_Weight = d;
|
||||
xform->AddVariation(newVar);
|
||||
// widgetItem->setBackgroundColor(0, QColor(200, 200, 200));//Set background to gray when a variation has non-zero weight in this xform.
|
||||
widgetItem->setBackgroundColor(0, m_Fractorium->m_VariationTreeBgColorNoneZero);
|
||||
widgetItem->setTextColor(0, m_Fractorium->m_VariationTreeColorNonZero);
|
||||
widgetItem->setBackgroundColor(0, m_Fractorium->m_VariationTreeBgColorNonZero);
|
||||
|
||||
//If they've added a new parametric variation, then grab the values currently in the spinners
|
||||
//for the child parameters and assign them to the newly added variation.
|
||||
if (parVar)
|
||||
@ -275,6 +282,15 @@ void FractoriumEmberController<T>::VariationSpinBoxValueChanged(double d)//Would
|
||||
|
||||
void Fractorium::OnVariationSpinBoxValueChanged(double d) { m_Controller->VariationSpinBoxValueChanged(d); }
|
||||
|
||||
/// <summary>
|
||||
/// Fill in the variations tree with the values from the current xform.
|
||||
/// </summary>
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::FillVariationTreeWithCurrentXform()
|
||||
{
|
||||
FillVariationTreeWithXform(CurrentXform());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fill the variation tree values from passed in xform and apply the current sorting mode.
|
||||
/// Called when the currently selected xform changes.
|
||||
@ -300,9 +316,9 @@ void FractoriumEmberController<T>::FillVariationTreeWithXform(Xform<T>* xform)
|
||||
item->setHidden(false);
|
||||
|
||||
spinBox->SetValueStealth(var ? var->m_Weight : 0);//If the variation was present, set the spin box to its weight, else zero.
|
||||
// item->setBackgroundColor(0, var ? Qt::darkGray : Qt::lightGray);//Ensure background is always white if the value goes to zero, else gray if var present.
|
||||
// item->setBackgroundColor(0, var ? QColor(200, 200, 200) : QColor(255, 255, 255));//Ensure background is always white if the value goes to zero, else gray if var present.
|
||||
item->setBackgroundColor(0, var ? m_Fractorium->m_VariationTreeBgColorNoneZero : m_Fractorium->m_VariationTreeBgColorZero);
|
||||
item->setTextColor(0, var ? m_Fractorium->m_VariationTreeColorNonZero : m_Fractorium->m_VariationTreeColorZero);
|
||||
item->setBackgroundColor(0, var ? m_Fractorium->m_VariationTreeBgColorNonZero : m_Fractorium->m_VariationTreeBgColorZero);
|
||||
|
||||
for (int j = 0; j < item->childCount(); j++)//Iterate through all of the children, which will be the params if it was a parametric variation.
|
||||
{
|
||||
T* param = nullptr;
|
||||
|
Reference in New Issue
Block a user