Commit 4c86c614 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Clean up the layout of the filter settings pages

Patch by Ghevan
CCMAIL:ghevan@gmail.com
parent e5813668
......@@ -6,20 +6,61 @@
<rect>
<x>0</x>
<y>0</y>
<width>407</width>
<height>150</height>
<width>385</width>
<height>90</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="margin">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="2">
<widget class="KisDoubleSliderSpinBox" name="horizontalRadius" native="true">
<zorder>verticalRadius</zorder>
<zorder>verticalRadius</zorder>
<zorder>aspectButton</zorder>
<zorder>aspectButton</zorder>
</widget>
<item row="0" column="1">
<widget class="KisDoubleSliderSpinBox" name="horizontalRadius" native="true"/>
</item>
<item row="0" column="2" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,0,1">
<property name="spacing">
<number>0</number>
</property>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="KoAspectButton" name="aspectButton" native="true">
<property name="minimumSize">
<size>
<width>2</width>
<height>10</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
......@@ -41,12 +82,7 @@
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="KisDoubleSliderSpinBox" name="verticalRadius" native="true">
<zorder>aspectButton</zorder>
</widget>
</item>
<item row="3" column="2">
<item row="2" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
......@@ -59,10 +95,25 @@
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="KisDoubleSliderSpinBox" name="verticalRadius" native="true">
<zorder>aspectButton</zorder>
</widget>
</item>
</layout>
</item>
<item>
<widget class="KoAspectButton" name="aspectButton" native="true"/>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
......
......@@ -6,11 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>330</width>
<width>232</width>
<height>263</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
......@@ -33,40 +36,6 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="irisShapeCombo">
<item>
<property name="text">
<string>Triangle</string>
</property>
</item>
<item>
<property name="text">
<string>Quadrilateral (4)</string>
</property>
</item>
<item>
<property name="text">
<string>Pentagon (5)</string>
</property>
</item>
<item>
<property name="text">
<string>Hexagon (6)</string>
</property>
</item>
<item>
<property name="text">
<string>Heptagon (7)</string>
</property>
</item>
<item>
<property name="text">
<string>Octagon (8)</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="KIntNumInput" name="irisRadiusSlider">
<property name="label">
......@@ -102,6 +71,40 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="irisShapeCombo">
<item>
<property name="text">
<string>Triangle</string>
</property>
</item>
<item>
<property name="text">
<string>Quadrilateral (4)</string>
</property>
</item>
<item>
<property name="text">
<string>Pentagon (5)</string>
</property>
</item>
<item>
<property name="text">
<string>Hexagon (6)</string>
</property>
</item>
<item>
<property name="text">
<string>Heptagon (7)</string>
</property>
</item>
<item>
<property name="text">
<string>Octagon (8)</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
......@@ -113,7 +116,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>18</height>
</size>
</property>
</spacer>
......@@ -127,6 +130,11 @@
<header>knuminput.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>irisShapeCombo</tabstop>
<tabstop>irisRadiusSlider</tabstop>
<tabstop>irisRotationSlider</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
......@@ -6,101 +6,137 @@
<rect>
<x>0</x>
<y>0</y>
<width>365</width>
<height>172</height>
<width>245</width>
<height>256</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0" colspan="2">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDial" name="blurAngleDial">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="maximum">
<number>360</number>
</property>
<property name="value">
<number>274</number>
</property>
<property name="sliderPosition">
<number>274</number>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="wrapping">
<bool>true</bool>
</property>
<property name="notchesVisible">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="KIntNumInput" name="blurLength">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item>
<widget class="KIntNumInput" name="blurAngleSlider">
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="label">
<string>Length</string>
<string>Angle</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>256</number>
<number>360</number>
</property>
<property name="suffix">
<string>°</string>
</property>
<property name="sliderEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="KIntNumInput" name="blurAngleSlider">
<item>
<widget class="KIntNumInput" name="blurLength">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="label">
<string>Angle</string>
<string>Length</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>360</number>
</property>
<property name="suffix">
<string>°</string>
<number>256</number>
</property>
<property name="sliderEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDial" name="blurAngleDial">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="maximumSize">
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>50</width>
<height>50</height>
<width>20</width>
<height>18</height>
</size>
</property>
<property name="maximum">
<number>360</number>
</property>
<property name="value">
<number>274</number>
</property>
<property name="sliderPosition">
<number>274</number>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="wrapping">
<bool>true</bool>
</property>
<property name="notchesVisible">
<bool>false</bool>
</property>
</widget>
</spacer>
</item>
</layout>
</widget>
......@@ -111,6 +147,11 @@
<header>knuminput.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>blurAngleDial</tabstop>
<tabstop>blurAngleSlider</tabstop>
<tabstop>blurLength</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
......@@ -6,11 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>261</width>
<height>172</height>
<width>280</width>
<height>178</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel1">
<property name="text">
......
......@@ -43,6 +43,7 @@ KisWdgColorToAlpha::KisWdgColorToAlpha(QWidget * parent)
{
m_widget = new Ui_WdgColorToAlphaBase();
m_widget->setupUi(this);
m_widget->textLabel1->hide();
connect(m_widget->colorSelector, SIGNAL(colorChanged(const QColor&)), SLOT(slotColorSelectorChanged(const QColor&)));
connect(m_widget->intThreshold, SIGNAL(valueChanged(int)), SIGNAL(sigConfigurationItemChanged()));
connect(m_widget->btnCustomColor, SIGNAL(changed(const QColor&)), SLOT(slotCustomColorSelected(const QColor&)));
......
......@@ -6,29 +6,38 @@
<rect>
<x>0</x>
<y>0</y>
<width>323</width>
<height>254</height>
<width>302</width>
<height>339</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel1">
<property name="text">
<string>Color:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<property name="margin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="textLabel1">
<property name="text">
<string>Color:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
......@@ -36,44 +45,96 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="KoTriangleColorSelector" name="colorSelector" native="true"/>
</item>
<item>
<widget class="KColorButton" name="btnCustomColor">
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="textLabel1_2">
<property name="text">
<string>Threshold:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<item>
<widget class="KoTriangleColorSelector" name="colorSelector" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="wordWrap">
<bool>false</bool>
<property name="minimumSize">
<size>
<width>180</width>
<height>180</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="1" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="KColorButton" name="btnCustomColor">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<item>
<layout class="QGridLayout" name="gridLayout">
<property name="verticalSpacing">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item row="1" column="0">
<widget class="QSlider" name="sldSecondaryThreshold">
<property name="minimum">
<number>1</number>
......@@ -92,7 +153,20 @@
</property>
</widget>
</item>
<item>
<item row="0" column="0">
<widget class="QLabel" name="textLabel1_2">
<property name="text">
<string>Threshold:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="intThreshold">
<property name="minimum">
<number>1</number>
......
......@@ -201,7 +201,9 @@ KisBrightnessContrastConfigWidget::KisBrightnessContrastConfigWidget(QWidget * p
m_page->textLabelBrightness->hide();
m_page->textLabelContrast->hide();
l->addWidget(m_page, 0, Qt::AlignTop);
l->addWidget(m_page, 1, Qt::AlignTop);
l->setContentsMargins(0,0,0,0);
height = 256;
connect(m_page->curveWidget, SIGNAL(modified()), SIGNAL(sigConfigurationItemChanged()));
......
......@@ -58,6 +58,7 @@ KisPerChannelConfigWidget::KisPerChannelConfigWidget(QWidget * parent, KisPaintD
QHBoxLayout * layout = new QHBoxLayout(this);
Q_CHECK_PTR(layout);
layout->setContentsMargins(0,0,0,0);
layout->addWidget(m_page);
m_dev = dev;
......
......@@ -6,74 +6,98 @@
<rect>
<x>0</x>
<y>0</y>
<width>382</width>
<width>241</width>
<height>194</height>