View Issue Details

IDProjectCategoryView StatusLast Update
0016462ScribusUser Interfacepublic2021-04-15 20:37
Reporterbubu Assigned Tocbradney  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.7.svn 
Fixed in Version1.5.7.svn 
Summary0016462: Update Layout for Node Editor
DescriptionI propose two rival patches for Node Editor:

Patch A: "narrow version with 4 rows"
- use standard window dialog margin (9) and spacing (6)
- format some widget to be more narrower
- reorganize layout
- short one string to be more narrower (Absolute Coordinates -> Absolute)

Patch B: "version with 6 rows"
- use standard window dialog margin (9) and spacing (6)
- reorganize layout

My opinion: Patch A is an extreme narrower version to barely cover anything on the canvas while drawing. Patch B. is a conservative version, nothing had to be optimized, but narrower as original even with standard margin and spacing.

Please review. Thank you for your attention.
Jean, you are always free to modify my rudimentary patches. Thanks if you can improve them.
TagsNo tags attached.
PatchNo

Relationships

child of 0013906 acknowledged Metabug: UI enhancement proposals (1.5.x.svn) 

Activities

bubu

2021-02-07 18:55

reporter  

0001-Update-Layout-for-Node-Editor-A.patch (15,401 bytes)   
From c51758fde02d044586d0412d04d365ec42f0c234 Mon Sep 17 00:00:00 2001
Message-Id: <c51758fde02d044586d0412d04d365ec42f0c234.1612707937.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Sun, 7 Feb 2021 15:25:24 +0100
Subject: [PATCH] Update Layout for Node Editor

---
 scribus/ui/nodeeditpalette.cpp | 107 +++++++++++++++------------------
 scribus/ui/nodeeditpalette.h   |   1 -
 2 files changed, 49 insertions(+), 59 deletions(-)

diff --git a/scribus/ui/nodeeditpalette.cpp b/scribus/ui/nodeeditpalette.cpp
index 0b27e2b32..459a9645a 100644
--- a/scribus/ui/nodeeditpalette.cpp
+++ b/scribus/ui/nodeeditpalette.cpp
@@ -26,11 +26,13 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	m_doc = nullptr;
 	unitRatio = 1.0;
 	vboxLayout = new QVBoxLayout(this);
-	vboxLayout->setSpacing(2);
-	vboxLayout->setMargin(5);
+	vboxLayout->setSpacing(6);
+	vboxLayout->setContentsMargins(9, 9, 9, 9);
+
 	gridLayout = new QGridLayout();
-	gridLayout->setSpacing(2);
-	gridLayout->setMargin(0);
+	gridLayout->setSpacing(6);
+	gridLayout->setContentsMargins(0, 0, 0, 0);
+
 	MoveNode = new QToolButton(this);
 	MoveNode->setText( "" );
 	MoveNode->setIcon(im.loadIcon("MoveNode.png"));
@@ -38,7 +40,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	MoveNode->setContentsMargins(0, 0, 0, 0);
 	MoveNode->setCheckable(true);
 	MoveNode->setChecked(true);
-	MoveNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(MoveNode, 0, 0, 1, 1);
 
 	AddNode = new QToolButton(this);
@@ -47,7 +48,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	AddNode->setContentsMargins(0, 0, 0, 0);
 	AddNode->setEnabled(true);
 	AddNode->setCheckable(true);
-	AddNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(AddNode, 0, 1, 1, 1);
 
 	DeleteNode = new QToolButton(this);
@@ -56,7 +56,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	DeleteNode->setContentsMargins(0, 0, 0, 0);
 	DeleteNode->setEnabled(true);
 	DeleteNode->setCheckable(true);
-	DeleteNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(DeleteNode, 0, 2, 1, 1);
 
 	ResNode = new QToolButton(this);
@@ -64,7 +63,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	ResNode->setIconSize(iconSize);
 	ResNode->setContentsMargins(0, 0, 0, 0);
 	ResNode->setEnabled(true);
-	ResNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(ResNode, 0, 3, 1, 1);
 
 	MoveControl = new QToolButton(this);
@@ -72,7 +70,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	MoveControl->setIconSize(iconSize);
 	MoveControl->setContentsMargins(0, 0, 0, 0);
 	MoveControl->setCheckable(true);
-	MoveControl->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(MoveControl, 1, 0, 1, 1);
 
 	AsymMove = new QToolButton(this);
@@ -81,7 +78,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	AsymMove->setContentsMargins(0, 0, 0, 0);
 	AsymMove->setEnabled(false);
 	AsymMove->setCheckable(true);
-	AsymMove->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(AsymMove, 1, 1, 1, 1);
 
 	SymMove = new QToolButton(this);
@@ -90,7 +86,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	SymMove->setContentsMargins(0, 0, 0, 0);
 	SymMove->setEnabled(false);
 	SymMove->setCheckable(true);
-	SymMove->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(SymMove, 1, 2, 1, 1);
 
 	Res1Node = new QToolButton(this);
@@ -98,7 +93,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	Res1Node->setIconSize(iconSize);
 	Res1Node->setContentsMargins(0, 0, 0, 0);
 	Res1Node->setEnabled(false);
-	Res1Node->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(Res1Node, 1, 3, 1, 1);
 
 	PolySplit = new QToolButton(this);
@@ -107,7 +101,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	PolySplit->setIcon(im.loadIcon("PolyCut.png"));
 	PolySplit->setIconSize(iconSize);
 	PolySplit->setContentsMargins(0, 0, 0, 0);
-	PolySplit->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(PolySplit, 2, 0, 1, 1);
 
 	BezierClose = new QToolButton(this);
@@ -115,28 +108,24 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	BezierClose->setIcon(im.loadIcon("BezierClose.png"));
 	BezierClose->setIconSize(iconSize);
 	BezierClose->setContentsMargins(0, 0, 0, 0);
-	BezierClose->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(BezierClose, 2, 1, 1, 1);
 
 	PolyMirrorH = new QToolButton(this);
 	PolyMirrorH->setIcon(im.loadIcon("hmirror.png"));
 	PolyMirrorH->setIconSize(iconSize);
 	PolyMirrorH->setContentsMargins(0, 0, 0, 0);
-	PolyMirrorH->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(PolyMirrorH, 2, 2, 1, 1);
 
 	PolyMirrorV = new QToolButton(this);
 	PolyMirrorV->setIcon(im.loadIcon("vmirror.png"));
 	PolyMirrorV->setIconSize(iconSize);
 	PolyMirrorV->setContentsMargins(0, 0, 0, 0);
-	PolyMirrorV->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(PolyMirrorV, 2, 3, 1, 1);
 
 	PolyShearL = new QToolButton(this);
 	PolyShearL->setIcon(im.loadIcon("22/transform-shear-left.png"));
 	PolyShearL->setIconSize(iconSize);
 	PolyShearL->setContentsMargins(0, 0, 0, 0);
-	PolyShearL->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearL->setAutoRepeat(true);
 	gridLayout->addWidget(PolyShearL, 3, 0, 1, 1);
 
@@ -144,7 +133,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	PolyShearR->setIcon(im.loadIcon("22/transform-shear-right.png"));
 	PolyShearR->setIconSize(iconSize);
 	PolyShearR->setContentsMargins(0, 0, 0, 0);
-	PolyShearR->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearR->setAutoRepeat(true);
 	gridLayout->addWidget(PolyShearR, 3, 1, 1, 1);
 
@@ -152,7 +140,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	PolyShearU->setIcon(im.loadIcon("22/transform-shear-up.png"));
 	PolyShearU->setIconSize(iconSize);
 	PolyShearU->setContentsMargins(0, 0, 0, 0);
-	PolyShearU->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearU->setAutoRepeat(true);
 	gridLayout->addWidget(PolyShearU, 3, 2, 1, 1);
 
@@ -160,149 +147,153 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	PolyShearD->setIcon(im.loadIcon("22/transform-shear-down.png"));
 	PolyShearD->setIconSize(iconSize);
 	PolyShearD->setContentsMargins(0, 0, 0, 0);
-	PolyShearD->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearD->setAutoRepeat(true);
 	gridLayout->addWidget(PolyShearD, 3, 3, 1, 1);
-	vboxLayout->addLayout(gridLayout);
-
-	gridLayout1 = new QGridLayout();
-	gridLayout1->setSpacing(5);
-	gridLayout1->setMargin(0);
 
 	RotateCCW = new QToolButton(this);
 	RotateCCW->setIcon(im.loadIcon("rotate_ccw.png"));
 	RotateCCW->setIconSize(iconSize);
 	RotateCCW->setContentsMargins(0, 0, 0, 0);
 	RotateCCW->setAutoRepeat(true);
-	gridLayout1->addWidget(RotateCCW, 0, 0, 1, 1);
+	gridLayout->addWidget(RotateCCW, 4, 0, 1, 1);
 
 	RotateCW = new QToolButton(this);
 	RotateCW->setIcon(im.loadIcon("rotate_cw.png"));
 	RotateCW->setIconSize(iconSize);
 	RotateCW->setContentsMargins(0, 0, 0, 0);
 	RotateCW->setAutoRepeat(true);
-	gridLayout1->addWidget(RotateCW, 0, 1, 1, 1);
+	gridLayout->addWidget(RotateCW, 4, 1, 1, 1);
 
 	RotVal = new QSpinBox(this);
 	RotVal->setMinimum(1);
 	RotVal->setMaximum(180);
 	RotVal->setValue(1);
 	RotVal->setSuffix( QString::fromUtf8(" °"));
-	gridLayout1->addWidget(RotVal, 0, 2, 1, 1);
+	gridLayout->addWidget(RotVal, 4, 2, 1, 2);
 
 	Expand = new QToolButton(this);
 	Expand->setIcon(im.loadIcon("expand.png"));
 	Expand->setIconSize(iconSize);
 	Expand->setContentsMargins(0, 0, 0, 0);
 	Expand->setAutoRepeat(true);
-	gridLayout1->addWidget(Expand, 1, 0, 1, 1);
+	gridLayout->addWidget(Expand, 5, 0, 1, 1);
 
 	Shrink = new QToolButton(this);
 	Shrink->setIcon(im.loadIcon("crop.png"));
 	Shrink->setIconSize(iconSize);
 	Shrink->setContentsMargins(0, 0, 0, 0);
 	Shrink->setAutoRepeat(true);
-	gridLayout1->addWidget(Shrink, 1, 1, 1, 1);
+	gridLayout->addWidget(Shrink, 5, 1, 1, 1);
 
 	scalePercentage = new QSpinBox(this);
 	scalePercentage->setMinimum(1);
 	scalePercentage->setMaximum(100);
 	scalePercentage->setValue(10);
-	gridLayout1->addWidget(scalePercentage, 1, 2, 1, 1);
+	gridLayout->addWidget(scalePercentage, 5, 2, 1, 2);
 
 	Enlarge = new QToolButton(this);
 	Enlarge->setIcon(im.loadIcon("expand.png"));
 	Enlarge->setIconSize(iconSize);
 	Enlarge->setContentsMargins(0, 0, 0, 0);
 	Enlarge->setAutoRepeat(true);
-	gridLayout1->addWidget(Enlarge, 2, 0, 1, 1);
+	gridLayout->addWidget(Enlarge, 6, 0, 1, 1);
 
 	Reduce = new QToolButton(this);
 	Reduce->setIcon(im.loadIcon("crop.png"));
 	Reduce->setIconSize(iconSize);
 	Reduce->setContentsMargins(0, 0, 0, 0);
 	Reduce->setAutoRepeat(true);
-	gridLayout1->addWidget(Reduce, 2, 1, 1, 1);
+	gridLayout->addWidget(Reduce, 6, 1, 1, 1);
 
 	scaleDistance = new ScrSpinBox( 1, 16777215, this, 0);
+	scaleDistance->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
 	scaleDistance->setValues(-16777215, 16777215, 2, 30);
-	gridLayout1->addWidget(scaleDistance, 2, 2, 1, 1);
-	vboxLayout->addLayout(gridLayout1);
+	gridLayout->addWidget(scaleDistance, 6, 2, 1, 2);
+	vboxLayout->addLayout(gridLayout);
 
 	gridLayout2 = new QGridLayout();
-	gridLayout2->setSpacing(5);
-	gridLayout2->setMargin(0);
+	gridLayout2->setSpacing(6);
+	gridLayout2->setContentsMargins(0, 0, 0, 0);
 
-	QSpacerItem* spacer = new QSpacerItem( 3, 3, QSizePolicy::Fixed, QSizePolicy::Fixed );
+	QSpacerItem* spacer = new QSpacerItem( 6, 6, QSizePolicy::Fixed, QSizePolicy::Fixed );
 	vboxLayout->addItem(spacer);
 
-	AbsMode = new QGroupBox( "&Absolute Coordinates", this );
+	AbsMode = new QGroupBox( "&Absolute", this );
 	AbsMode->setCheckable(true);
 	AbsMode->setChecked(false);
 	vboxLayout1 = new QVBoxLayout(AbsMode);
-	vboxLayout1->setSpacing(2);
-	vboxLayout1->setMargin(5);
+	vboxLayout1->setSpacing(6);
+	vboxLayout1->setContentsMargins(9, 9, 9, 9);
 	absToCanvas = new QRadioButton( tr("to Canvas"), AbsMode);
