Lot's of margin twisting in Krita brush config UI

Among other things removed the margin from KoResourceItemChooser, as it is a widget,
only composed from other widgets, so to align properly with other widgets there should
not be a margin around it

REVIEW: 109896

thanks boud for review
parent 0034a16b
......@@ -42,6 +42,7 @@ KisSmudgeOptionWidget::KisSmudgeOptionWidget(const QString& label, const QString
h->addWidget(mCbSmudgeMode, 1);
QVBoxLayout* v = new QVBoxLayout();
v->setMargin(0);
QWidget* w = new QWidget();
v->addLayout(h);
......
......@@ -11,6 +11,9 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="cbHealing">
<property name="text">
......
......@@ -23,6 +23,9 @@
</size>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<item row="0" column="0">
......
......@@ -23,6 +23,9 @@
</size>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<item row="1" column="0">
......
......@@ -11,8 +11,8 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>10</number>
<property name="margin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
......
......@@ -20,6 +20,9 @@
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="rateLbl">
<property name="text">
......
......@@ -17,11 +17,11 @@
</size>
</property>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,1">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QVBoxLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="brushPreview">
<property name="sizePolicy">
......@@ -293,7 +293,6 @@
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>KoAspectButton</class>
......
......@@ -11,6 +11,9 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
<property name="margin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
......
......@@ -11,6 +11,9 @@
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="3" column="0" rowspan="6">
<widget class="KisMultiSensorsSelector" name="sensorSelector" native="true">
<property name="sizePolicy">
......
......@@ -11,11 +11,8 @@
</rect>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>11</number>
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
......@@ -110,9 +107,6 @@
</item>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
......@@ -206,7 +200,6 @@
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>KisDoubleSliderSpinBox</class>
......
......@@ -11,6 +11,9 @@
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
......
......@@ -11,6 +11,9 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox1">
<property name="title">
......
......@@ -11,6 +11,9 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="grpIncremental">
<property name="title">
......
......@@ -136,8 +136,6 @@ KisBrushChooser::KisBrushChooser(QWidget *parent, const char *name)
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName("main layout");
mainLayout->setMargin(2);
mainLayout->setSpacing(2);
mainLayout->addWidget(m_lbName);
mainLayout->addWidget(m_itemChooser, 10);
......
......@@ -50,8 +50,6 @@ KisBrushSelectionWidget::KisBrushSelectionWidget(QWidget * parent)
m_buttonGroup->setExclusive(true);
m_layout = new QGridLayout(uiWdgBrushChooser.settingsFrame);
m_layout->setSpacing(0);
m_layout->setMargin(0);
m_autoBrushWidget = new KisAutoBrushWidget(this, "autobrush");
connect(m_autoBrushWidget, SIGNAL(sigBrushChanged()), SIGNAL(sigBrushChanged()));
......
......@@ -53,9 +53,10 @@ KisColorSourceOptionWidget::KisColorSourceOptionWidget() : KisPaintOpOption(i18n
verticalLayout->addWidget(radioButton);
}
QVBoxLayout* verticalLayout_2 = new QVBoxLayout(configurationWidget);
verticalLayout_2->setMargin(0);
verticalLayout_2->addWidget(groupBox);
verticalLayout_2->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding));
verticalLayout_2->addStretch();
setConfigurationPage(configurationWidget);
}
......
......@@ -45,6 +45,7 @@ KisPressureMirrorOptionWidget::KisPressureMirrorOptionWidget()
hl->addWidget(m_verticalMirror);
QVBoxLayout* vl = new QVBoxLayout;
vl->setMargin(0);
vl->addLayout(hl);
vl->addWidget(curveWidget());
......
......@@ -46,6 +46,7 @@ KisPressureScatterOptionWidget::KisPressureScatterOptionWidget()
hl->addWidget(m_axisY);
QVBoxLayout* vl = new QVBoxLayout;
vl->setMargin(0);
vl->addLayout(hl);
vl->addWidget(curveWidget());
......
......@@ -46,6 +46,7 @@ KisPressureSharpnessOptionWidget::KisPressureSharpnessOptionWidget():
hl->addWidget(m_threshold, 1);
QVBoxLayout* vl = new QVBoxLayout;
vl->setMargin(0);
vl->addLayout(hl);
vl->addWidget(KisCurveOptionWidget::curveWidget());
......
......@@ -55,6 +55,7 @@ public:
: QWidget(parent)
{
QFormLayout *formLayout = new QFormLayout(this);
formLayout->setMargin(0);
chooser = new KisPatternChooser(this);
chooser->setGrayscalePreview(true);
......
......@@ -36,12 +36,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>56</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Diameter:</string>
</property>
......@@ -83,12 +77,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>56</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Aspect ratio:</string>
</property>
......@@ -130,12 +118,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>56</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Angle:</string>
</property>
......@@ -180,12 +162,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>48</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Scale:</string>
</property>
......@@ -202,12 +178,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
......@@ -246,12 +216,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="value">
<double>0.500000000000000</double>
</property>
......
......@@ -13,9 +13,6 @@
<layout class="QVBoxLayout">
<item>
<layout class="QHBoxLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="textLabel1">
<property name="text">
......@@ -44,9 +41,6 @@
</item>
<item>
<layout class="QHBoxLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<spacer name="spacer2">
<property name="orientation">
......@@ -105,9 +99,6 @@
</item>
<item>
<layout class="QVBoxLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lblWarning">
<property name="text">
......@@ -143,7 +134,6 @@
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
</ui>
......@@ -17,9 +17,6 @@
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1,0" columnminimumwidth="0,0,0">
<item row="0" column="0">
......
......@@ -136,19 +136,19 @@ void KisControlFrame::createPatternsChooser(KisView2 * view)
m_patternChooserPopup->setObjectName("pattern_chooser_popup");
QHBoxLayout * l2 = new QHBoxLayout(m_patternChooserPopup);
l2->setObjectName("patternpopuplayout");
l2->setMargin(2);
l2->setSpacing(2);
m_patternsTab = new QTabWidget(m_patternChooserPopup);
m_patternsTab->setObjectName("patternstab");
m_patternsTab->setFocusPolicy(Qt::NoFocus);
m_patternsTab->setFont(m_font);
m_patternsTab->setContentsMargins(1, 1, 1, 1);
l2->addWidget(m_patternsTab);
m_patternChooser = new KisPatternChooser(m_patternChooserPopup);
m_patternChooser->setFont(m_font);
m_patternsTab->addTab(m_patternChooser, i18n("Patterns"));
QWidget *patternChooserPage = new QWidget(m_patternChooserPopup);
QHBoxLayout *patternChooserPageLayout = new QHBoxLayout(patternChooserPage);
patternChooserPageLayout->addWidget(m_patternChooser);
m_patternsTab->addTab(patternChooserPage, i18n("Patterns"));
KisCustomPattern* customPatterns = new KisCustomPattern(0, "custompatterns",
i18n("Custom Pattern"), m_view);
......@@ -176,14 +176,11 @@ void KisControlFrame::createGradientsChooser(KisView2 * view)
m_gradientChooserPopup->setObjectName("gradient_chooser_popup");
QHBoxLayout * l2 = new QHBoxLayout(m_gradientChooserPopup);
l2->setObjectName("gradientpopuplayout");
l2->setMargin(2);
l2->setSpacing(2);
m_gradientTab = new QTabWidget(m_gradientChooserPopup);
m_gradientTab->setObjectName("gradientstab");
m_gradientTab->setFocusPolicy(Qt::NoFocus);
m_gradientTab->setFont(m_font);
m_gradientTab->setContentsMargins(1, 1, 1, 1);
l2->addWidget(m_gradientTab);
m_gradientChooser = new KisGradientChooser(m_view, m_gradientChooserPopup);
......
......@@ -64,12 +64,10 @@ KisPatternChooser::KisPatternChooser(QWidget *parent)
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName("main layout");
mainLayout->setMargin(2);
mainLayout->setMargin(0);
mainLayout->addWidget(m_lbName);
mainLayout->addWidget(m_itemChooser, 10);
setLayout(mainLayout);
}
......
......@@ -93,7 +93,6 @@ KisWorkspaceChooser::KisWorkspaceChooser(KisView2 * view, QWidget* parent): QWid
m_nameEdit->setClearButtonShown(true);
QGridLayout* layout = new QGridLayout(this);
layout->setMargin(0);
layout->addWidget(m_itemChooser, 0, 0, 1, 2);
layout->addWidget(m_nameEdit, 1, 0, 1, 1);
layout->addWidget(saveButton, 1, 1, 1, 1);
......
......@@ -118,6 +118,7 @@ KoResourceItemChooser::KoResourceItemChooser(KoAbstractResourceServerAdapter * r
connect( d->tagSearchLineEdit, SIGNAL(textChanged(QString)), this, SLOT(tagSearchLineEditTextChanged(QString)));
QVBoxLayout* layout = new QVBoxLayout( this );
layout->setMargin(0);
layout->addWidget( d->tagSearchLineEdit );
layout->addWidget( d->splitter );
......
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