View Issue Details

IDProjectCategoryView StatusLast Update
0016482ScribusUser Interfacepublic2021-03-21 14:43
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.7.svn 
Fixed in Version1.5.7.svn 
Summary0016482: Unify margins and spacing for dialogs, set 10
DescriptionI propose a new set of trivial margin/spacing adjustment for dialogs.

Comments:
- scgtplugin.cpp → I cannot attach a screenshot :-(.

Please review. Thanks.
TagsNo tags attached.
PatchNo

Relationships

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

Activities

bubu

2021-02-18 22:16

reporter  

0001-Unify-margins-and-spacing-for-dialogs-set-10.patch (11,661 bytes)   
From 5b011f8e931e37d9ffc007604adb510c44786f5a Mon Sep 17 00:00:00 2001
Message-Id: <5b011f8e931e37d9ffc007604adb510c44786f5a.1613686541.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Thu, 18 Feb 2021 23:15:27 +0100
Subject: [PATCH] Unify margins and spacing for dialogs, set 10

---
 scribus/plugins/gettext/csvim/csvdia.cpp      | 20 ++++++-------
 scribus/plugins/gettext/sxwim/sxwdia.cpp      | 24 ++++++++--------
 scribus/plugins/gettext/textfilter/tfdia.cpp  | 28 +++++++++----------
 .../plugins/gettext/textfilter/tffilter.cpp   | 16 +++++------
 .../plugins/saveastemplateplugin/satdialog.ui | 12 ++++++++
 scribus/scgtplugin.cpp                        |  2 +-
 scribus/ui/missing.cpp                        |  8 +++---
 7 files changed, 61 insertions(+), 49 deletions(-)

diff --git a/scribus/plugins/gettext/csvim/csvdia.cpp b/scribus/plugins/gettext/csvim/csvdia.cpp
index d715ff179..e425c614a 100644
--- a/scribus/plugins/gettext/csvim/csvdia.cpp
+++ b/scribus/plugins/gettext/csvim/csvdia.cpp
@@ -28,12 +28,12 @@ CsvDialog::CsvDialog() : QDialog(nullptr)
 	setWindowIcon(QIcon(IconManager::instance().loadIcon("AppIcon.png")));
 
 	QBoxLayout* layout = new QVBoxLayout(this);
-	layout->setMargin(0);
-	layout->setSpacing(0);
+	layout->setContentsMargins(9, 9, 9, 9);
+	layout->setSpacing(6);
 
 	QBoxLayout* flayout = new QHBoxLayout;
-	flayout->setMargin(5);
-	flayout->setSpacing(5);
+	flayout->setContentsMargins(0, 0, 0, 0);
+	flayout->setSpacing(6);
 	QLabel* fdlabel = new QLabel( tr("Field delimiter:"), this);
 	fdlabel->setMinimumWidth(120);
 	flayout->addWidget(fdlabel,1);
@@ -48,8 +48,8 @@ CsvDialog::CsvDialog() : QDialog(nullptr)
 	layout->addLayout(flayout);
 
 	QBoxLayout* vlayout = new QHBoxLayout;
-	vlayout->setMargin(5);
-	vlayout->setSpacing(5);
+	vlayout->setContentsMargins(0, 0, 0, 0);
+	vlayout->setSpacing(6);
 	QLabel* vdlabel = new QLabel( tr("Value delimiter:"), this);
 	vdlabel->setMinimumWidth(120);
 	vlayout->addWidget(vdlabel,1);
@@ -63,15 +63,15 @@ CsvDialog::CsvDialog() : QDialog(nullptr)
 	layout->addLayout(vlayout);
 
 	QBoxLayout* hlayout = new QHBoxLayout;
-	hlayout->setMargin(5);
-	hlayout->setSpacing(5);
+	hlayout->setContentsMargins(0, 0, 0, 0);
+	hlayout->setSpacing(6);
 	headerCheck = new QCheckBox( tr("First row is a header"), this);
 	hlayout->addWidget(headerCheck);
 	layout->addLayout(hlayout);
 
 	QBoxLayout* blayout = new QHBoxLayout;
-	blayout->setMargin(5);
-	blayout->setSpacing(5);
+	blayout->setContentsMargins(0, 0, 0, 0);
+	blayout->setSpacing(6);
 	blayout->addStretch(10);
 	okButton = new QPushButton( tr("OK"), this);
 	blayout->addWidget(okButton);
diff --git a/scribus/plugins/gettext/sxwim/sxwdia.cpp b/scribus/plugins/gettext/sxwim/sxwdia.cpp
index 23bfb645d..cc3d5d265 100644
--- a/scribus/plugins/gettext/sxwim/sxwdia.cpp
+++ b/scribus/plugins/gettext/sxwim/sxwdia.cpp
@@ -24,12 +24,12 @@ SxwDialog::SxwDialog(bool update, bool prefix, bool pack) : QDialog(nullptr)
 	setWindowTitle( tr("OpenOffice.org Writer Importer Options"));
 
 	QBoxLayout* layout = new QVBoxLayout(this);
-	layout->setMargin(0);
-	layout->setSpacing(0);
+	layout->setContentsMargins(9, 9, 9, 9);
+	layout->setSpacing(6);
 
 	QBoxLayout* hlayout = new QHBoxLayout;
-	hlayout->setMargin(5);
-	hlayout->setSpacing(5);
+	hlayout->setContentsMargins(0, 0, 0, 0);
+	hlayout->setSpacing(6);
 	updateCheck = new QCheckBox( tr("Overwrite Paragraph Styles"), this);
 	updateCheck->setChecked(update);
 	updateCheck->setToolTip( "<qt>" + tr("Enabling this will overwrite existing styles in the current Scribus document") + "</qt>");
@@ -37,8 +37,8 @@ SxwDialog::SxwDialog(bool update, bool prefix, bool pack) : QDialog(nullptr)
 	layout->addLayout(hlayout);
 	
 	QBoxLayout* palayout = new QHBoxLayout;
-	palayout->setMargin(5);
-	palayout->setSpacing(5);
+	palayout->setContentsMargins(0, 0, 0, 0);
+	palayout->setSpacing(6);
 	packCheck = new QCheckBox( tr("Merge Paragraph Styles"), this);
 	packCheck->setChecked(pack);
 	packCheck->setToolTip( "<qt>" + tr("Merge paragraph styles by attributes. This will result in fewer similar paragraph styles, will retain style attributes, even if the original document's styles are named differently.") +"</qt>");
@@ -46,8 +46,8 @@ SxwDialog::SxwDialog(bool update, bool prefix, bool pack) : QDialog(nullptr)
 	layout->addLayout(palayout);
 
 	QBoxLayout* playout = new QHBoxLayout;
-	playout->setMargin(5);
-	playout->setSpacing(5);
+	playout->setContentsMargins(0, 0, 0, 0);
+	playout->setSpacing(6);
 	prefixCheck = new QCheckBox( tr("Use document name as a prefix for paragraph styles"), this);
 	prefixCheck->setChecked(prefix);
 	prefixCheck->setToolTip( "<qt>" + tr("Prepend the document name to the paragraph style name in Scribus.") +"</qt>");
@@ -55,8 +55,8 @@ SxwDialog::SxwDialog(bool update, bool prefix, bool pack) : QDialog(nullptr)
 	layout->addLayout(playout);
 
 	QBoxLayout* dlayout = new QHBoxLayout;
-	dlayout->setMargin(5);
-	dlayout->setSpacing(5);
+	dlayout->setContentsMargins(0, 0, 0, 0);
+	dlayout->setSpacing(6);
 	doNotAskCheck = new QCheckBox( tr("Do not ask again"), this);
 	doNotAskCheck->setChecked(false);
 	doNotAskCheck->setToolTip( "<qt>" + tr("Make these settings the default and do not prompt again when importing an OpenOffice.org 1.x document") +"</qt>");
@@ -65,8 +65,8 @@ SxwDialog::SxwDialog(bool update, bool prefix, bool pack) : QDialog(nullptr)
 	layout->addLayout(dlayout);
 
 	QBoxLayout* blayout = new QHBoxLayout;
-	blayout->setMargin(5);
-	blayout->setSpacing(5);
+	blayout->setContentsMargins(0, 0, 0, 0);
+	blayout->setSpacing(6);
 	blayout->addStretch(10);
 	okButton = new QPushButton( tr("OK"), this);
 	blayout->addWidget(okButton);
diff --git a/scribus/plugins/gettext/textfilter/tfdia.cpp b/scribus/plugins/gettext/textfilter/tfdia.cpp
index 64d86d90d..fd51bafcf 100644
--- a/scribus/plugins/gettext/textfilter/tfdia.cpp
+++ b/scribus/plugins/gettext/textfilter/tfdia.cpp
@@ -67,12 +67,12 @@ void tfDia::createLayout()
 	currentIndex = 0;
 	
 	layout = new QVBoxLayout(this);
-	layout->setMargin(0);
-	layout->setSpacing(0);
+	layout->setContentsMargins(9, 9, 9, 9);
+	layout->setSpacing(6);
 
 	QBoxLayout* layout1 = new QHBoxLayout;
-	layout1->setMargin(5);
-	layout1->setSpacing(5);
+	layout1->setContentsMargins(0, 0, 0, 0);
+	layout1->setSpacing(6);
 	clearButton = new QPushButton( tr("C&lear"), this);
 	layout1->addWidget(clearButton);
 	layout1->addStretch(10);
@@ -96,8 +96,8 @@ void tfDia::createLayout()
 	layout->addLayout(layout1);
 
 	QBoxLayout* flayout = new QHBoxLayout;
-	flayout->setMargin(0);
-	flayout->setSpacing(0);
+	flayout->setContentsMargins(0, 0, 0, 0);
+	flayout->setSpacing(6);
 	QFrame* f = new QFrame(this);
 	f->setFrameStyle(QFrame::HLine | QFrame::Sunken);
 	flayout->addWidget(f);
@@ -106,8 +106,8 @@ void tfDia::createLayout()
 	
 	qsv = new QScrollArea(this);
 	QVBoxLayout *a1layout = new QVBoxLayout;
-	a1layout->setMargin(5);
-	a1layout->setSpacing(12);
+	a1layout->setContentsMargins(0, 0, 0, 0);
+	a1layout->setSpacing(6);
 	vbox = new QFrame(this);
 	vbox->setFixedWidth(qsv->viewport()->width());
 	qsv->viewport()->resize(width() - 12, vbox->height());
@@ -116,23 +116,23 @@ void tfDia::createLayout()
 	layout->addLayout(a1layout);
 	
 	alayout = new QVBoxLayout(vbox);
-	alayout->setMargin(5);
-	alayout->setSpacing(12);
+	alayout->setContentsMargins(9, 9, 9, 9);
+	alayout->setSpacing(6);
 	
 	createFilter(prefs->getTable("tf_lastUsed"));
 	filters[0]->setRemovable((filters.size() >= 2));
 	
 	QBoxLayout* flayout2 = new QHBoxLayout;
-	flayout2->setMargin(0);
-	flayout2->setSpacing(0);
+	flayout2->setContentsMargins(0, 0, 0, 0);
+	flayout2->setSpacing(6);
 	QFrame* f2 = new QFrame(this);
 	f2->setFrameStyle(QFrame::HLine | QFrame::Sunken);
 	flayout2->addWidget(f2);
 	layout->addLayout(flayout2);
 
 	QBoxLayout* layout2 = new QHBoxLayout;
-	layout2->setMargin(5);
-	layout2->setSpacing(5);
+	layout2->setContentsMargins(0, 0, 0, 0);
+	layout2->setSpacing(6);
 	saveEdit = new QLineEdit(this);
 	saveEdit->setToolTip( tr("Give a name to this filter for saving"));
 	layout2->addWidget(saveEdit, 10);
diff --git a/scribus/plugins/gettext/textfilter/tffilter.cpp b/scribus/plugins/gettext/textfilter/tffilter.cpp
index 1206d1ea1..c71da362d 100644
--- a/scribus/plugins/gettext/textfilter/tffilter.cpp
+++ b/scribus/plugins/gettext/textfilter/tffilter.cpp
@@ -103,8 +103,8 @@ void tfFilter::createWidget()
 	history = prefs->getTable("history");
 
 	QHBoxLayout *layout = new QHBoxLayout(this);
-	layout->setMargin(0);
-	layout->setSpacing(0);
+	layout->setContentsMargins(0, 0, 0, 0);
+	layout->setSpacing(6);
 
 	enableCheck = new QCheckBox(this);
 	enableCheck->setMinimumSize(QSize(25,25));
@@ -116,16 +116,16 @@ void tfFilter::createWidget()
 	layout->addWidget(actionFrame, 0, Qt::AlignTop);
 
 	QBoxLayout* layout2 = new QVBoxLayout(actionFrame);
-	layout2->setMargin(0);
-	layout2->setSpacing(0);
+	layout2->setContentsMargins(0, 0, 0, 0);
+	layout2->setSpacing(6);
 	alayout = new QHBoxLayout();
-	alayout->setMargin(0);
-	alayout->setSpacing(0);
+	alayout->setContentsMargins(0, 0, 0, 0);
+	alayout->setSpacing(6);
 	layout2->addLayout(alayout);
 	layout2->addSpacing(4);
 	blayout = new QHBoxLayout();
-	blayout->setSpacing(0);
-	blayout->setMargin(0);
+	blayout->setSpacing(6);
+	blayout->setContentsMargins(0, 0, 0, 0);
 	layout2->addLayout(blayout);
 
 	currentAction = REMOVE;
diff --git a/scribus/plugins/saveastemplateplugin/satdialog.ui b/scribus/plugins/saveastemplateplugin/satdialog.ui
index 731f754aa..011f59df9 100644
--- a/scribus/plugins/saveastemplateplugin/satdialog.ui
+++ b/scribus/plugins/saveastemplateplugin/satdialog.ui
@@ -14,6 +14,18 @@
    <string>Save as Template</string>
   </property>
   <layout class="QFormLayout" name="formLayout">
+   <property name="leftMargin">
+    <number>9</number>
+   </property>
+   <property name="topMargin">
+    <number>9</number>
+   </property>
+   <property name="rightMargin">
+    <number>9</number>
+   </property>
+   <property name="bottomMargin">
+    <number>9</number>
+   </property>
    <item row="0" column="0">
     <widget class="QLabel" name="label">
      <property name="text">
diff --git a/scribus/scgtplugin.cpp b/scribus/scgtplugin.cpp
index 104996679..a632aabda 100644
--- a/scribus/scgtplugin.cpp
+++ b/scribus/scgtplugin.cpp
@@ -126,7 +126,7 @@ void ScGTFileDialog::customize()
 	m_showOptionsBox->setObjectName("showOptionsBox_");
 
 	QHBoxLayout *layout = new QHBoxLayout;
-	layout->setSpacing(5);
+	layout->setSpacing(6);
 	layout->addWidget(m_appendBox);
 	layout->addWidget(m_showOptionsBox);
 
diff --git a/scribus/ui/missing.cpp b/scribus/ui/missing.cpp
index b4a3fb680..097b0e56b 100644
--- a/scribus/ui/missing.cpp
+++ b/scribus/ui/missing.cpp
@@ -27,11 +27,11 @@ MissingFont::MissingFont( QWidget* parent, const QString& fon, ScribusDoc* doc )
 	setWindowTitle( tr("Missing Font"));
 	setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
 	missingFontLayout = new QHBoxLayout( this );
-	missingFontLayout->setMargin(10);
-	missingFontLayout->setSpacing(0);
+	missingFontLayout->setContentsMargins(9, 9, 9, 9);
+	missingFontLayout->setSpacing(6);
 	missingFontGridLayout = new QGridLayout;
-	missingFontGridLayout->setSpacing( 10 );
-	missingFontGridLayout->setMargin( 0 );
+	missingFontGridLayout->setSpacing(6);
+	missingFontGridLayout->setContentsMargins(0, 0, 0, 0);
 	notInstalledLabel = new QLabel( tr("The Font %1 is not installed.").arg(fon), this );
 	missingFontGridLayout->addWidget( notInstalledLabel, 0, 0, 1, 4 );
 	pixmapLabel = new QLabel( this );
-- 
2.27.0

csv.gif (14,112 bytes)   
csv.gif (14,112 bytes)   
sxw.gif (20,757 bytes)   
sxw.gif (20,757 bytes)   
textfilter.gif (29,455 bytes)   
textfilter.gif (29,455 bytes)   
satdialog.gif (24,509 bytes)   
satdialog.gif (24,509 bytes)   
missing.gif (18,929 bytes)   
missing.gif (18,929 bytes)   

jghali

2021-02-20 17:52

administrator   ~0048865

Applied, thanks!

FirasH

2021-03-21 14:43

reporter   ~0048969

Thanks!
Fixed in 1.5.7.svn (24515)

Issue History

Date Modified Username Field Change
2021-02-18 22:16 bubu New Issue
2021-02-18 22:16 bubu File Added: 0001-Unify-margins-and-spacing-for-dialogs-set-10.patch
2021-02-18 22:16 bubu File Added: csv.gif
2021-02-18 22:16 bubu File Added: sxw.gif
2021-02-18 22:16 bubu File Added: textfilter.gif
2021-02-18 22:16 bubu File Added: satdialog.gif
2021-02-18 22:16 bubu File Added: missing.gif
2021-02-19 13:58 PeterBenedek Relationship added child of 0013906
2021-02-20 17:52 jghali Assigned To => jghali
2021-02-20 17:52 jghali Status new => resolved
2021-02-20 17:52 jghali Resolution open => fixed
2021-02-20 17:52 jghali Fixed in Version => 1.5.7.svn
2021-02-20 17:52 jghali Note Added: 0048865
2021-03-21 14:43 FirasH Status resolved => closed
2021-03-21 14:43 FirasH Note Added: 0048969