+	absToCanvas->minimumSizeHint();
 	vboxLayout1->addWidget(absToCanvas);
 	absToPage = new QRadioButton( tr("to Page"), AbsMode);
+	absToPage->minimumSizeHint();
 	vboxLayout1->addWidget(absToPage);
 	absToCanvas->setChecked(true);
-	gridLayout2->addWidget(AbsMode, 1, 0, 1, 2);
+	vboxLayout->addWidget(AbsMode);
+
+	gridLayout2 = new QGridLayout();
+	gridLayout2->setSpacing(6);
+	gridLayout2->setContentsMargins(0, 0, 0, 0);
+	gridLayout2->setColumnStretch(0, 0);
+	gridLayout2->setColumnStretch(1, 1);
 
 	TextLabel1 = new QLabel(this);
-	gridLayout2->addWidget(TextLabel1, 2, 0, 1, 1);
+	gridLayout2->addWidget(TextLabel1, 0, 0, 1, 1);
 
 	XSpin = new ScrSpinBox( 0, 16777215, this, 2 );
+	XSpin->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
 	XSpin->setEnabled(false);
-	gridLayout2->addWidget(XSpin, 2, 1, 1, 1);
+	gridLayout2->addWidget(XSpin, 0, 1, 1, 1);
 
 	TextLabel2 = new QLabel(this);
-	gridLayout2->addWidget(TextLabel2, 3, 0, 1, 1);
+	gridLayout2->addWidget(TextLabel2, 1, 0, 1, 1);
 
 	YSpin = new ScrSpinBox( 0, 16777215, this, 2 );
+	YSpin->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
 	YSpin->setEnabled(false);
-	gridLayout2->addWidget(YSpin, 3, 1, 1, 1);
+	gridLayout2->addWidget(YSpin, 1, 1, 1, 1);
+	vboxLayout->addLayout(gridLayout2);
+
 	TextLabel1->setBuddy(XSpin);
 	TextLabel2->setBuddy(YSpin);
 
 	EditCont = new QCheckBox(this);
 	EditCont->setChecked(false);
-	gridLayout2->addWidget(EditCont, 4, 0, 1, 2);
+	vboxLayout->addWidget(EditCont);
 
 	PreviewMode = new QCheckBox(this);
 	PreviewMode->setChecked(false);
-	gridLayout2->addWidget(PreviewMode, 5, 0, 1, 2);
+	vboxLayout->addWidget(PreviewMode);
 
 	ResetCont = new QPushButton(this);
 	ResetCont->setEnabled(false);
-	gridLayout2->addWidget(ResetCont, 6, 0, 1, 2);
+	vboxLayout->addWidget(ResetCont);
 
 	ResetContClip = new QPushButton(this);
 	ResetContClip->setEnabled(true);
-	ResetContClip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(6), static_cast<QSizePolicy::Policy>(6)));
 	ResetContClip->hide();
-	gridLayout2->addWidget(ResetContClip, 7, 0, 1, 2);
+	vboxLayout->addWidget(ResetContClip);
 
 	ResetShape2Clip = new QPushButton(this);
 	ResetShape2Clip->setEnabled(true);
-	ResetShape2Clip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(6), static_cast<QSizePolicy::Policy>(6)));
 	ResetShape2Clip->hide();
-	gridLayout2->addWidget(ResetShape2Clip, 8, 0, 1, 2);
+	vboxLayout->addWidget(ResetShape2Clip);
 
 	resetDefaultButton = new QPushButton(this);
 	resetDefaultButton->setEnabled(true);
-	gridLayout2->addWidget(resetDefaultButton, 9, 0, 1, 2);
+	vboxLayout->addWidget(resetDefaultButton);
 
 	editEditButton = new QPushButton(IconManager::instance().loadIcon("22/exit.png"), tr("OK"), this);
 	editEditButton->setEnabled(true);
 	editEditButton->setDefault(true);
-	gridLayout2->addWidget(editEditButton, 10, 0, 1, 1);
+	vboxLayout->addWidget(editEditButton);
 
 	cancelEditButton = new QPushButton( tr("Cancel"), this);
 	cancelEditButton->setEnabled(true);
-	gridLayout2->addWidget(cancelEditButton, 10, 1, 1, 1);
+	vboxLayout->addWidget(cancelEditButton);
 
-	vboxLayout->addLayout(gridLayout2);
 	resize(QSize(170, 380).expandedTo(minimumSizeHint()));
 
 	languageChange();
@@ -1132,7 +1123,7 @@ void NodePalette::languageChange()
 	setWindowTitle( tr( "Nodes" ) );
 	scalePercentage->setSuffix( tr(" %"));
 
-	AbsMode->setTitle( tr("&Absolute Coordinates"));
+	AbsMode->setTitle( tr("&Absolute"));
 	absToCanvas->setText( tr("to Canvas"));
 	absToPage->setText( tr("to Page"));
 	TextLabel1->setText( tr("&X-Pos:"));
diff --git a/scribus/ui/nodeeditpalette.h b/scribus/ui/nodeeditpalette.h
index 74446f63a..8547d8b4f 100644
--- a/scribus/ui/nodeeditpalette.h
+++ b/scribus/ui/nodeeditpalette.h
@@ -139,7 +139,6 @@ protected:
 	QVBoxLayout *vboxLayout { nullptr };
 	QVBoxLayout *vboxLayout1 { nullptr };
 	QGridLayout *gridLayout { nullptr };
-	QGridLayout *gridLayout1 { nullptr };
 	QGridLayout *gridLayout2 { nullptr };
 
 	ScribusDoc *m_doc { nullptr };
-- 
2.27.0

node_editor-A.gif (37,142 bytes)   
node_editor-A.gif (37,142 bytes)   
0001-Update-Layout-for-Node-Editor-B.patch (15,980 bytes)   
From 34897860d6ea92fd0f484175dff9b04ba88f27c5 Mon Sep 17 00:00:00 2001
Message-Id: <34897860d6ea92fd0f484175dff9b04ba88f27c5.1612723150.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Sun, 7 Feb 2021 19:38:48 +0100
Subject: [PATCH] Update Layout for Node Editor

---
 scribus/ui/nodeeditpalette.cpp | 138 +++++++++++++++------------------
 scribus/ui/nodeeditpalette.h   |   3 +-
 2 files changed, 66 insertions(+), 75 deletions(-)

diff --git a/scribus/ui/nodeeditpalette.cpp b/scribus/ui/nodeeditpalette.cpp
index 0b27e2b32..f2326fa3e 100644
--- a/scribus/ui/nodeeditpalette.cpp
+++ b/scribus/ui/nodeeditpalette.cpp
@@ -26,11 +26,9 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	m_doc = nullptr;
 	unitRatio = 1.0;
 	vboxLayout = new QVBoxLayout(this);
-	vboxLayout->setSpacing(2);
-	vboxLayout->setMargin(5);
-	gridLayout = new QGridLayout();
-	gridLayout->setSpacing(2);
-	gridLayout->setMargin(0);
+	vboxLayout->setSpacing(6);
+	vboxLayout->setContentsMargins(9, 9, 9, 9);
+
 	MoveNode = new QToolButton(this);
 	MoveNode->setText( "" );
 	MoveNode->setIcon(im.loadIcon("MoveNode.png"));
@@ -38,8 +36,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	MoveNode->setContentsMargins(0, 0, 0, 0);
 	MoveNode->setCheckable(true);
 	MoveNode->setChecked(true);
-	MoveNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(MoveNode, 0, 0, 1, 1);
 
 	AddNode = new QToolButton(this);
 	AddNode->setIcon(im.loadIcon("AddNode.png"));
@@ -47,8 +43,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	AddNode->setContentsMargins(0, 0, 0, 0);
 	AddNode->setEnabled(true);
 	AddNode->setCheckable(true);
-	AddNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(AddNode, 0, 1, 1, 1);
 
 	DeleteNode = new QToolButton(this);
 	DeleteNode->setIcon(im.loadIcon("DeleteNode.png"));
@@ -56,24 +50,18 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	DeleteNode->setContentsMargins(0, 0, 0, 0);
 	DeleteNode->setEnabled(true);
 	DeleteNode->setCheckable(true);
-	DeleteNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(DeleteNode, 0, 2, 1, 1);
 
 	ResNode = new QToolButton(this);
 	ResNode->setIcon(im.loadIcon("ResetNode.png"));
 	ResNode->setIconSize(iconSize);
 	ResNode->setContentsMargins(0, 0, 0, 0);
 	ResNode->setEnabled(true);
-	ResNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(ResNode, 0, 3, 1, 1);
 
 	MoveControl = new QToolButton(this);
 	MoveControl->setIcon(im.loadIcon("MoveKontrol.png"));
 	MoveControl->setIconSize(iconSize);
 	MoveControl->setContentsMargins(0, 0, 0, 0);
 	MoveControl->setCheckable(true);
-	MoveControl->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(MoveControl, 1, 0, 1, 1);
 
 	AsymMove = new QToolButton(this);
 	AsymMove->setIcon(im.loadIcon("MoveAsym.png"));
@@ -81,8 +69,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	AsymMove->setContentsMargins(0, 0, 0, 0);
 	AsymMove->setEnabled(false);
 	AsymMove->setCheckable(true);
-	AsymMove->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(AsymMove, 1, 1, 1, 1);
 
 	SymMove = new QToolButton(this);
 	SymMove->setIcon(im.loadIcon("MoveSym.png"));
@@ -90,16 +76,12 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	SymMove->setContentsMargins(0, 0, 0, 0);
 	SymMove->setEnabled(false);
 	SymMove->setCheckable(true);
-	SymMove->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(SymMove, 1, 2, 1, 1);
 
 	Res1Node = new QToolButton(this);
 	Res1Node->setIcon(im.loadIcon("Reset1Node.png"));
 	Res1Node->setIconSize(iconSize);
 	Res1Node->setContentsMargins(0, 0, 0, 0);
 	Res1Node->setEnabled(false);
-	Res1Node->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(Res1Node, 1, 3, 1, 1);
 
 	PolySplit = new QToolButton(this);
 	PolySplit->setEnabled(false);
@@ -107,202 +89,210 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	PolySplit->setIcon(im.loadIcon("PolyCut.png"));
 	PolySplit->setIconSize(iconSize);
 	PolySplit->setContentsMargins(0, 0, 0, 0);
-	PolySplit->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(PolySplit, 2, 0, 1, 1);
 
 	BezierClose = new QToolButton(this);
 	BezierClose->setEnabled(false);
 	BezierClose->setIcon(im.loadIcon("BezierClose.png"));
 	BezierClose->setIconSize(iconSize);
 	BezierClose->setContentsMargins(0, 0, 0, 0);
-	BezierClose->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(BezierClose, 2, 1, 1, 1);
 
 	PolyMirrorH = new QToolButton(this);
 	PolyMirrorH->setIcon(im.loadIcon("hmirror.png"));
 	PolyMirrorH->setIconSize(iconSize);
 	PolyMirrorH->setContentsMargins(0, 0, 0, 0);
-	PolyMirrorH->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(PolyMirrorH, 2, 2, 1, 1);
 
 	PolyMirrorV = new QToolButton(this);
 	PolyMirrorV->setIcon(im.loadIcon("vmirror.png"));
 	PolyMirrorV->setIconSize(iconSize);
 	PolyMirrorV->setContentsMargins(0, 0, 0, 0);
-	PolyMirrorV->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(PolyMirrorV, 2, 3, 1, 1);
 
 	PolyShearL = new QToolButton(this);
 	PolyShearL->setIcon(im.loadIcon("22/transform-shear-left.png"));
 	PolyShearL->setIconSize(iconSize);
 	PolyShearL->setContentsMargins(0, 0, 0, 0);
-	PolyShearL->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearL->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearL, 3, 0, 1, 1);
 
 	PolyShearR = new QToolButton(this);
 	PolyShearR->setIcon(im.loadIcon("22/transform-shear-right.png"));
 	PolyShearR->setIconSize(iconSize);
 	PolyShearR->setContentsMargins(0, 0, 0, 0);
-	PolyShearR->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearR->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearR, 3, 1, 1, 1);
 
 	PolyShearU = new QToolButton(this);
 	PolyShearU->setIcon(im.loadIcon("22/transform-shear-up.png"));
 	PolyShearU->setIconSize(iconSize);
 	PolyShearU->setContentsMargins(0, 0, 0, 0);
-	PolyShearU->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearU->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearU, 3, 2, 1, 1);
 
 	PolyShearD = new QToolButton(this);
 	PolyShearD->setIcon(im.loadIcon("22/transform-shear-down.png"));
 	PolyShearD->setIconSize(iconSize);
 	PolyShearD->setContentsMargins(0, 0, 0, 0);
-	PolyShearD->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearD->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearD, 3, 3, 1, 1);
-	vboxLayout->addLayout(gridLayout);
-
-	gridLayout1 = new QGridLayout();
-	gridLayout1->setSpacing(5);
-	gridLayout1->setMargin(0);
 
 	RotateCCW = new QToolButton(this);
 	RotateCCW->setIcon(im.loadIcon("rotate_ccw.png"));
 	RotateCCW->setIconSize(iconSize);
 	RotateCCW->setContentsMargins(0, 0, 0, 0);
 	RotateCCW->setAutoRepeat(true);
