View Issue Details

IDProjectCategoryView StatusLast Update
0016394ScribusUser Interfacepublic2021-03-21 15:36
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.7.svn 
Fixed in Version1.5.7.svn 
Summary0016394: Update layout for Insert Pages dialog
DescriptionI propose 2 patches for Page > Insert... dialog:

1. First patch is a simple margin/space related patch: use standard 9px margin and 6px spacing in the dialog.
2. Second patch extends it with a small layout update: places Height field to the bottom of Width field. Please see the before-after screenshot.

I prefer 2nd patch.

Please, review them. Thanks.
TagsNo tags attached.
PatchYes

Relationships

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

Activities

bubu

2020-12-16 16:19

reporter   ~0048577

Ups, the attachments...
insert_pages1.diff (2,352 bytes)   
diff --git a/scribus/ui/inspage.cpp b/scribus/ui/inspage.cpp
index 29c1ed38ad066a1228f21f97037815efe4f27e56..486670f1d09520d09a80bdcf6bca1f70ff45a9f1 100644
--- a/scribus/ui/inspage.cpp
+++ b/scribus/ui/inspage.cpp
@@ -33,11 +33,11 @@ InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int
 	setWindowTitle( tr( "Insert Page" ) );
 	setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
 	dialogLayout = new QVBoxLayout(this);
-	dialogLayout->setSpacing( 5 );
-	dialogLayout->setMargin( 5 );
+	dialogLayout->setSpacing(6);
+	dialogLayout->setContentsMargins(9, 9, 9, 9);
 	whereLayout = new QGridLayout();
-	whereLayout->setSpacing( 5 );
-	whereLayout->setMargin( 5 );
+	whereLayout->setSpacing(6);
+	whereLayout->setContentsMargins(0, 0, 0, 0);
 	insCountData = new QSpinBox( this );
 	insCountData->setMinimum(1);
 	insCountData->setMaximum(999);
@@ -71,8 +71,8 @@ InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int
 	masterPageGroup->setTitle( tr( "Master Pages" ) );
 	masterPageLayout = new QGridLayout( masterPageGroup );
 	masterPageLayout->setAlignment( Qt::AlignTop );
-	masterPageLayout->setSpacing( 5 );
-	masterPageLayout->setMargin( 5 );
+	masterPageLayout->setSpacing(6);
+	masterPageLayout->setContentsMargins(9, 9, 9, 9);
 	if (m_doc->pagePositioning() == 0)
 	{
 		QComboBox* pageData = new QComboBox(masterPageGroup);
@@ -226,8 +226,8 @@ InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int
 	dsGroupBox7 = new QGroupBox( this );
 	dsGroupBox7->setTitle( tr( "Page Size" ) );
 	dsGroupBox7Layout = new QGridLayout( dsGroupBox7 );
-	dsGroupBox7Layout->setSpacing( 5 );
-	dsGroupBox7Layout->setMargin( 5 );
+	dsGroupBox7Layout->setSpacing(6);
+	dsGroupBox7Layout->setContentsMargins(9, 9, 9, 9);
 	TextLabel1 = new QLabel( tr( "&Size:" ), dsGroupBox7);
 	dsGroupBox7Layout->addWidget( TextLabel1, 0, 0);
 
@@ -280,8 +280,8 @@ InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int
 	delete ps;
 
 	okCancelLayout = new QHBoxLayout;
-	okCancelLayout->setSpacing( 5 );
-	okCancelLayout->setMargin( 5 );
+	okCancelLayout->setSpacing(6);
+	okCancelLayout->setContentsMargins(0, 3, 0, 0);
 	QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
 	okCancelLayout->addItem( spacer );
 
insert_pages1.diff (2,352 bytes)   
insert_pages1.gif (36,303 bytes)   
insert_pages1.gif (36,303 bytes)   
insert_pages2.diff (3,299 bytes)   
diff --git a/scribus/ui/inspage.cpp b/scribus/ui/inspage.cpp
index 29c1ed38ad066a1228f21f97037815efe4f27e56..71a157222e2d8112466396d09f16d2bf34cc38c9 100644
--- a/scribus/ui/inspage.cpp
+++ b/scribus/ui/inspage.cpp
@@ -33,11 +33,11 @@ InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int
 	setWindowTitle( tr( "Insert Page" ) );
 	setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
 	dialogLayout = new QVBoxLayout(this);
-	dialogLayout->setSpacing( 5 );
-	dialogLayout->setMargin( 5 );
+	dialogLayout->setSpacing(6);
+	dialogLayout->setContentsMargins(9, 9, 9, 9);
 	whereLayout = new QGridLayout();
-	whereLayout->setSpacing( 5 );
-	whereLayout->setMargin( 5 );
+	whereLayout->setSpacing(6);
+	whereLayout->setContentsMargins(0, 0, 0, 0);
 	insCountData = new QSpinBox( this );
 	insCountData->setMinimum(1);
 	insCountData->setMaximum(999);
@@ -71,8 +71,8 @@ InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int
 	masterPageGroup->setTitle( tr( "Master Pages" ) );
 	masterPageLayout = new QGridLayout( masterPageGroup );
 	masterPageLayout->setAlignment( Qt::AlignTop );
-	masterPageLayout->setSpacing( 5 );
-	masterPageLayout->setMargin( 5 );
+	masterPageLayout->setSpacing(6);
+	masterPageLayout->setContentsMargins(9, 9, 9, 9);
 	if (m_doc->pagePositioning() == 0)
 	{
 		QComboBox* pageData = new QComboBox(masterPageGroup);
@@ -226,8 +226,8 @@ InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int
 	dsGroupBox7 = new QGroupBox( this );
 	dsGroupBox7->setTitle( tr( "Page Size" ) );
 	dsGroupBox7Layout = new QGridLayout( dsGroupBox7 );
-	dsGroupBox7Layout->setSpacing( 5 );
-	dsGroupBox7Layout->setMargin( 5 );
+	dsGroupBox7Layout->setSpacing(6);
+	dsGroupBox7Layout->setContentsMargins(9, 9, 9, 9);
 	TextLabel1 = new QLabel( tr( "&Size:" ), dsGroupBox7);
 	dsGroupBox7Layout->addWidget( TextLabel1, 0, 0);
 
@@ -266,12 +266,12 @@ InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int
 	heightSpinBox->setValue(m_doc->pageHeight() * m_doc->unitRatio());
 	heightQLabel = new QLabel( tr( "&Height:" ), dsGroupBox7);
 	heightQLabel->setBuddy(heightSpinBox);
-	dsGroupBox7Layout->addWidget( heightQLabel, 2, 2 );
-	dsGroupBox7Layout->addWidget( heightSpinBox, 2, 3 );
+	dsGroupBox7Layout->addWidget( heightQLabel, 3, 0 );
+	dsGroupBox7Layout->addWidget( heightSpinBox, 3, 1 );
 	moveObjectsCheckBox = new QCheckBox( dsGroupBox7);
 	moveObjectsCheckBox->setText( tr( "Move Objects with their Page" ) );
 	moveObjectsCheckBox->setChecked( true );
-	dsGroupBox7Layout->addWidget( moveObjectsCheckBox, 3, 0, 1, 4 );
+	dsGroupBox7Layout->addWidget( moveObjectsCheckBox, 4, 0, 1, 4 );
 	dialogLayout->addWidget( dsGroupBox7 );
 	dsGroupBox7->setEnabled(false);
 	bool b = (sizeQComboBox->currentText() == CommonStrings::trCustomPageSize);
@@ -280,8 +280,8 @@ InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int
 	delete ps;
 
 	okCancelLayout = new QHBoxLayout;
-	okCancelLayout->setSpacing( 5 );
-	okCancelLayout->setMargin( 5 );
+	okCancelLayout->setSpacing(6);
+	okCancelLayout->setContentsMargins(0, 3, 0, 0);
 	QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
 	okCancelLayout->addItem( spacer );
 
insert_pages2.diff (3,299 bytes)   
insert_pages2.gif (35,410 bytes)   
insert_pages2.gif (35,410 bytes)   

jghali

2020-12-22 23:22

administrator   ~0048597

The team voted unanimously for second proposal too :-)
Applied, thanks!

FirasH

2021-03-21 15:36

developer   ~0049041

Thanks!
Fixed in 1.5.7.svn (24354)

Issue History

Date Modified Username Field Change
2020-12-16 16:18 bubu New Issue
2020-12-16 16:19 bubu File Added: insert_pages1.diff
2020-12-16 16:19 bubu File Added: insert_pages1.gif
2020-12-16 16:19 bubu File Added: insert_pages2.diff
2020-12-16 16:19 bubu File Added: insert_pages2.gif
2020-12-16 16:19 bubu Note Added: 0048577
2020-12-17 08:11 PeterBenedek Relationship added child of 0013906
2020-12-22 23:22 jghali Note Added: 0048597
2020-12-22 23:22 jghali Assigned To => jghali
2020-12-22 23:22 jghali Status new => resolved
2020-12-22 23:22 jghali Resolution open => fixed
2020-12-22 23:22 jghali Fixed in Version => 1.5.7.svn
2021-03-21 15:36 FirasH Status resolved => closed
2021-03-21 15:36 FirasH Note Added: 0049041