Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Cleanup curves effet ui

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