-	gridLayout1->addWidget(RotateCCW, 0, 0, 1, 1);
 
 	RotateCW = new QToolButton(this);
 	RotateCW->setIcon(im.loadIcon("rotate_cw.png"));
 	RotateCW->setIconSize(iconSize);
 	RotateCW->setContentsMargins(0, 0, 0, 0);
 	RotateCW->setAutoRepeat(true);
-	gridLayout1->addWidget(RotateCW, 0, 1, 1, 1);
 
 	RotVal = new QSpinBox(this);
 	RotVal->setMinimum(1);
 	RotVal->setMaximum(180);
 	RotVal->setValue(1);
 	RotVal->setSuffix( QString::fromUtf8(" °"));
-	gridLayout1->addWidget(RotVal, 0, 2, 1, 1);
 
 	Expand = new QToolButton(this);
 	Expand->setIcon(im.loadIcon("expand.png"));
 	Expand->setIconSize(iconSize);
 	Expand->setContentsMargins(0, 0, 0, 0);
 	Expand->setAutoRepeat(true);
-	gridLayout1->addWidget(Expand, 1, 0, 1, 1);
 
 	Shrink = new QToolButton(this);
 	Shrink->setIcon(im.loadIcon("crop.png"));
 	Shrink->setIconSize(iconSize);
 	Shrink->setContentsMargins(0, 0, 0, 0);
 	Shrink->setAutoRepeat(true);
-	gridLayout1->addWidget(Shrink, 1, 1, 1, 1);
 
 	scalePercentage = new QSpinBox(this);
 	scalePercentage->setMinimum(1);
 	scalePercentage->setMaximum(100);
 	scalePercentage->setValue(10);
-	gridLayout1->addWidget(scalePercentage, 1, 2, 1, 1);
 
 	Enlarge = new QToolButton(this);
 	Enlarge->setIcon(im.loadIcon("expand.png"));
 	Enlarge->setIconSize(iconSize);
 	Enlarge->setContentsMargins(0, 0, 0, 0);
 	Enlarge->setAutoRepeat(true);
-	gridLayout1->addWidget(Enlarge, 2, 0, 1, 1);
 
 	Reduce = new QToolButton(this);
 	Reduce->setIcon(im.loadIcon("crop.png"));
 	Reduce->setIconSize(iconSize);
 	Reduce->setContentsMargins(0, 0, 0, 0);
 	Reduce->setAutoRepeat(true);
-	gridLayout1->addWidget(Reduce, 2, 1, 1, 1);
 
 	scaleDistance = new ScrSpinBox( 1, 16777215, this, 0);
+	scaleDistance->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
 	scaleDistance->setValues(-16777215, 16777215, 2, 30);
-	gridLayout1->addWidget(scaleDistance, 2, 2, 1, 1);
-	vboxLayout->addLayout(gridLayout1);
+
+	gridLayout = new QGridLayout();
+	gridLayout->setSpacing(6);
+	gridLayout->setContentsMargins(0, 0, 0, 0);
+	gridLayout->addWidget(MoveNode,        0, 0, 1, 1);
+	gridLayout->addWidget(AddNode,         0, 1, 1, 1);
+	gridLayout->addWidget(DeleteNode,      0, 2, 1, 1);
+	gridLayout->addWidget(MoveControl,     0, 3, 1, 1);
+	gridLayout->addWidget(AsymMove,        0, 4, 1, 1);
+	gridLayout->addWidget(SymMove,         0, 5, 1, 1);
+	gridLayout->addWidget(ResNode,         1, 0, 1, 1);
+	gridLayout->addWidget(Res1Node,        1, 1, 1, 1);
+	gridLayout->addWidget(PolySplit,       1, 2, 1, 1);
+	gridLayout->addWidget(BezierClose,     1, 3, 1, 1);
+	gridLayout->addWidget(PolyMirrorH,     1, 4, 1, 1);
+	gridLayout->addWidget(PolyMirrorV,     1, 5, 1, 1);
+	gridLayout->addWidget(PolyShearL,      2, 0, 1, 1);
+	gridLayout->addWidget(PolyShearR,      2, 1, 1, 1);
+	gridLayout->addWidget(PolyShearU,      2, 2, 1, 1);
+	gridLayout->addWidget(PolyShearD,      2, 3, 1, 1);
+	gridLayout->addWidget(RotVal,          3, 0, 1, 4);
+	gridLayout->addWidget(RotateCCW,       3, 4, 1, 1);
+	gridLayout->addWidget(RotateCW,        3, 5, 1, 1);
+	gridLayout->addWidget(scalePercentage, 4, 0, 1, 4);
+	gridLayout->addWidget(Expand,          4, 4, 1, 1);
+	gridLayout->addWidget(Shrink,          4, 5, 1, 1);
+	gridLayout->addWidget(scaleDistance,   5, 0, 1, 4);
+	gridLayout->addWidget(Enlarge,         5, 4, 1, 1);
+	gridLayout->addWidget(Reduce,          5, 5, 1, 1);
+	vboxLayout->addLayout(gridLayout);
 
 	gridLayout2 = new QGridLayout();
-	gridLayout2->setSpacing(5);
-	gridLayout2->setMargin(0);
+	gridLayout2->setSpacing(6);
+	gridLayout2->setContentsMargins(0, 0, 0, 0);
 
-	QSpacerItem* spacer = new QSpacerItem( 3, 3, QSizePolicy::Fixed, QSizePolicy::Fixed );
+	QSpacerItem* spacer = new QSpacerItem( 6, 6, QSizePolicy::Fixed, QSizePolicy::Fixed );
 	vboxLayout->addItem(spacer);
 
 	AbsMode = new QGroupBox( "&Absolute Coordinates", this );
 	AbsMode->setCheckable(true);
 	AbsMode->setChecked(false);
 	vboxLayout1 = new QVBoxLayout(AbsMode);
-	vboxLayout1->setSpacing(2);
-	vboxLayout1->setMargin(5);
+	vboxLayout1->setSpacing(6);
+	vboxLayout1->setContentsMargins(9, 9, 9, 9);
 	absToCanvas = new QRadioButton( tr("to Canvas"), AbsMode);
 	vboxLayout1->addWidget(absToCanvas);
 	absToPage = new QRadioButton( tr("to Page"), AbsMode);
 	vboxLayout1->addWidget(absToPage);
 	absToCanvas->setChecked(true);
-	gridLayout2->addWidget(AbsMode, 1, 0, 1, 2);
+	vboxLayout->addWidget(AbsMode);
+
+	gridLayout2 = new QGridLayout();
+	gridLayout2->setSpacing(6);
+	gridLayout2->setContentsMargins(0, 0, 0, 0);
+	gridLayout2->setColumnStretch(0, 0);
+	gridLayout2->setColumnStretch(1, 1);
 
 	TextLabel1 = new QLabel(this);
-	gridLayout2->addWidget(TextLabel1, 2, 0, 1, 1);
+	gridLayout2->addWidget(TextLabel1, 0, 0, 1, 1);
 
 	XSpin = new ScrSpinBox( 0, 16777215, this, 2 );
 	XSpin->setEnabled(false);
-	gridLayout2->addWidget(XSpin, 2, 1, 1, 1);
+	gridLayout2->addWidget(XSpin, 0, 1, 1, 1);
 
 	TextLabel2 = new QLabel(this);
-	gridLayout2->addWidget(TextLabel2, 3, 0, 1, 1);
+	gridLayout2->addWidget(TextLabel2, 1, 0, 1, 1);
 
 	YSpin = new ScrSpinBox( 0, 16777215, this, 2 );
 	YSpin->setEnabled(false);
-	gridLayout2->addWidget(YSpin, 3, 1, 1, 1);
+	gridLayout2->addWidget(YSpin, 1, 1, 1, 1);
+	vboxLayout->addLayout(gridLayout2);
+
 	TextLabel1->setBuddy(XSpin);
 	TextLabel2->setBuddy(YSpin);
 
 	EditCont = new QCheckBox(this);
 	EditCont->setChecked(false);
-	gridLayout2->addWidget(EditCont, 4, 0, 1, 2);
+	vboxLayout->addWidget(EditCont);
 
 	PreviewMode = new QCheckBox(this);
 	PreviewMode->setChecked(false);
-	gridLayout2->addWidget(PreviewMode, 5, 0, 1, 2);
+	vboxLayout->addWidget(PreviewMode);
 
 	ResetCont = new QPushButton(this);
 	ResetCont->setEnabled(false);
-	gridLayout2->addWidget(ResetCont, 6, 0, 1, 2);
+	vboxLayout->addWidget(ResetCont);
 
 	ResetContClip = new QPushButton(this);
 	ResetContClip->setEnabled(true);
-	ResetContClip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(6), static_cast<QSizePolicy::Policy>(6)));
 	ResetContClip->hide();
-	gridLayout2->addWidget(ResetContClip, 7, 0, 1, 2);
+	vboxLayout->addWidget(ResetContClip);
 
 	ResetShape2Clip = new QPushButton(this);
 	ResetShape2Clip->setEnabled(true);
-	ResetShape2Clip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(6), static_cast<QSizePolicy::Policy>(6)));
 	ResetShape2Clip->hide();
-	gridLayout2->addWidget(ResetShape2Clip, 8, 0, 1, 2);
+	vboxLayout->addWidget(ResetShape2Clip);
 
 	resetDefaultButton = new QPushButton(this);
 	resetDefaultButton->setEnabled(true);
-	gridLayout2->addWidget(resetDefaultButton, 9, 0, 1, 2);
+	vboxLayout->addWidget(resetDefaultButton);
 
+	hboxLayout = new QHBoxLayout(this);
+	hboxLayout->setSpacing(6);
+	hboxLayout->setContentsMargins(0, 0, 0, 0);
 	editEditButton = new QPushButton(IconManager::instance().loadIcon("22/exit.png"), tr("OK"), this);
 	editEditButton->setEnabled(true);
 	editEditButton->setDefault(true);
-	gridLayout2->addWidget(editEditButton, 10, 0, 1, 1);
-
+	hboxLayout->addWidget(editEditButton);
 	cancelEditButton = new QPushButton( tr("Cancel"), this);
 	cancelEditButton->setEnabled(true);
-	gridLayout2->addWidget(cancelEditButton, 10, 1, 1, 1);
+	hboxLayout->addWidget(cancelEditButton);
+	vboxLayout->addLayout(hboxLayout);
 
-	vboxLayout->addLayout(gridLayout2);
 	resize(QSize(170, 380).expandedTo(minimumSizeHint()));
 
 	languageChange();
diff --git a/scribus/ui/nodeeditpalette.h b/scribus/ui/nodeeditpalette.h
index 74446f63a..d33463bf8 100644
--- a/scribus/ui/nodeeditpalette.h
+++ b/scribus/ui/nodeeditpalette.h
@@ -17,6 +17,7 @@ for which a new license (GPL+exception) is in place.
 #include <QRadioButton>
 #include <QGridLayout>
 #include <QVBoxLayout>
+#include <QHBoxLayout>
 #include <QCloseEvent>
 
 class QEvent;
@@ -138,8 +139,8 @@ protected:
 
 	QVBoxLayout *vboxLayout { nullptr };
 	QVBoxLayout *vboxLayout1 { nullptr };
+	QHBoxLayout *hboxLayout { nullptr };
 	QGridLayout *gridLayout { nullptr };
-	QGridLayout *gridLayout1 { nullptr };
 	QGridLayout *gridLayout2 { nullptr };
 
 	ScribusDoc *m_doc { nullptr };
-- 
2.27.0

node_editor-B.gif (38,318 bytes)   
node_editor-B.gif (38,318 bytes)   

bubu

2021-02-19 18:28

reporter   ~0048863

@jghali, please explain your opinion about this patches. What can I do to take this issue forward ? Should I create an another proposal?

bubu

2021-03-06 10:40

reporter   ~0048915

Rev 24545 breaks this patches too. Here are the new versions. Please review them. I prefer version B.
0001-Update-Layout-for-Node-Editor-A-2.patch (15,398 bytes)   
From ddea4d09c53136d478d6697a06dc6df1eecf81b8 Mon Sep 17 00:00:00 2001
Message-Id: <ddea4d09c53136d478d6697a06dc6df1eecf81b8.1615023636.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Sat, 6 Mar 2021 10:40:27 +0100
Subject: [PATCH] Update Layout for Node Editor

---
 scribus/ui/nodeeditpalette.cpp | 103 +++++++++++++++------------------
 scribus/ui/nodeeditpalette.h   |   1 -
 2 files changed, 47 insertions(+), 57 deletions(-)

diff --git a/scribus/ui/nodeeditpalette.cpp b/scribus/ui/nodeeditpalette.cpp
index 9a64b7008..459a9645a 100644
--- a/scribus/ui/nodeeditpalette.cpp
+++ b/scribus/ui/nodeeditpalette.cpp
@@ -26,11 +26,13 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	m_doc = nullptr;
 	unitRatio = 1.0;
 	vboxLayout = new QVBoxLayout(this);
-	vboxLayout->setSpacing(2);
-	vboxLayout->setContentsMargins(5, 5, 5, 5);
+	vboxLayout->setSpacing(6);
+	vboxLayout->setContentsMargins(9, 9, 9, 9);
+
 	gridLayout = new QGridLayout();
-	gridLayout->setSpacing(2);
+	gridLayout->setSpacing(6);
 	gridLayout->setContentsMargins(0, 0, 0, 0);
