Cleanup curves effet ui

parent 8ae5e09c
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<paramlistdisplay>RGB,Red,Green,Blue,Alpha,Luma,Hue,Saturation</paramlistdisplay> <paramlistdisplay>RGB,Red,Green,Blue,Alpha,Luma,Hue,Saturation</paramlistdisplay>
<name>Channel</name> <name>Channel</name>
</parameter> </parameter>
<parameter type="list" name="4" default="1" paramlist="0;1"> <parameter type="list" name="4" default="1" paramlist="0;1">
<paramlistdisplay>Rec. 601,Rec. 709</paramlistdisplay> <paramlistdisplay>Rec. 601,Rec. 709</paramlistdisplay>
<name>Luma formula</name> <name>Luma formula</name>
......
...@@ -37,7 +37,6 @@ AbstractCurveWidget<Curve_t>::AbstractCurveWidget(QWidget *parent) ...@@ -37,7 +37,6 @@ AbstractCurveWidget<Curve_t>::AbstractCurveWidget(QWidget *parent)
setAutoFillBackground(false); setAutoFillBackground(false);
setAttribute(Qt::WA_OpaquePaintEvent); setAttribute(Qt::WA_OpaquePaintEvent);
setMinimumSize(150, 150); setMinimumSize(150, 150);
setMaximumSize(500, 500);
QSizePolicy sp(QSizePolicy::Preferred, QSizePolicy::Preferred); QSizePolicy sp(QSizePolicy::Preferred, QSizePolicy::Preferred);
sp.setHeightForWidth(true); // force widget to have a height dependent on width; sp.setHeightForWidth(true); // force widget to have a height dependent on width;
setSizePolicy(sp); setSizePolicy(sp);
......
...@@ -42,7 +42,6 @@ public: ...@@ -42,7 +42,6 @@ public:
{ {
if (m_isVert) { if (m_isVert) {
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
setMaximumSize(10, 500);
setFixedWidth(10); setFixedWidth(10);
} else { } else {
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
...@@ -140,27 +139,26 @@ CurveParamWidget<CurveWidget_t>::CurveParamWidget(std::shared_ptr<AssetParameter ...@@ -140,27 +139,26 @@ CurveParamWidget<CurveWidget_t>::CurveParamWidget(std::shared_ptr<AssetParameter
// construct and fill layout // construct and fill layout
QVBoxLayout *layout = new QVBoxLayout(this); QVBoxLayout *layout = new QVBoxLayout(this);
layout->setSpacing(0);
// grid layout containing the curve and the optional param values setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
QGridLayout *curve_layout = new QGridLayout(); layout->addWidget(m_edit);
curve_layout->addWidget(m_edit, 0, 1);
m_leftParam = new ValueLabel<CurveWidget_t>(true, m_mode, this); m_leftParam = new ValueLabel<CurveWidget_t>(true, m_mode, this);
m_leftParam->setFrameStyle(QFrame::StyledPanel | QFrame::Plain); m_leftParam->setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
m_leftParam->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_leftParam->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
curve_layout->addWidget(m_leftParam, 0, 0);
m_bottomParam = new ValueLabel<CurveWidget_t>(false, m_mode, this); m_bottomParam = new ValueLabel<CurveWidget_t>(false, m_mode, this);
m_bottomParam->setFrameStyle(QFrame::StyledPanel | QFrame::Plain); m_bottomParam->setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
m_bottomParam->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); m_bottomParam->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
curve_layout->addWidget(m_bottomParam, 1, 1);
// horizontal layout to make sure that everything is centered // horizontal layout to make sure that everything is centered
QHBoxLayout *horiz_layout = new QHBoxLayout; QHBoxLayout *horiz_layout = new QHBoxLayout;
horiz_layout->addLayout(curve_layout); horiz_layout->addWidget(m_leftParam);
horiz_layout->addWidget(m_bottomParam);
layout->addLayout(horiz_layout); layout->addLayout(horiz_layout);
QWidget *widget = new QWidget(this); QWidget *widget = new QWidget(this);
widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
m_ui.setupUi(widget); m_ui.setupUi(widget);
layout->addWidget(widget); layout->addWidget(widget);
......
...@@ -37,6 +37,7 @@ ListParamWidget::ListParamWidget(std::shared_ptr<AssetParameterModel> model, QMo ...@@ -37,6 +37,7 @@ ListParamWidget::ListParamWidget(std::shared_ptr<AssetParameterModel> model, QMo
setToolTip(comment); setToolTip(comment);
m_labelComment->setText(comment); m_labelComment->setText(comment);
m_widgetComment->setHidden(true); m_widgetComment->setHidden(true);
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
m_list->setIconSize(QSize(50, 30)); m_list->setIconSize(QSize(50, 30));
// setup the name // setup the name
m_labelName->setText(m_model->data(m_index, Qt::DisplayRole).toString()); m_labelName->setText(m_model->data(m_index, Qt::DisplayRole).toString());
......
...@@ -6,12 +6,21 @@ ...@@ -6,12 +6,21 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>200</width> <width>199</width>
<height>60</height> <height>60</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="margin"> <property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing"> <property name="spacing">
...@@ -40,7 +49,10 @@ ...@@ -40,7 +49,10 @@
<number>0</number> <number>0</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>15</number> <number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="m_labelComment"> <widget class="QLabel" name="m_labelComment">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment