Commit 47a0961d authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix bezier curves messy layout

parent e2db3ecf
......@@ -141,9 +141,9 @@ CurveParamWidget<CurveWidget_t>::CurveParamWidget(std::shared_ptr<AssetParameter
layout->setSpacing(0);
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
layout->addWidget(m_edit);
m_edit->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
m_edit->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
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->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
......@@ -156,7 +156,7 @@ CurveParamWidget<CurveWidget_t>::CurveParamWidget(std::shared_ptr<AssetParameter
horiz_layout->addWidget(m_leftParam);
horiz_layout->addWidget(m_bottomParam);
layout->addLayout(horiz_layout);
layout->addLayout(horiz_layout);*/
auto *widget = new QWidget(this);
widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
m_ui.setupUi(widget);
......@@ -198,8 +198,6 @@ CurveParamWidget<CurveWidget_t>::CurveParamWidget(std::shared_ptr<AssetParameter
template <> void CurveParamWidget<KisCurveWidget>::deleteIrrelevantItems()
{
m_ui.gridLayout->removeItem(m_ui.horizontalSpacer_3);
delete m_ui.horizontalSpacer_3;
delete m_ui.layoutH1;
delete m_ui.layoutH2;
delete m_ui.buttonLinkHandles;
......@@ -265,8 +263,8 @@ template <typename CurveWidget_t> void CurveParamWidget<CurveWidget_t>::setMode(
if (m_showPixmap) {
slotShowPixmap(true);
}
m_leftParam->setMode(mode);
m_bottomParam->setMode(mode);
//m_leftParam->setMode(mode);
//m_bottomParam->setMode(mode);
}
}
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>230</width>
<height>118</height>
<width>292</width>
<height>36</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
......@@ -29,38 +29,13 @@
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QWidget" name="widgetPoint" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<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">
<number>0</number>
</property>
<item row="0" column="0" colspan="3">
<layout class="QVBoxLayout" name="widgetPoint">
<item>
<widget class="QWidget" name="widget" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>6</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
......@@ -74,13 +49,12 @@
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="layoutP"/>
<layout class="QVBoxLayout" name="layoutP"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QToolButton" name="buttonDeletePoint">
......@@ -95,7 +69,7 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item>
<layout class="QGridLayout" name="handlesLayout">
<property name="spacing">
<number>0</number>
......@@ -124,7 +98,7 @@
</item>
</layout>
</item>
<item row="2" column="0" colspan="3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QToolButton" name="buttonResetSpline">
......@@ -220,20 +194,7 @@
</item>
</layout>
</item>
<item row="2" column="3">
<spacer name="spacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -241,33 +202,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1" colspan="3">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>150</width>
<height>43</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>177</width>
<height>33</height>
<height>40</height>
</size>
</property>
</spacer>
......
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