+
 	MoveNode = new QToolButton(this);
 	MoveNode->setText( "" );
 	MoveNode->setIcon(im.loadIcon("MoveNode.png"));
@@ -38,7 +40,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	MoveNode->setContentsMargins(0, 0, 0, 0);
 	MoveNode->setCheckable(true);
 	MoveNode->setChecked(true);
-	MoveNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(MoveNode, 0, 0, 1, 1);
 
 	AddNode = new QToolButton(this);
@@ -47,7 +48,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	AddNode->setContentsMargins(0, 0, 0, 0);
 	AddNode->setEnabled(true);
 	AddNode->setCheckable(true);
-	AddNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(AddNode, 0, 1, 1, 1);
 
 	DeleteNode = new QToolButton(this);
@@ -56,7 +56,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	DeleteNode->setContentsMargins(0, 0, 0, 0);
 	DeleteNode->setEnabled(true);
 	DeleteNode->setCheckable(true);
-	DeleteNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(DeleteNode, 0, 2, 1, 1);
 
 	ResNode = new QToolButton(this);
@@ -64,7 +63,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	ResNode->setIconSize(iconSize);
 	ResNode->setContentsMargins(0, 0, 0, 0);
 	ResNode->setEnabled(true);
-	ResNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(ResNode, 0, 3, 1, 1);
 
 	MoveControl = new QToolButton(this);
@@ -72,7 +70,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	MoveControl->setIconSize(iconSize);
 	MoveControl->setContentsMargins(0, 0, 0, 0);
 	MoveControl->setCheckable(true);
-	MoveControl->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(MoveControl, 1, 0, 1, 1);
 
 	AsymMove = new QToolButton(this);
@@ -81,7 +78,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	AsymMove->setContentsMargins(0, 0, 0, 0);
 	AsymMove->setEnabled(false);
 	AsymMove->setCheckable(true);
-	AsymMove->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(AsymMove, 1, 1, 1, 1);
 
 	SymMove = new QToolButton(this);
@@ -90,7 +86,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	SymMove->setContentsMargins(0, 0, 0, 0);
 	SymMove->setEnabled(false);
 	SymMove->setCheckable(true);
-	SymMove->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(SymMove, 1, 2, 1, 1);
 
 	Res1Node = new QToolButton(this);
@@ -98,7 +93,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	Res1Node->setIconSize(iconSize);
 	Res1Node->setContentsMargins(0, 0, 0, 0);
 	Res1Node->setEnabled(false);
-	Res1Node->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(Res1Node, 1, 3, 1, 1);
 
 	PolySplit = new QToolButton(this);
@@ -107,7 +101,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	PolySplit->setIcon(im.loadIcon("PolyCut.png"));
 	PolySplit->setIconSize(iconSize);
 	PolySplit->setContentsMargins(0, 0, 0, 0);
-	PolySplit->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(PolySplit, 2, 0, 1, 1);
 
 	BezierClose = new QToolButton(this);
@@ -115,28 +108,24 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	BezierClose->setIcon(im.loadIcon("BezierClose.png"));
 	BezierClose->setIconSize(iconSize);
 	BezierClose->setContentsMargins(0, 0, 0, 0);
-	BezierClose->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(BezierClose, 2, 1, 1, 1);
 
 	PolyMirrorH = new QToolButton(this);
 	PolyMirrorH->setIcon(im.loadIcon("hmirror.png"));
 	PolyMirrorH->setIconSize(iconSize);
 	PolyMirrorH->setContentsMargins(0, 0, 0, 0);
-	PolyMirrorH->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(PolyMirrorH, 2, 2, 1, 1);
 
 	PolyMirrorV = new QToolButton(this);
 	PolyMirrorV->setIcon(im.loadIcon("vmirror.png"));
 	PolyMirrorV->setIconSize(iconSize);
 	PolyMirrorV->setContentsMargins(0, 0, 0, 0);
-	PolyMirrorV->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	gridLayout->addWidget(PolyMirrorV, 2, 3, 1, 1);
 
 	PolyShearL = new QToolButton(this);
 	PolyShearL->setIcon(im.loadIcon("22/transform-shear-left.png"));
 	PolyShearL->setIconSize(iconSize);
 	PolyShearL->setContentsMargins(0, 0, 0, 0);
-	PolyShearL->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearL->setAutoRepeat(true);
 	gridLayout->addWidget(PolyShearL, 3, 0, 1, 1);
 
@@ -144,7 +133,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	PolyShearR->setIcon(im.loadIcon("22/transform-shear-right.png"));
 	PolyShearR->setIconSize(iconSize);
 	PolyShearR->setContentsMargins(0, 0, 0, 0);
-	PolyShearR->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearR->setAutoRepeat(true);
 	gridLayout->addWidget(PolyShearR, 3, 1, 1, 1);
 
@@ -152,7 +140,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	PolyShearU->setIcon(im.loadIcon("22/transform-shear-up.png"));
 	PolyShearU->setIconSize(iconSize);
 	PolyShearU->setContentsMargins(0, 0, 0, 0);
-	PolyShearU->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearU->setAutoRepeat(true);
 	gridLayout->addWidget(PolyShearU, 3, 2, 1, 1);
 
@@ -160,149 +147,153 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	PolyShearD->setIcon(im.loadIcon("22/transform-shear-down.png"));
 	PolyShearD->setIconSize(iconSize);
 	PolyShearD->setContentsMargins(0, 0, 0, 0);
-	PolyShearD->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearD->setAutoRepeat(true);
 	gridLayout->addWidget(PolyShearD, 3, 3, 1, 1);
-	vboxLayout->addLayout(gridLayout);
-
-	gridLayout1 = new QGridLayout();
-	gridLayout1->setSpacing(5);
-	gridLayout1->setContentsMargins(0, 0, 0, 0);
 
 	RotateCCW = new QToolButton(this);
 	RotateCCW->setIcon(im.loadIcon("rotate_ccw.png"));
 	RotateCCW->setIconSize(iconSize);
 	RotateCCW->setContentsMargins(0, 0, 0, 0);
 	RotateCCW->setAutoRepeat(true);
-	gridLayout1->addWidget(RotateCCW, 0, 0, 1, 1);
+	gridLayout->addWidget(RotateCCW, 4, 0, 1, 1);
 
 	RotateCW = new QToolButton(this);
 	RotateCW->setIcon(im.loadIcon("rotate_cw.png"));
 	RotateCW->setIconSize(iconSize);
 	RotateCW->setContentsMargins(0, 0, 0, 0);
 	RotateCW->setAutoRepeat(true);
-	gridLayout1->addWidget(RotateCW, 0, 1, 1, 1);
+	gridLayout->addWidget(RotateCW, 4, 1, 1, 1);
 
 	RotVal = new QSpinBox(this);
 	RotVal->setMinimum(1);
 	RotVal->setMaximum(180);
 	RotVal->setValue(1);
 	RotVal->setSuffix( QString::fromUtf8(" °"));
-	gridLayout1->addWidget(RotVal, 0, 2, 1, 1);
+	gridLayout->addWidget(RotVal, 4, 2, 1, 2);
 
 	Expand = new QToolButton(this);
 	Expand->setIcon(im.loadIcon("expand.png"));
 	Expand->setIconSize(iconSize);
 	Expand->setContentsMargins(0, 0, 0, 0);
 	Expand->setAutoRepeat(true);
-	gridLayout1->addWidget(Expand, 1, 0, 1, 1);
+	gridLayout->addWidget(Expand, 5, 0, 1, 1);
 
 	Shrink = new QToolButton(this);
 	Shrink->setIcon(im.loadIcon("crop.png"));
 	Shrink->setIconSize(iconSize);
 	Shrink->setContentsMargins(0, 0, 0, 0);
 	Shrink->setAutoRepeat(true);
-	gridLayout1->addWidget(Shrink, 1, 1, 1, 1);
+	gridLayout->addWidget(Shrink, 5, 1, 1, 1);
 
 	scalePercentage = new QSpinBox(this);
 	scalePercentage->setMinimum(1);
 	scalePercentage->setMaximum(100);
 	scalePercentage->setValue(10);
-	gridLayout1->addWidget(scalePercentage, 1, 2, 1, 1);
+	gridLayout->addWidget(scalePercentage, 5, 2, 1, 2);
 
 	Enlarge = new QToolButton(this);
 	Enlarge->setIcon(im.loadIcon("expand.png"));
 	Enlarge->setIconSize(iconSize);
 	Enlarge->setContentsMargins(0, 0, 0, 0);
 	Enlarge->setAutoRepeat(true);
-	gridLayout1->addWidget(Enlarge, 2, 0, 1, 1);
+	gridLayout->addWidget(Enlarge, 6, 0, 1, 1);
 
 	Reduce = new QToolButton(this);
 	Reduce->setIcon(im.loadIcon("crop.png"));
 	Reduce->setIconSize(iconSize);
 	Reduce->setContentsMargins(0, 0, 0, 0);
 	Reduce->setAutoRepeat(true);
-	gridLayout1->addWidget(Reduce, 2, 1, 1, 1);
+	gridLayout->addWidget(Reduce, 6, 1, 1, 1);
 
 	scaleDistance = new ScrSpinBox( 1, 16777215, this, 0);
+	scaleDistance->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
 	scaleDistance->setValues(-16777215, 16777215, 2, 30);
-	gridLayout1->addWidget(scaleDistance, 2, 2, 1, 1);
-	vboxLayout->addLayout(gridLayout1);
+	gridLayout->addWidget(scaleDistance, 6, 2, 1, 2);
+	vboxLayout->addLayout(gridLayout);
 
 	gridLayout2 = new QGridLayout();
-	gridLayout2->setSpacing(5);
+	gridLayout2->setSpacing(6);
 	gridLayout2->setContentsMargins(0, 0, 0, 0);
 
-	QSpacerItem* spacer = new QSpacerItem( 3, 3, QSizePolicy::Fixed, QSizePolicy::Fixed );
+	QSpacerItem* spacer = new QSpacerItem( 6, 6, QSizePolicy::Fixed, QSizePolicy::Fixed );
 	vboxLayout->addItem(spacer);
 
-	AbsMode = new QGroupBox( "&Absolute Coordinates", this );
+	AbsMode = new QGroupBox( "&Absolute", this );
 	AbsMode->setCheckable(true);
 	AbsMode->setChecked(false);
 	vboxLayout1 = new QVBoxLayout(AbsMode);
-	vboxLayout1->setSpacing(2);
-	vboxLayout1->setContentsMargins(5, 5, 5, 5);
+	vboxLayout1->setSpacing(6);
+	vboxLayout1->setContentsMargins(9, 9, 9, 9);
 	absToCanvas = new QRadioButton( tr("to Canvas"), AbsMode);
+	absToCanvas->minimumSizeHint();
 	vboxLayout1->addWidget(absToCanvas);
 	absToPage = new QRadioButton( tr("to Page"), AbsMode);
+	absToPage->minimumSizeHint();
 	vboxLayout1->addWidget(absToPage);
 	absToCanvas->setChecked(true);
-	gridLayout2->addWidget(AbsMode, 1, 0, 1, 2);
+	vboxLayout->addWidget(AbsMode);
+
+	gridLayout2 = new QGridLayout();
+	gridLayout2->setSpacing(6);
+	gridLayout2->setContentsMargins(0, 0, 0, 0);
+	gridLayout2->setColumnStretch(0, 0);
+	gridLayout2->setColumnStretch(1, 1);
 
 	TextLabel1 = new QLabel(this);
-	gridLayout2->addWidget(TextLabel1, 2, 0, 1, 1);
+	gridLayout2->addWidget(TextLabel1, 0, 0, 1, 1);
 
 	XSpin = new ScrSpinBox( 0, 16777215, this, 2 );
+	XSpin->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
 	XSpin->setEnabled(false);
-	gridLayout2->addWidget(XSpin, 2, 1, 1, 1);
+	gridLayout2->addWidget(XSpin, 0, 1, 1, 1);
 
 	TextLabel2 = new QLabel(this);
-	gridLayout2->addWidget(TextLabel2, 3, 0, 1, 1);
+	gridLayout2->addWidget(TextLabel2, 1, 0, 1, 1);
 
 	YSpin = new ScrSpinBox( 0, 16777215, this, 2 );
+	YSpin->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
 	YSpin->setEnabled(false);
-	gridLayout2->addWidget(YSpin, 3, 1, 1, 1);
+	gridLayout2->addWidget(YSpin, 1, 1, 1, 1);
+	vboxLayout->addLayout(gridLayout2);
+
 	TextLabel1->setBuddy(XSpin);
 	TextLabel2->setBuddy(YSpin);
 
 	EditCont = new QCheckBox(this);
 	EditCont->setChecked(false);
-	gridLayout2->addWidget(EditCont, 4, 0, 1, 2);
+	vboxLayout->addWidget(EditCont);
 
 	PreviewMode = new QCheckBox(this);
 	PreviewMode->setChecked(false);
-	gridLayout2->addWidget(PreviewMode, 5, 0, 1, 2);
+	vboxLayout->addWidget(PreviewMode);
 
 	ResetCont = new QPushButton(this);
 	ResetCont->setEnabled(false);
-	gridLayout2->addWidget(ResetCont, 6, 0, 1, 2);
+	vboxLayout->addWidget(ResetCont);
 
 	ResetContClip = new QPushButton(this);
 	ResetContClip->setEnabled(true);
-	ResetContClip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(6), static_cast<QSizePolicy::Policy>(6)));
 	ResetContClip->hide();
-	gridLayout2->addWidget(ResetContClip, 7, 0, 1, 2);
+	vboxLayout->addWidget(ResetContClip);
 
 	ResetShape2Clip = new QPushButton(this);
 	ResetShape2Clip->setEnabled(true);
-	ResetShape2Clip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(6), static_cast<QSizePolicy::Policy>(6)));
 	ResetShape2Clip->hide();
-	gridLayout2->addWidget(ResetShape2Clip, 8, 0, 1, 2);
+	vboxLayout->addWidget(ResetShape2Clip);
 
 	resetDefaultButton = new QPushButton(this);
 	resetDefaultButton->setEnabled(true);
-	gridLayout2->addWidget(resetDefaultButton, 9, 0, 1, 2);
+	vboxLayout->addWidget(resetDefaultButton);
 
 	editEditButton = new QPushButton(IconManager::instance().loadIcon("22/exit.png"), tr("OK"), this);
 	editEditButton->setEnabled(true);
 	editEditButton->setDefault(true);
-	gridLayout2->addWidget(editEditButton, 10, 0, 1, 1);
+	vboxLayout->addWidget(editEditButton);
 
 	cancelEditButton = new QPushButton( tr("Cancel"), this);
 	cancelEditButton->setEnabled(true);
-	gridLayout2->addWidget(cancelEditButton, 10, 1, 1, 1);
+	vboxLayout->addWidget(cancelEditButton);
 
-	vboxLayout->addLayout(gridLayout2);
 	resize(QSize(170, 380).expandedTo(minimumSizeHint()));
 
 	languageChange();
@@ -1132,7 +1123,7 @@ void NodePalette::languageChange()
 	setWindowTitle( tr( "Nodes" ) );
 	scalePercentage->setSuffix( tr(" %"));
 
-	AbsMode->setTitle( tr("&Absolute Coordinates"));
+	AbsMode->setTitle( tr("&Absolute"));
 	absToCanvas->setText( tr("to Canvas"));
 	absToPage->setText( tr("to Page"));
 	TextLabel1->setText( tr("&X-Pos:"));
diff --git a/scribus/ui/nodeeditpalette.h b/scribus/ui/nodeeditpalette.h
index 74446f63a..8547d8b4f 100644
--- a/scribus/ui/nodeeditpalette.h
+++ b/scribus/ui/nodeeditpalette.h
@@ -139,7 +139,6 @@ protected:
 	QVBoxLayout *vboxLayout { nullptr };
 	QVBoxLayout *vboxLayout1 { nullptr };
 	QGridLayout *gridLayout { nullptr };
-	QGridLayout *gridLayout1 { nullptr };
 	QGridLayout *gridLayout2 { nullptr };
 
 	ScribusDoc *m_doc { nullptr };
-- 
2.27.0

0001-Update-Layout-for-Node-Editor-B-2.patch (16,023 bytes)   
From 7dbc86fc427bd5ad8f47ebbcc678ed634ba6b95c Mon Sep 17 00:00:00 2001
Message-Id: <7dbc86fc427bd5ad8f47ebbcc678ed634ba6b95c.1615023759.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Sat, 6 Mar 2021 10:42:21 +0100
Subject: [PATCH] Update Layout for Node Editor

---
 scribus/ui/nodeeditpalette.cpp | 136 +++++++++++++++------------------
 scribus/ui/nodeeditpalette.h   |   3 +-
 2 files changed, 65 insertions(+), 74 deletions(-)

diff --git a/scribus/ui/nodeeditpalette.cpp b/scribus/ui/nodeeditpalette.cpp
index 9a64b7008..f2326fa3e 100644
--- a/scribus/ui/nodeeditpalette.cpp
+++ b/scribus/ui/nodeeditpalette.cpp
@@ -26,11 +26,9 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	m_doc = nullptr;
 	unitRatio = 1.0;
 	vboxLayout = new QVBoxLayout(this);
-	vboxLayout->setSpacing(2);
-	vboxLayout->setContentsMargins(5, 5, 5, 5);
-	gridLayout = new QGridLayout();
-	gridLayout->setSpacing(2);
-	gridLayout->setContentsMargins(0, 0, 0, 0);
+	vboxLayout->setSpacing(6);
+	vboxLayout->setContentsMargins(9, 9, 9, 9);
+
 	MoveNode = new QToolButton(this);
 	MoveNode->setText( "" );
 	MoveNode->setIcon(im.loadIcon("MoveNode.png"));
@@ -38,8 +36,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	MoveNode->setContentsMargins(0, 0, 0, 0);
 	MoveNode->setCheckable(true);
 	MoveNode->setChecked(true);
-	MoveNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(MoveNode, 0, 0, 1, 1);
 
 	AddNode = new QToolButton(this);
 	AddNode->setIcon(im.loadIcon("AddNode.png"));
@@ -47,8 +43,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	AddNode->setContentsMargins(0, 0, 0, 0);
 	AddNode->setEnabled(true);
 	AddNode->setCheckable(true);
-	AddNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(AddNode, 0, 1, 1, 1);
 
 	DeleteNode = new QToolButton(this);
 	DeleteNode->setIcon(im.loadIcon("DeleteNode.png"));
@@ -56,24 +50,18 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	DeleteNode->setContentsMargins(0, 0, 0, 0);
 	DeleteNode->setEnabled(true);
 	DeleteNode->setCheckable(true);
-	DeleteNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(DeleteNode, 0, 2, 1, 1);
 
 	ResNode = new QToolButton(this);
 	ResNode->setIcon(im.loadIcon("ResetNode.png"));
 	ResNode->setIconSize(iconSize);
 	ResNode->setContentsMargins(0, 0, 0, 0);
 	ResNode->setEnabled(true);
-	ResNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(ResNode, 0, 3, 1, 1);
 
 	MoveControl = new QToolButton(this);
 	MoveControl->setIcon(im.loadIcon("MoveKontrol.png"));
 	MoveControl->setIconSize(iconSize);
 	MoveControl->setContentsMargins(0, 0, 0, 0);
 	MoveControl->setCheckable(true);
-	MoveControl->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(MoveControl, 1, 0, 1, 1);
 
 	AsymMove = new QToolButton(this);
 	AsymMove->setIcon(im.loadIcon("MoveAsym.png"));
@@ -81,8 +69,6 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	AsymMove->setContentsMargins(0, 0, 0, 0);
 	AsymMove->setEnabled(false);
 	AsymMove->setCheckable(true);
-	AsymMove->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(AsymMove, 1, 1, 1, 1);
 
 	SymMove = new QToolButton(this);
 	SymMove->setIcon(im.loadIcon("MoveSym.png"));
@@ -90,16 +76,12 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	SymMove->setContentsMargins(0, 0, 0, 0);
 	SymMove->setEnabled(false);
 	SymMove->setCheckable(true);
-	SymMove->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(SymMove, 1, 2, 1, 1);
 
 	Res1Node = new QToolButton(this);
 	Res1Node->setIcon(im.loadIcon("Reset1Node.png"));
 	Res1Node->setIconSize(iconSize);
 	Res1Node->setContentsMargins(0, 0, 0, 0);
 	Res1Node->setEnabled(false);
-	Res1Node->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(Res1Node, 1, 3, 1, 1);
 
 	PolySplit = new QToolButton(this);
 	PolySplit->setEnabled(false);
@@ -107,202 +89,210 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	PolySplit->setIcon(im.loadIcon("PolyCut.png"));
 	PolySplit->setIconSize(iconSize);
 	PolySplit->setContentsMargins(0, 0, 0, 0);
-	PolySplit->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(PolySplit, 2, 0, 1, 1);
 
 	BezierClose = new QToolButton(this);
 	BezierClose->setEnabled(false);
 	BezierClose->setIcon(im.loadIcon("BezierClose.png"));
 	BezierClose->setIconSize(iconSize);
 	BezierClose->setContentsMargins(0, 0, 0, 0);
-	BezierClose->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(BezierClose, 2, 1, 1, 1);
 
 	PolyMirrorH = new QToolButton(this);
 	PolyMirrorH->setIcon(im.loadIcon("hmirror.png"));
 	PolyMirrorH->setIconSize(iconSize);
 	PolyMirrorH->setContentsMargins(0, 0, 0, 0);
-	PolyMirrorH->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(PolyMirrorH, 2, 2, 1, 1);
 
 	PolyMirrorV = new QToolButton(this);
 	PolyMirrorV->setIcon(im.loadIcon("vmirror.png"));
 	PolyMirrorV->setIconSize(iconSize);
 	PolyMirrorV->setContentsMargins(0, 0, 0, 0);
-	PolyMirrorV->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(PolyMirrorV, 2, 3, 1, 1);
 
 	PolyShearL = new QToolButton(this);
 	PolyShearL->setIcon(im.loadIcon("22/transform-shear-left.png"));
 	PolyShearL->setIconSize(iconSize);
 	PolyShearL->setContentsMargins(0, 0, 0, 0);
-	PolyShearL->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearL->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearL, 3, 0, 1, 1);
 
 	PolyShearR = new QToolButton(this);
 	PolyShearR->setIcon(im.loadIcon("22/transform-shear-right.png"));
 	PolyShearR->setIconSize(iconSize);
 	PolyShearR->setContentsMargins(0, 0, 0, 0);
-	PolyShearR->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearR->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearR, 3, 1, 1, 1);
 
 	PolyShearU = new QToolButton(this);
 	PolyShearU->setIcon(im.loadIcon("22/transform-shear-up.png"));
 	PolyShearU->setIconSize(iconSize);
 	PolyShearU->setContentsMargins(0, 0, 0, 0);
-	PolyShearU->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearU->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearU, 3, 2, 1, 1);
 
 	PolyShearD = new QToolButton(this);
 	PolyShearD->setIcon(im.loadIcon("22/transform-shear-down.png"));
 	PolyShearD->setIconSize(iconSize);
 	PolyShearD->setContentsMargins(0, 0, 0, 0);
-	PolyShearD->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
 	PolyShearD->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearD, 3, 3, 1, 1);
-	vboxLayout->addLayout(gridLayout);
-
-	gridLayout1 = new QGridLayout();
-	gridLayout1->setSpacing(5);
-	gridLayout1->setContentsMargins(0, 0, 0, 0);
 
 	RotateCCW = new QToolButton(this);
 	RotateCCW->setIcon(im.loadIcon("rotate_ccw.png"));
 	RotateCCW->setIconSize(iconSize);
 	RotateCCW->setContentsMargins(0, 0, 0, 0);
 	RotateCCW->setAutoRepeat(true);
-	gridLayout1->addWidget(RotateCCW, 0, 0, 1, 1);
 
 	RotateCW = new QToolButton(this);
 	RotateCW->setIcon(im.loadIcon("rotate_cw.png"));
 	RotateCW->setIconSize(iconSize);
 	RotateCW->setContentsMargins(0, 0, 0, 0);
 	RotateCW->setAutoRepeat(true);
-	gridLayout1->addWidget(RotateCW, 0, 1, 1, 1);
 
 	RotVal = new QSpinBox(this);
 	RotVal->setMinimum(1);
 	RotVal->setMaximum(180);
 	RotVal->setValue(1);
 	RotVal->setSuffix( QString::fromUtf8(" °"));
-	gridLayout1->addWidget(RotVal, 0, 2, 1, 1);
 
 	Expand = new QToolButton(this);
 	Expand->setIcon(im.loadIcon("expand.png"));
 	Expand->setIconSize(iconSize);
 	Expand->setContentsMargins(0, 0, 0, 0);
 	Expand->setAutoRepeat(true);
-	gridLayout1->addWidget(Expand, 1, 0, 1, 1);
 
 	Shrink = new QToolButton(this);
 	Shrink->setIcon(im.loadIcon("crop.png"));
 	Shrink->setIconSize(iconSize);
 	Shrink->setContentsMargins(0, 0, 0, 0);
 	Shrink->setAutoRepeat(true);
-	gridLayout1->addWidget(Shrink, 1, 1, 1, 1);
 
 	scalePercentage = new QSpinBox(this);
 	scalePercentage->setMinimum(1);
 	scalePercentage->setMaximum(100);
 	scalePercentage->setValue(10);
-	gridLayout1->addWidget(scalePercentage, 1, 2, 1, 1);
 
 	Enlarge = new QToolButton(this);
 	Enlarge->setIcon(im.loadIcon("expand.png"));
 	Enlarge->setIconSize(iconSize);
 	Enlarge->setContentsMargins(0, 0, 0, 0);
 	Enlarge->setAutoRepeat(true);
-	gridLayout1->addWidget(Enlarge, 2, 0, 1, 1);
 
 	Reduce = new QToolButton(this);
 	Reduce->setIcon(im.loadIcon("crop.png"));
 	Reduce->setIconSize(iconSize);
 	Reduce->setContentsMargins(0, 0, 0, 0);
 	Reduce->setAutoRepeat(true);
-	gridLayout1->addWidget(Reduce, 2, 1, 1, 1);
 
 	scaleDistance = new ScrSpinBox( 1, 16777215, this, 0);
