View Issue Details

IDProjectCategoryView StatusLast Update
0016392ScribusUser Interfacepublic2020-12-22 01:22
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.5.7.svn 
Target VersionFixed in Version1.5.7.svn 
Summary0016392: Unify margins in Page Properties dialog
DescriptionThis patch is very simple, just set margins and spaces to default values. There is no enclosing layout around the full content therefore the margins around OK-Cancel buttons are tricky.

Please review the attached patch. Thanks.

A question: Would be a hard task to put "Margin Guides" in a simple group box instead of current tab widget? It is very ugly...
TagsNo tags attached.
PatchYes

Activities

bubu

2020-12-16 14:18

reporter  

page_properties.diff (2,134 bytes)
diff --git a/scribus/ui/pagepropertiesdialog.cpp b/scribus/ui/pagepropertiesdialog.cpp
index a49df79d8977450ab8632626877ff03362d1963d..9771ca28c8ffbebed35c1d37a9acaff22132321e 100644
--- a/scribus/ui/pagepropertiesdialog.cpp
+++ b/scribus/ui/pagepropertiesdialog.cpp
@@ -33,15 +33,15 @@ PagePropertiesDialog::PagePropertiesDialog( QWidget* parent, ScribusDoc* doc ) :
 	setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
 	unitRatio = doc->unitRatio();
 	dialogLayout = new QVBoxLayout(this);
-	dialogLayout->setMargin(10);
-	dialogLayout->setSpacing(5);
+	dialogLayout->setContentsMargins(9, 9, 9, 9);
+	dialogLayout->setSpacing(6);
 	
 	dsGroupBox7 = new QGroupBox(this);
 	dsGroupBox7->setTitle( tr( "Page Size" ) );
 	dsGroupBox7Layout = new QGridLayout(dsGroupBox7);
 	dsGroupBox7Layout->setAlignment( Qt::AlignTop );
-	dsGroupBox7Layout->setSpacing( 5 );
-	dsGroupBox7Layout->setMargin( 10 );
+	dsGroupBox7Layout->setSpacing(6);
+	dsGroupBox7Layout->setContentsMargins(9, 9, 9, 9);
 	TextLabel1 = new QLabel( tr( "&Size:" ), dsGroupBox7 );
 	dsGroupBox7Layout->addWidget( TextLabel1, 0, 0, 1, 2 );
 
@@ -121,8 +121,8 @@ PagePropertiesDialog::PagePropertiesDialog( QWidget* parent, ScribusDoc* doc ) :
 	groupMaster = new QGroupBox( this );
 	groupMaster->setTitle( tr( "Other Settings" ) );
 	masterLayout = new QHBoxLayout( groupMaster );
-	masterLayout->setSpacing( 5 );
-	masterLayout->setMargin( 10 );
+	masterLayout->setSpacing(6);
+	masterLayout->setContentsMargins(9, 9, 9, 9);
 	masterPageLabel = new QLabel( groupMaster );
 	masterLayout->addWidget( masterPageLabel );
 	if (!doc->masterPageMode())
@@ -147,8 +147,8 @@ PagePropertiesDialog::PagePropertiesDialog( QWidget* parent, ScribusDoc* doc ) :
 		groupMaster->hide();
 
 	okCancelLayout = new QHBoxLayout;
-	okCancelLayout->setSpacing( 5 );
-	okCancelLayout->setMargin( 0 );
+	okCancelLayout->setSpacing(6);
+	okCancelLayout->setContentsMargins(0, 3, 0, 0);
 	QSpacerItem* spacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
 	okCancelLayout->addItem( spacer );
 	okButton = new QPushButton( CommonStrings::tr_OK, this );
page_properties.diff (2,134 bytes)
page_properties.gif (44,879 bytes)
page_properties.gif (44,879 bytes)

jghali

2020-12-18 11:20

administrator   ~0048589

On Windows, the following line produces too important spacing between the last groupbox and the ok/cancel buttons:
okCancelLayout->setContentsMargins(0, 3, 0, 0);

jghali

2020-12-22 01:22

administrator   ~0048591

I committed the patch, except the last change related to okCancelLayout.

Issue History

Date Modified Username Field Change
2020-12-16 14:18 bubu New Issue
2020-12-16 14:18 bubu File Added: page_properties.diff
2020-12-16 14:18 bubu File Added: page_properties.gif
2020-12-18 11:20 jghali File Added: 16392_page_properties_win_before.png
2020-12-18 11:20 jghali File Added: 16392_page_properties_win_after.png
2020-12-18 11:20 jghali Note Added: 0048589
2020-12-22 01:22 jghali Assigned To => jghali
2020-12-22 01:22 jghali Status new => resolved
2020-12-22 01:22 jghali Resolution open => fixed
2020-12-22 01:22 jghali Fixed in Version => 1.5.7.svn
2020-12-22 01:22 jghali Note Added: 0048591