+	scaleDistance->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
 	scaleDistance->setValues(-16777215, 16777215, 2, 30);
-	gridLayout1->addWidget(scaleDistance, 2, 2, 1, 1);
-	vboxLayout->addLayout(gridLayout1);
+
+	gridLayout = new QGridLayout();
+	gridLayout->setSpacing(6);
+	gridLayout->setContentsMargins(0, 0, 0, 0);
+	gridLayout->addWidget(MoveNode,        0, 0, 1, 1);
+	gridLayout->addWidget(AddNode,         0, 1, 1, 1);
+	gridLayout->addWidget(DeleteNode,      0, 2, 1, 1);
+	gridLayout->addWidget(MoveControl,     0, 3, 1, 1);
+	gridLayout->addWidget(AsymMove,        0, 4, 1, 1);
+	gridLayout->addWidget(SymMove,         0, 5, 1, 1);
+	gridLayout->addWidget(ResNode,         1, 0, 1, 1);
+	gridLayout->addWidget(Res1Node,        1, 1, 1, 1);
+	gridLayout->addWidget(PolySplit,       1, 2, 1, 1);
+	gridLayout->addWidget(BezierClose,     1, 3, 1, 1);
+	gridLayout->addWidget(PolyMirrorH,     1, 4, 1, 1);
+	gridLayout->addWidget(PolyMirrorV,     1, 5, 1, 1);
+	gridLayout->addWidget(PolyShearL,      2, 0, 1, 1);
+	gridLayout->addWidget(PolyShearR,      2, 1, 1, 1);
+	gridLayout->addWidget(PolyShearU,      2, 2, 1, 1);
+	gridLayout->addWidget(PolyShearD,      2, 3, 1, 1);
+	gridLayout->addWidget(RotVal,          3, 0, 1, 4);
+	gridLayout->addWidget(RotateCCW,       3, 4, 1, 1);
+	gridLayout->addWidget(RotateCW,        3, 5, 1, 1);
+	gridLayout->addWidget(scalePercentage, 4, 0, 1, 4);
+	gridLayout->addWidget(Expand,          4, 4, 1, 1);
+	gridLayout->addWidget(Shrink,          4, 5, 1, 1);
+	gridLayout->addWidget(scaleDistance,   5, 0, 1, 4);
+	gridLayout->addWidget(Enlarge,         5, 4, 1, 1);
+	gridLayout->addWidget(Reduce,          5, 5, 1, 1);
+	vboxLayout->addLayout(gridLayout);
 
 	gridLayout2 = new QGridLayout();
-	gridLayout2->setSpacing(5);
+	gridLayout2->setSpacing(6);
 	gridLayout2->setContentsMargins(0, 0, 0, 0);
 
-	QSpacerItem* spacer = new QSpacerItem( 3, 3, QSizePolicy::Fixed, QSizePolicy::Fixed );
+	QSpacerItem* spacer = new QSpacerItem( 6, 6, QSizePolicy::Fixed, QSizePolicy::Fixed );
 	vboxLayout->addItem(spacer);
 
 	AbsMode = new QGroupBox( "&Absolute Coordinates", this );
 	AbsMode->setCheckable(true);
 	AbsMode->setChecked(false);
 	vboxLayout1 = new QVBoxLayout(AbsMode);
-	vboxLayout1->setSpacing(2);
-	vboxLayout1->setContentsMargins(5, 5, 5, 5);
+	vboxLayout1->setSpacing(6);
+	vboxLayout1->setContentsMargins(9, 9, 9, 9);
 	absToCanvas = new QRadioButton( tr("to Canvas"), AbsMode);
 	vboxLayout1->addWidget(absToCanvas);
 	absToPage = new QRadioButton( tr("to Page"), AbsMode);
 	vboxLayout1->addWidget(absToPage);
 	absToCanvas->setChecked(true);
-	gridLayout2->addWidget(AbsMode, 1, 0, 1, 2);
+	vboxLayout->addWidget(AbsMode);
+
+	gridLayout2 = new QGridLayout();
+	gridLayout2->setSpacing(6);
+	gridLayout2->setContentsMargins(0, 0, 0, 0);
+	gridLayout2->setColumnStretch(0, 0);
+	gridLayout2->setColumnStretch(1, 1);
 
 	TextLabel1 = new QLabel(this);
-	gridLayout2->addWidget(TextLabel1, 2, 0, 1, 1);
+	gridLayout2->addWidget(TextLabel1, 0, 0, 1, 1);
 
 	XSpin = new ScrSpinBox( 0, 16777215, this, 2 );
 	XSpin->setEnabled(false);
-	gridLayout2->addWidget(XSpin, 2, 1, 1, 1);
+	gridLayout2->addWidget(XSpin, 0, 1, 1, 1);
 
 	TextLabel2 = new QLabel(this);
-	gridLayout2->addWidget(TextLabel2, 3, 0, 1, 1);
+	gridLayout2->addWidget(TextLabel2, 1, 0, 1, 1);
 
 	YSpin = new ScrSpinBox( 0, 16777215, this, 2 );
 	YSpin->setEnabled(false);
-	gridLayout2->addWidget(YSpin, 3, 1, 1, 1);
+	gridLayout2->addWidget(YSpin, 1, 1, 1, 1);
+	vboxLayout->addLayout(gridLayout2);
+
 	TextLabel1->setBuddy(XSpin);
 	TextLabel2->setBuddy(YSpin);
 
 	EditCont = new QCheckBox(this);
 	EditCont->setChecked(false);
-	gridLayout2->addWidget(EditCont, 4, 0, 1, 2);
+	vboxLayout->addWidget(EditCont);
 
 	PreviewMode = new QCheckBox(this);
 	PreviewMode->setChecked(false);
-	gridLayout2->addWidget(PreviewMode, 5, 0, 1, 2);
+	vboxLayout->addWidget(PreviewMode);
 
 	ResetCont = new QPushButton(this);
 	ResetCont->setEnabled(false);
-	gridLayout2->addWidget(ResetCont, 6, 0, 1, 2);
+	vboxLayout->addWidget(ResetCont);
 
 	ResetContClip = new QPushButton(this);
 	ResetContClip->setEnabled(true);
-	ResetContClip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(6), static_cast<QSizePolicy::Policy>(6)));
 	ResetContClip->hide();
-	gridLayout2->addWidget(ResetContClip, 7, 0, 1, 2);
+	vboxLayout->addWidget(ResetContClip);
 
 	ResetShape2Clip = new QPushButton(this);
 	ResetShape2Clip->setEnabled(true);
-	ResetShape2Clip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(6), static_cast<QSizePolicy::Policy>(6)));
 	ResetShape2Clip->hide();
-	gridLayout2->addWidget(ResetShape2Clip, 8, 0, 1, 2);
+	vboxLayout->addWidget(ResetShape2Clip);
 
 	resetDefaultButton = new QPushButton(this);
 	resetDefaultButton->setEnabled(true);
-	gridLayout2->addWidget(resetDefaultButton, 9, 0, 1, 2);
+	vboxLayout->addWidget(resetDefaultButton);
 
+	hboxLayout = new QHBoxLayout(this);
+	hboxLayout->setSpacing(6);
+	hboxLayout->setContentsMargins(0, 0, 0, 0);
 	editEditButton = new QPushButton(IconManager::instance().loadIcon("22/exit.png"), tr("OK"), this);
 	editEditButton->setEnabled(true);
 	editEditButton->setDefault(true);
-	gridLayout2->addWidget(editEditButton, 10, 0, 1, 1);
-
+	hboxLayout->addWidget(editEditButton);
 	cancelEditButton = new QPushButton( tr("Cancel"), this);
 	cancelEditButton->setEnabled(true);
-	gridLayout2->addWidget(cancelEditButton, 10, 1, 1, 1);
+	hboxLayout->addWidget(cancelEditButton);
+	vboxLayout->addLayout(hboxLayout);
 
-	vboxLayout->addLayout(gridLayout2);
 	resize(QSize(170, 380).expandedTo(minimumSizeHint()));
 
 	languageChange();
diff --git a/scribus/ui/nodeeditpalette.h b/scribus/ui/nodeeditpalette.h
index 74446f63a..d33463bf8 100644
--- a/scribus/ui/nodeeditpalette.h
+++ b/scribus/ui/nodeeditpalette.h
@@ -17,6 +17,7 @@ for which a new license (GPL+exception) is in place.
 #include <QRadioButton>
 #include <QGridLayout>
 #include <QVBoxLayout>
+#include <QHBoxLayout>
 #include <QCloseEvent>
 
 class QEvent;
@@ -138,8 +139,8 @@ protected:
 
 	QVBoxLayout *vboxLayout { nullptr };
 	QVBoxLayout *vboxLayout1 { nullptr };
+	QHBoxLayout *hboxLayout { nullptr };
 	QGridLayout *gridLayout { nullptr };
-	QGridLayout *gridLayout1 { nullptr };
 	QGridLayout *gridLayout2 { nullptr };
 
 	ScribusDoc *m_doc { nullptr };
-- 
2.27.0

bubu

2021-03-15 11:53

reporter   ~0048935

I made a new version, but I move forward only with variation B.

We have here 22×22 px icons on the toolbuttons. I considered to use non fixed toolbuttons as in other palettes, but when I removed the sizePolicy and the iconSize properties from toolbuttons they became standard 24×23 px size, but they compressed the 22×22 icons to 16×16. It is very ugly. If we want here default sized toolbutton we must use 16×16 icons. Hmm.

I choose to keep 22×22 px icons and use the solution from Align and Distribute palette (see: aligndistribute.cpp l. 236): 22×22 icons, iconSize = 22×22, minimumSize = 24×24, maximumSize 24×24. So I propose this version in current patch. Please see the screenshot and review the patch.

(Maybe the these pushbuttons: "Reset Counter Line", "Set Contour to Image Clip", "Set Shape to image Clip", "Reset all edit" can be replaced with icon style toolbuttons and get a more compact layout... but this will be another issue if it will be.)
0001-Update-Layout-for-Node-Editor-B3.patch (20,198 bytes)   
From da0c8cb17514215a12e6d7ed6f5846cdd2e1523c Mon Sep 17 00:00:00 2001
Message-Id: <da0c8cb17514215a12e6d7ed6f5846cdd2e1523c.1615809024.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Mon, 15 Mar 2021 12:50:16 +0100
Subject: [PATCH] Update Layout for Node Editor

---
 scribus/ui/nodeeditpalette.cpp | 275 ++++++++++++++-------------------
 scribus/ui/nodeeditpalette.h   |   3 +-
 2 files changed, 114 insertions(+), 164 deletions(-)

diff --git a/scribus/ui/nodeeditpalette.cpp b/scribus/ui/nodeeditpalette.cpp
index 9a64b7008..a903f4df9 100644
--- a/scribus/ui/nodeeditpalette.cpp
+++ b/scribus/ui/nodeeditpalette.cpp
@@ -21,290 +21,283 @@ for which a new license (GPL+exception) is in place.
 
 NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette", false, Qt::WindowFlags())
 {
-	IconManager& im = IconManager::instance();
 	QSize iconSize = QSize(22, 22);
+	QSize buttonSize = QSize(24,24);
 	m_doc = nullptr;
 	unitRatio = 1.0;
 	vboxLayout = new QVBoxLayout(this);
-	vboxLayout->setSpacing(2);
-	vboxLayout->setContentsMargins(5, 5, 5, 5);
-	gridLayout = new QGridLayout();
-	gridLayout->setSpacing(2);
-	gridLayout->setContentsMargins(0, 0, 0, 0);
+	vboxLayout->setSpacing(6);
+	vboxLayout->setContentsMargins(9, 9, 9, 9);
+
 	MoveNode = new QToolButton(this);
-	MoveNode->setText( "" );
-	MoveNode->setIcon(im.loadIcon("MoveNode.png"));
 	MoveNode->setIconSize(iconSize);
-	MoveNode->setContentsMargins(0, 0, 0, 0);
+	MoveNode->setMinimumSize(buttonSize);
+	MoveNode->setMaximumSize(buttonSize);
 	MoveNode->setCheckable(true);
 	MoveNode->setChecked(true);
-	MoveNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(MoveNode, 0, 0, 1, 1);
 
 	AddNode = new QToolButton(this);
-	AddNode->setIcon(im.loadIcon("AddNode.png"));
 	AddNode->setIconSize(iconSize);
-	AddNode->setContentsMargins(0, 0, 0, 0);
+	AddNode->setMinimumSize(buttonSize);
+	AddNode->setMaximumSize(buttonSize);
 	AddNode->setEnabled(true);
 	AddNode->setCheckable(true);
-	AddNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(AddNode, 0, 1, 1, 1);
 
 	DeleteNode = new QToolButton(this);
-	DeleteNode->setIcon(im.loadIcon("DeleteNode.png"));
 	DeleteNode->setIconSize(iconSize);
-	DeleteNode->setContentsMargins(0, 0, 0, 0);
+	DeleteNode->setMinimumSize(buttonSize);
+	DeleteNode->setMaximumSize(buttonSize);
 	DeleteNode->setEnabled(true);
 	DeleteNode->setCheckable(true);
-	DeleteNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(DeleteNode, 0, 2, 1, 1);
 
 	ResNode = new QToolButton(this);
-	ResNode->setIcon(im.loadIcon("ResetNode.png"));
 	ResNode->setIconSize(iconSize);
-	ResNode->setContentsMargins(0, 0, 0, 0);
+	ResNode->setMinimumSize(buttonSize);
+	ResNode->setMaximumSize(buttonSize);
 	ResNode->setEnabled(true);
-	ResNode->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(ResNode, 0, 3, 1, 1);
 
 	MoveControl = new QToolButton(this);
-	MoveControl->setIcon(im.loadIcon("MoveKontrol.png"));
 	MoveControl->setIconSize(iconSize);
-	MoveControl->setContentsMargins(0, 0, 0, 0);
+	MoveControl->setMinimumSize(buttonSize);
+	MoveControl->setMaximumSize(buttonSize);
 	MoveControl->setCheckable(true);
-	MoveControl->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(MoveControl, 1, 0, 1, 1);
 
 	AsymMove = new QToolButton(this);
-	AsymMove->setIcon(im.loadIcon("MoveAsym.png"));
 	AsymMove->setIconSize(iconSize);
-	AsymMove->setContentsMargins(0, 0, 0, 0);
+	AsymMove->setMinimumSize(buttonSize);
+	AsymMove->setMaximumSize(buttonSize);
 	AsymMove->setEnabled(false);
 	AsymMove->setCheckable(true);
-	AsymMove->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(AsymMove, 1, 1, 1, 1);
 
 	SymMove = new QToolButton(this);
-	SymMove->setIcon(im.loadIcon("MoveSym.png"));
 	SymMove->setIconSize(iconSize);
-	SymMove->setContentsMargins(0, 0, 0, 0);
+	SymMove->setMinimumSize(buttonSize);
+	SymMove->setMaximumSize(buttonSize);
 	SymMove->setEnabled(false);
 	SymMove->setCheckable(true);
-	SymMove->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(SymMove, 1, 2, 1, 1);
 
 	Res1Node = new QToolButton(this);
-	Res1Node->setIcon(im.loadIcon("Reset1Node.png"));
 	Res1Node->setIconSize(iconSize);
-	Res1Node->setContentsMargins(0, 0, 0, 0);
+	Res1Node->setMinimumSize(buttonSize);
+	Res1Node->setMaximumSize(buttonSize);
 	Res1Node->setEnabled(false);
-	Res1Node->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(Res1Node, 1, 3, 1, 1);
 
 	PolySplit = new QToolButton(this);
 	PolySplit->setEnabled(false);
 	PolySplit->setCheckable(true);
-	PolySplit->setIcon(im.loadIcon("PolyCut.png"));
 	PolySplit->setIconSize(iconSize);
-	PolySplit->setContentsMargins(0, 0, 0, 0);
-	PolySplit->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(PolySplit, 2, 0, 1, 1);
+	PolySplit->setMinimumSize(buttonSize);
+	PolySplit->setMaximumSize(buttonSize);
 
 	BezierClose = new QToolButton(this);
 	BezierClose->setEnabled(false);
-	BezierClose->setIcon(im.loadIcon("BezierClose.png"));
 	BezierClose->setIconSize(iconSize);
-	BezierClose->setContentsMargins(0, 0, 0, 0);
-	BezierClose->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(BezierClose, 2, 1, 1, 1);
+	BezierClose->setMinimumSize(buttonSize);
+	BezierClose->setMaximumSize(buttonSize);
 
 	PolyMirrorH = new QToolButton(this);
-	PolyMirrorH->setIcon(im.loadIcon("hmirror.png"));
 	PolyMirrorH->setIconSize(iconSize);
-	PolyMirrorH->setContentsMargins(0, 0, 0, 0);
-	PolyMirrorH->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(PolyMirrorH, 2, 2, 1, 1);
+	PolyMirrorH->setMinimumSize(buttonSize);
+	PolyMirrorH->setMaximumSize(buttonSize);
 
 	PolyMirrorV = new QToolButton(this);
-	PolyMirrorV->setIcon(im.loadIcon("vmirror.png"));
 	PolyMirrorV->setIconSize(iconSize);
-	PolyMirrorV->setContentsMargins(0, 0, 0, 0);
-	PolyMirrorV->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
-	gridLayout->addWidget(PolyMirrorV, 2, 3, 1, 1);
+	PolyMirrorV->setMinimumSize(buttonSize);
+	PolyMirrorV->setMaximumSize(buttonSize);
 
 	PolyShearL = new QToolButton(this);
-	PolyShearL->setIcon(im.loadIcon("22/transform-shear-left.png"));
 	PolyShearL->setIconSize(iconSize);
-	PolyShearL->setContentsMargins(0, 0, 0, 0);
-	PolyShearL->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
+	PolyShearL->setMinimumSize(buttonSize);
+	PolyShearL->setMaximumSize(buttonSize);
 	PolyShearL->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearL, 3, 0, 1, 1);
 
 	PolyShearR = new QToolButton(this);
-	PolyShearR->setIcon(im.loadIcon("22/transform-shear-right.png"));
 	PolyShearR->setIconSize(iconSize);
-	PolyShearR->setContentsMargins(0, 0, 0, 0);
-	PolyShearR->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
+	PolyShearR->setMinimumSize(buttonSize);
+	PolyShearR->setMaximumSize(buttonSize);
 	PolyShearR->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearR, 3, 1, 1, 1);
 
 	PolyShearU = new QToolButton(this);
-	PolyShearU->setIcon(im.loadIcon("22/transform-shear-up.png"));
 	PolyShearU->setIconSize(iconSize);
-	PolyShearU->setContentsMargins(0, 0, 0, 0);
-	PolyShearU->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
+	PolyShearU->setMinimumSize(buttonSize);
+	PolyShearU->setMaximumSize(buttonSize);
 	PolyShearU->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearU, 3, 2, 1, 1);
 
 	PolyShearD = new QToolButton(this);
-	PolyShearD->setIcon(im.loadIcon("22/transform-shear-down.png"));
 	PolyShearD->setIconSize(iconSize);
-	PolyShearD->setContentsMargins(0, 0, 0, 0);
-	PolyShearD->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
+	PolyShearD->setMinimumSize(buttonSize);
+	PolyShearD->setMaximumSize(buttonSize);
 	PolyShearD->setAutoRepeat(true);
-	gridLayout->addWidget(PolyShearD, 3, 3, 1, 1);
-	vboxLayout->addLayout(gridLayout);
-
-	gridLayout1 = new QGridLayout();
-	gridLayout1->setSpacing(5);
-	gridLayout1->setContentsMargins(0, 0, 0, 0);
 
 	RotateCCW = new QToolButton(this);
-	RotateCCW->setIcon(im.loadIcon("rotate_ccw.png"));
 	RotateCCW->setIconSize(iconSize);
-	RotateCCW->setContentsMargins(0, 0, 0, 0);
+	RotateCCW->setMinimumSize(buttonSize);
+	RotateCCW->setMaximumSize(buttonSize);
 	RotateCCW->setAutoRepeat(true);
-	gridLayout1->addWidget(RotateCCW, 0, 0, 1, 1);
 
 	RotateCW = new QToolButton(this);
-	RotateCW->setIcon(im.loadIcon("rotate_cw.png"));
 	RotateCW->setIconSize(iconSize);
-	RotateCW->setContentsMargins(0, 0, 0, 0);
+	RotateCW->setMinimumSize(buttonSize);
+	RotateCW->setMaximumSize(buttonSize);
 	RotateCW->setAutoRepeat(true);
-	gridLayout1->addWidget(RotateCW, 0, 1, 1, 1);
 
 	RotVal = new QSpinBox(this);
 	RotVal->setMinimum(1);
 	RotVal->setMaximum(180);
 	RotVal->setValue(1);
 	RotVal->setSuffix( QString::fromUtf8(" °"));
-	gridLayout1->addWidget(RotVal, 0, 2, 1, 1);
 
 	Expand = new QToolButton(this);
-	Expand->setIcon(im.loadIcon("expand.png"));
 	Expand->setIconSize(iconSize);
-	Expand->setContentsMargins(0, 0, 0, 0);
+	Expand->setMinimumSize(buttonSize);
+	Expand->setMaximumSize(buttonSize);
 	Expand->setAutoRepeat(true);
-	gridLayout1->addWidget(Expand, 1, 0, 1, 1);
 
 	Shrink = new QToolButton(this);
-	Shrink->setIcon(im.loadIcon("crop.png"));
 	Shrink->setIconSize(iconSize);
-	Shrink->setContentsMargins(0, 0, 0, 0);
+	Shrink->setMinimumSize(buttonSize);
+	Shrink->setMaximumSize(buttonSize);
 	Shrink->setAutoRepeat(true);
-	gridLayout1->addWidget(Shrink, 1, 1, 1, 1);
 
 	scalePercentage = new QSpinBox(this);
 	scalePercentage->setMinimum(1);
 	scalePercentage->setMaximum(100);
 	scalePercentage->setValue(10);
-	gridLayout1->addWidget(scalePercentage, 1, 2, 1, 1);
 
 	Enlarge = new QToolButton(this);
-	Enlarge->setIcon(im.loadIcon("expand.png"));
 	Enlarge->setIconSize(iconSize);
-	Enlarge->setContentsMargins(0, 0, 0, 0);
+	Enlarge->setMinimumSize(buttonSize);
+	Enlarge->setMaximumSize(buttonSize);
 	Enlarge->setAutoRepeat(true);
-	gridLayout1->addWidget(Enlarge, 2, 0, 1, 1);
 
 	Reduce = new QToolButton(this);
-	Reduce->setIcon(im.loadIcon("crop.png"));
 	Reduce->setIconSize(iconSize);
-	Reduce->setContentsMargins(0, 0, 0, 0);
+	Reduce->setMinimumSize(buttonSize);
+	Reduce->setMaximumSize(buttonSize);
 	Reduce->setAutoRepeat(true);
-	gridLayout1->addWidget(Reduce, 2, 1, 1, 1);
 
 	scaleDistance = new ScrSpinBox( 1, 16777215, this, 0);
+	scaleDistance->setMaximumSize(114, 16777215); // ScrSpinBox is bigger for 4px than expected
 	scaleDistance->setValues(-16777215, 16777215, 2, 30);
-	gridLayout1->addWidget(scaleDistance, 2, 2, 1, 1);
-	vboxLayout->addLayout(gridLayout1);
+
+	gridLayout = new QGridLayout();
+	gridLayout->setSpacing(6);
+	gridLayout->setContentsMargins(0, 0, 0, 0);
+	gridLayout->addWidget(MoveNode,        0, 0, 1, 1);
+	gridLayout->addWidget(AddNode,         0, 1, 1, 1);
+	gridLayout->addWidget(DeleteNode,      0, 2, 1, 1);
+	gridLayout->addWidget(MoveControl,     0, 3, 1, 1);
+	gridLayout->addWidget(AsymMove,        0, 4, 1, 1);
+	gridLayout->addWidget(SymMove,         0, 5, 1, 1);
+	gridLayout->addWidget(ResNode,         1, 0, 1, 1);
+	gridLayout->addWidget(Res1Node,        1, 1, 1, 1);
+	gridLayout->addWidget(PolySplit,       1, 2, 1, 1);
+	gridLayout->addWidget(BezierClose,     1, 3, 1, 1);
+	gridLayout->addWidget(PolyMirrorH,     1, 4, 1, 1);
+	gridLayout->addWidget(PolyMirrorV,     1, 5, 1, 1);
+	gridLayout->addWidget(PolyShearL,      2, 0, 1, 1);
+	gridLayout->addWidget(PolyShearR,      2, 1, 1, 1);
+	gridLayout->addWidget(PolyShearU,      2, 2, 1, 1);
+	gridLayout->addWidget(PolyShearD,      2, 3, 1, 1);
+	gridLayout->addWidget(RotVal,          3, 0, 1, 4);
+	gridLayout->addWidget(RotateCCW,       3, 4, 1, 1);
+	gridLayout->addWidget(RotateCW,        3, 5, 1, 1);
+	gridLayout->addWidget(scalePercentage, 4, 0, 1, 4);
+	gridLayout->addWidget(Expand,          4, 4, 1, 1);
+	gridLayout->addWidget(Shrink,          4, 5, 1, 1);
+	gridLayout->addWidget(scaleDistance,   5, 0, 1, 4);
+	gridLayout->addWidget(Enlarge,         5, 4, 1, 1);
+	gridLayout->addWidget(Reduce,          5, 5, 1, 1);
+	vboxLayout->addLayout(gridLayout);
 
 	gridLayout2 = new QGridLayout();
-	gridLayout2->setSpacing(5);
+	gridLayout2->setSpacing(6);
 	gridLayout2->setContentsMargins(0, 0, 0, 0);
 
-	QSpacerItem* spacer = new QSpacerItem( 3, 3, QSizePolicy::Fixed, QSizePolicy::Fixed );
+	QSpacerItem* spacer = new QSpacerItem( 6, 6, QSizePolicy::Fixed, QSizePolicy::Fixed );
 	vboxLayout->addItem(spacer);
 
 	AbsMode = new QGroupBox( "&Absolute Coordinates", this );
+	AbsMode->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred));
 	AbsMode->setCheckable(true);
 	AbsMode->setChecked(false);
 	vboxLayout1 = new QVBoxLayout(AbsMode);
-	vboxLayout1->setSpacing(2);
-	vboxLayout1->setContentsMargins(5, 5, 5, 5);
+	vboxLayout1->setSpacing(6);
+	vboxLayout1->setContentsMargins(9, 9, 9, 9);
 	absToCanvas = new QRadioButton( tr("to Canvas"), AbsMode);
 	vboxLayout1->addWidget(absToCanvas);
 	absToPage = new QRadioButton( tr("to Page"), AbsMode);
 	vboxLayout1->addWidget(absToPage);
 	absToCanvas->setChecked(true);
-	gridLayout2->addWidget(AbsMode, 1, 0, 1, 2);
+	vboxLayout->addWidget(AbsMode);
+
+	gridLayout2 = new QGridLayout();
+	gridLayout2->setSpacing(6);
+	gridLayout2->setContentsMargins(0, 0, 0, 0);
+	gridLayout2->setColumnStretch(0, 0);
+	gridLayout2->setColumnStretch(1, 1);
 
 	TextLabel1 = new QLabel(this);
-	gridLayout2->addWidget(TextLabel1, 2, 0, 1, 1);
+	gridLayout2->addWidget(TextLabel1, 0, 0, 1, 1);
 
 	XSpin = new ScrSpinBox( 0, 16777215, this, 2 );
+	XSpin->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed));
 	XSpin->setEnabled(false);
-	gridLayout2->addWidget(XSpin, 2, 1, 1, 1);
+	gridLayout2->addWidget(XSpin, 0, 1, 1, 1);
 
 	TextLabel2 = new QLabel(this);
-	gridLayout2->addWidget(TextLabel2, 3, 0, 1, 1);
+	gridLayout2->addWidget(TextLabel2, 1, 0, 1, 1);
 
 	YSpin = new ScrSpinBox( 0, 16777215, this, 2 );
+	YSpin->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed));
 	YSpin->setEnabled(false);
-	gridLayout2->addWidget(YSpin, 3, 1, 1, 1);
+	gridLayout2->addWidget(YSpin, 1, 1, 1, 1);
+	vboxLayout->addLayout(gridLayout2);
+
 	TextLabel1->setBuddy(XSpin);
 	TextLabel2->setBuddy(YSpin);
 
 	EditCont = new QCheckBox(this);
 	EditCont->setChecked(false);
-	gridLayout2->addWidget(EditCont, 4, 0, 1, 2);
+	vboxLayout->addWidget(EditCont);
 
 	PreviewMode = new QCheckBox(this);
 	PreviewMode->setChecked(false);
-	gridLayout2->addWidget(PreviewMode, 5, 0, 1, 2);
+	vboxLayout->addWidget(PreviewMode);
 
 	ResetCont = new QPushButton(this);
 	ResetCont->setEnabled(false);
-	gridLayout2->addWidget(ResetCont, 6, 0, 1, 2);
+	vboxLayout->addWidget(ResetCont);
 
 	ResetContClip = new QPushButton(this);
 	ResetContClip->setEnabled(true);
-	ResetContClip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(6), static_cast<QSizePolicy::Policy>(6)));
 	ResetContClip->hide();
-	gridLayout2->addWidget(ResetContClip, 7, 0, 1, 2);
+	vboxLayout->addWidget(ResetContClip);
 
 	ResetShape2Clip = new QPushButton(this);
 	ResetShape2Clip->setEnabled(true);
-	ResetShape2Clip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(6), static_cast<QSizePolicy::Policy>(6)));
 	ResetShape2Clip->hide();
-	gridLayout2->addWidget(ResetShape2Clip, 8, 0, 1, 2);
+	vboxLayout->addWidget(ResetShape2Clip);
 
 	resetDefaultButton = new QPushButton(this);
 	resetDefaultButton->setEnabled(true);
-	gridLayout2->addWidget(resetDefaultButton, 9, 0, 1, 2);
+	vboxLayout->addWidget(resetDefaultButton);
 
+	hboxLayout = new QHBoxLayout(this);
+	hboxLayout->setSpacing(6);
+	hboxLayout->setContentsMargins(0, 0, 0, 0);
 	editEditButton = new QPushButton(IconManager::instance().loadIcon("22/exit.png"), tr("OK"), this);
 	editEditButton->setEnabled(true);
 	editEditButton->setDefault(true);
-	gridLayout2->addWidget(editEditButton, 10, 0, 1, 1);
-
+	hboxLayout->addWidget(editEditButton);
 	cancelEditButton = new QPushButton( tr("Cancel"), this);
 	cancelEditButton->setEnabled(true);
-	gridLayout2->addWidget(cancelEditButton, 10, 1, 1, 1);
+	hboxLayout->addWidget(cancelEditButton);
+	vboxLayout->addLayout(hboxLayout);
 
-	vboxLayout->addLayout(gridLayout2);
 	resize(QSize(170, 380).expandedTo(minimumSizeHint()));
 
+	iconSetChange();
 	languageChange();
 
 	connect(ScQApp, SIGNAL(iconSetChanged()), this, SLOT(iconSetChange()));
@@ -1058,73 +1051,29 @@ void NodePalette::setDefaults(PageItem* currItem)
 void NodePalette::iconSetChange()
 {
 	IconManager& im = IconManager::instance();
-	QSize iconSize = QSize(22, 22);
 
 	MoveNode->setIcon(im.loadIcon("MoveNode.png"));
-	MoveNode->setIconSize(iconSize);
-
 	AddNode->setIcon(im.loadIcon("AddNode.png"));
-	AddNode->setIconSize(iconSize);
-
 	DeleteNode->setIcon(im.loadIcon("DeleteNode.png"));
-	DeleteNode->setIconSize(iconSize);
-
 	ResNode->setIcon(im.loadIcon("ResetNode.png"));
-	ResNode->setIconSize(iconSize);
-
 	MoveControl->setIcon(im.loadIcon("MoveKontrol.png"));
-	MoveControl->setIconSize(iconSize);
-
 	AsymMove->setIcon(im.loadIcon("MoveAsym.png"));
-	AsymMove->setIconSize(iconSize);
-
 	SymMove->setIcon(im.loadIcon("MoveSym.png"));
-	SymMove->setIconSize(iconSize);
-
 	Res1Node->setIcon(im.loadIcon("Reset1Node.png"));
-	Res1Node->setIconSize(iconSize);
-
 	PolySplit->setIcon(im.loadIcon("PolyCut.png"));
-	PolySplit->setIconSize(iconSize);
-
 	BezierClose->setIcon(im.loadIcon("BezierClose.png"));
-	BezierClose->setIconSize(iconSize);
-
 	PolyMirrorH->setIcon(im.loadIcon("hmirror.png"));
-	PolyMirrorH->setIconSize(iconSize);
-
 	PolyMirrorV->setIcon(im.loadIcon("vmirror.png"));
-	PolyMirrorV->setIconSize(iconSize);
-
 	PolyShearL->setIcon(im.loadIcon("22/transform-shear-left.png"));
-	PolyShearL->setIconSize(iconSize);
-
 	PolyShearR->setIcon(im.loadIcon("22/transform-shear-right.png"));
-	PolyShearR->setIconSize(iconSize);
-
 	PolyShearU->setIcon(im.loadIcon("22/transform-shear-up.png"));
-	PolyShearU->setIconSize(iconSize);
-
 	PolyShearD->setIcon(im.loadIcon("22/transform-shear-down.png"));
-	PolyShearD->setIconSize(iconSize);
-
 	RotateCCW->setIcon(im.loadIcon("rotate_ccw.png"));
-	RotateCCW->setIconSize(iconSize);
-
 	RotateCW->setIcon(im.loadIcon("rotate_cw.png"));
-	RotateCW->setIconSize(iconSize);
-
 	Expand->setIcon(im.loadIcon("expand.png"));
-	Expand->setIconSize(iconSize);
-
 	Shrink->setIcon(im.loadIcon("crop.png"));
-	Shrink->setIconSize(iconSize);
-
 	Enlarge->setIcon(im.loadIcon("expand.png"));
-	Enlarge->setIconSize(iconSize);
-
 	Reduce->setIcon(im.loadIcon("crop.png"));
-	Reduce->setIconSize(iconSize);
 }
 
 void NodePalette::languageChange()
diff --git a/scribus/ui/nodeeditpalette.h b/scribus/ui/nodeeditpalette.h
index 74446f63a..d33463bf8 100644
--- a/scribus/ui/nodeeditpalette.h
+++ b/scribus/ui/nodeeditpalette.h
@@ -17,6 +17,7 @@ for which a new license (GPL+exception) is in place.
 #include <QRadioButton>
 #include <QGridLayout>
 #include <QVBoxLayout>
+#include <QHBoxLayout>
 #include <QCloseEvent>
 
 class QEvent;
@@ -138,8 +139,8 @@ protected:
 
 	QVBoxLayout *vboxLayout { nullptr };
 	QVBoxLayout *vboxLayout1 { nullptr };
+	QHBoxLayout *hboxLayout { nullptr };
 	QGridLayout *gridLayout { nullptr };
-	QGridLayout *gridLayout1 { nullptr };
 	QGridLayout *gridLayout2 { nullptr };
 
 	ScribusDoc *m_doc { nullptr };
-- 
2.27.0

bubu

2021-04-05 09:50

reporter   ~0049075

Last patch (B3) is applicable. I ask a review for it. Thank you.

cbradney

2021-04-07 20:59

administrator   ~0049082

Made some changes post commit to return to 4x4 top grid and avoid resize possibility.

jghali

2021-04-07 22:30

administrator   ~0049083

Rationale for going back to the 4x4 grid: the tool buttons in each of these lines of widgets have related functions. So they should be kept in their lines so that user understands their relations.

bubu

2021-04-07 22:45

reporter   ~0049084

Thank you for reviewing my work and for corrections :-). I understood the intention with 4×4 grid. Thanks.
In this case I suggest the attached small fix to shrink a little bit the palette.
0001-Small-fix.patch (1,496 bytes)   
From 2e5e600544dc518062a857acd67bbb094673ca70 Mon Sep 17 00:00:00 2001
Message-Id: <2e5e600544dc518062a857acd67bbb094673ca70.1617835340.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Thu, 8 Apr 2021 00:41:58 +0200
Subject: [PATCH] Small fix

---
 scribus/ui/nodeeditpalette.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scribus/ui/nodeeditpalette.cpp b/scribus/ui/nodeeditpalette.cpp
index 86639efca..26eaf5a2a 100644
--- a/scribus/ui/nodeeditpalette.cpp
+++ b/scribus/ui/nodeeditpalette.cpp
@@ -244,7 +244,7 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	gridLayout3->addWidget(TextLabel1, 0, 0, 1, 1);
 
 	XSpin = new ScrSpinBox( 0, 16777215, this, 2 );
-	XSpin->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed));
+	XSpin->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
 	XSpin->setEnabled(false);
 	gridLayout3->addWidget(XSpin, 0, 1, 1, 1);
 
@@ -252,7 +252,7 @@ NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase(parent, "nodePalette
 	gridLayout3->addWidget(TextLabel2, 1, 0, 1, 1);
 
 	YSpin = new ScrSpinBox( 0, 16777215, this, 2 );
-	YSpin->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed));
+	YSpin->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
 	YSpin->setEnabled(false);
 	gridLayout3->addWidget(YSpin, 1, 1, 1, 1);
 	vboxLayout->addLayout(gridLayout3);
-- 
2.27.0

0001-Small-fix.patch (1,496 bytes)   
smallfix.gif (34,918 bytes)   
smallfix.gif (34,918 bytes)   

Issue History

Date Modified Username Field Change
2021-02-07 18:55 bubu New Issue
2021-02-07 18:55 bubu File Added: 0001-Update-Layout-for-Node-Editor-A.patch
2021-02-07 18:55 bubu File Added: node_editor-A.gif
2021-02-07 18:55 bubu File Added: 0001-Update-Layout-for-Node-Editor-B.patch
2021-02-07 18:55 bubu File Added: node_editor-B.gif
2021-02-09 04:30 PeterBenedek Relationship added child of 0013906
2021-02-19 18:28 bubu Note Added: 0048863
2021-03-06 10:40 bubu File Added: 0001-Update-Layout-for-Node-Editor-A-2.patch
2021-03-06 10:40 bubu File Added: 0001-Update-Layout-for-Node-Editor-B-2.patch
2021-03-06 10:40 bubu Note Added: 0048915
2021-03-15 11:53 bubu Note Added: 0048935
2021-03-15 11:53 bubu File Added: 0001-Update-Layout-for-Node-Editor-B3.patch
2021-03-15 11:53 bubu File Added: 0001-Update-Layout-for-Node-Editor-B3.gif
2021-04-05 09:50 bubu Note Added: 0049075
2021-04-07 20:27 cbradney Assigned To => cbradney
2021-04-07 20:27 cbradney Status new => resolved
2021-04-07 20:27 cbradney Resolution open => fixed
2021-04-07 20:27 cbradney Fixed in Version => 1.5.7.svn
2021-04-07 20:59 cbradney Note Added: 0049082
2021-04-07 22:30 jghali Note Added: 0049083
2021-04-07 22:45 bubu Note Added: 0049084
2021-04-07 22:45 bubu File Added: 0001-Small-fix.patch
2021-04-07 22:45 bubu File Added: smallfix.gif
2021-04-15 20:37 cbradney Status resolved => closed