View Issue Details

IDProjectCategoryView StatusLast Update
0016402ScribusUser Interfacepublic2021-01-04 21:23
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.5.7.svn 
Target VersionFixed in Version1.5.7.svn 
Summary0016402: Update margins for Preflight Verifier, Colors and Fills and Print/Output preview dialogs
DescriptionI do not like to propose "bigger" interfaces, but this time i propose to use standard 9px margin and 6px spacing even if we got bigger dialogs. Consistency is important. There is nothing else, just margins.

This patch affects 5 interfaces:
- Preflight Verifier
- Colors and Fills
- Print preview
- Output preview PDF
- Output preview PostScript

I think these changes are trivial, but I collect them in one patch because it produce bigger interfaces unlike my previous patches.

Please review the patch. Thanks.

3/5 part of 0016383. This patch overwrites that proposal.
TagsNo tags attached.
PatchNo

Relationships

related to 0016383 closedjghali [Patch] Unify margins for dockable interfaces and some modal windows 
child of 0013906 acknowledged Metabug: UI enhancement proposals (1.5.x.svn) 

Activities

bubu

2021-01-02 13:37

reporter  

bigger_dialogs.diff (7,942 bytes)
diff --git a/scribus/ui/checkDocument.cpp b/scribus/ui/checkDocument.cpp
index bacd3e1dc5b00d851560bb987848517cff0a925b..d8f46e1add035812371aea1cd3d6298b025d9dcf 100644
--- a/scribus/ui/checkDocument.cpp
+++ b/scribus/ui/checkDocument.cpp
@@ -46,12 +46,12 @@ CheckDocument::CheckDocument( QWidget* parent, bool modal )
 	iconSetChange();
 
 	checkDocumentLayout = new QVBoxLayout( this );
-	checkDocumentLayout->setMargin(5);
-	checkDocumentLayout->setSpacing(5);
+	checkDocumentLayout->setContentsMargins(9, 9, 9, 9);
+	checkDocumentLayout->setSpacing(6);
 
 	layout1 = new QHBoxLayout;
-	layout1->setMargin(0);
-	layout1->setSpacing(5);
+	layout1->setContentsMargins(0, 0, 0, 0);
+	layout1->setSpacing(6);
 	textLabel1 = new QLabel( this );
 	layout1->addWidget( textLabel1 );
 	curCheckProfile = new QComboBox( this );
@@ -66,8 +66,8 @@ CheckDocument::CheckDocument( QWidget* parent, bool modal )
 	checkDocumentLayout->addWidget( reportDisplay );
 
 	layout2 = new QHBoxLayout;
-	layout2->setMargin(0);
-	layout2->setSpacing(5);
+	layout2->setContentsMargins(0, 0, 0, 0);
+	layout2->setSpacing(6);
 	reScan = new QPushButton(this );
 	layout2->addWidget( reScan );
 	QSpacerItem* spacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
diff --git a/scribus/ui/colorsandfillsbase.ui b/scribus/ui/colorsandfillsbase.ui
index af6a0efd93dd88f6c80ba4df7588ff731054376c..b6adac9e5d9400d71d209e4ce12e1893831f8f80 100644
--- a/scribus/ui/colorsandfillsbase.ui
+++ b/scribus/ui/colorsandfillsbase.ui
@@ -20,21 +20,6 @@
    <bool>true</bool>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
-   <property name="spacing">
-    <number>5</number>
-   </property>
-   <property name="leftMargin">
-    <number>5</number>
-   </property>
-   <property name="topMargin">
-    <number>5</number>
-   </property>
-   <property name="rightMargin">
-    <number>5</number>
-   </property>
-   <property name="bottomMargin">
-    <number>5</number>
-   </property>
    <item>
     <widget class="QTreeWidget" name="dataTree">
      <property name="toolTip">
@@ -131,21 +116,6 @@ p, li { white-space: pre-wrap; }
         <string>Color Sets</string>
        </property>
        <layout class="QVBoxLayout" name="verticalLayout">
-        <property name="spacing">
-         <number>5</number>
-        </property>
-        <property name="leftMargin">
-         <number>5</number>
-        </property>
-        <property name="topMargin">
-         <number>5</number>
-        </property>
-        <property name="rightMargin">
-         <number>5</number>
-        </property>
-        <property name="bottomMargin">
-         <number>5</number>
-        </property>
         <item>
          <widget class="QLabel" name="label">
           <property name="text">
diff --git a/scribus/ui/outputpreview_pdf.ui b/scribus/ui/outputpreview_pdf.ui
index 1e34d0d8b1c1623feed7a37aba9f08c5cce59c00..24bc03247221f845590edd304d6a7a01d5ff054c 100644
--- a/scribus/ui/outputpreview_pdf.ui
+++ b/scribus/ui/outputpreview_pdf.ui
@@ -103,21 +103,6 @@
       <string>Display Settings</string>
      </property>
      <layout class="QVBoxLayout" name="verticalLayout_3">
-      <property name="spacing">
-       <number>5</number>
-      </property>
-      <property name="leftMargin">
-       <number>5</number>
-      </property>
-      <property name="topMargin">
-       <number>5</number>
-      </property>
-      <property name="rightMargin">
-       <number>5</number>
-      </property>
-      <property name="bottomMargin">
-       <number>5</number>
-      </property>
       <item>
        <widget class="QCheckBox" name="antiAliasing">
         <property name="toolTip">
diff --git a/scribus/ui/outputpreview_ps.ui b/scribus/ui/outputpreview_ps.ui
index b8b9605aad204dc2928b1cebad08cdf348296168..940d9b17d30d976157438467aefaab239043722f 100644
--- a/scribus/ui/outputpreview_ps.ui
+++ b/scribus/ui/outputpreview_ps.ui
@@ -108,21 +108,6 @@
       <string>Display Settings</string>
      </property>
      <layout class="QVBoxLayout" name="verticalLayout_3">
-      <property name="spacing">
-       <number>5</number>
-      </property>
-      <property name="leftMargin">
-       <number>5</number>
-      </property>
-      <property name="topMargin">
-       <number>5</number>
-      </property>
-      <property name="rightMargin">
-       <number>5</number>
-      </property>
-      <property name="bottomMargin">
-       <number>5</number>
-      </property>
       <item>
        <widget class="QCheckBox" name="antiAliasing">
         <property name="toolTip">
diff --git a/scribus/ui/outputpreviewbase.ui b/scribus/ui/outputpreviewbase.ui
index 3cb1a6b32dc7575f45b426de4d83e2cc3de2459c..2e3cba175998ab2e0ceb1cb287eccada65e3d0c6 100644
--- a/scribus/ui/outputpreviewbase.ui
+++ b/scribus/ui/outputpreviewbase.ui
@@ -14,21 +14,6 @@
    <string>Dialog</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
-   <property name="spacing">
-    <number>0</number>
-   </property>
-   <property name="leftMargin">
-    <number>0</number>
-   </property>
-   <property name="topMargin">
-    <number>0</number>
-   </property>
-   <property name="rightMargin">
-    <number>0</number>
-   </property>
-   <property name="bottomMargin">
-    <number>0</number>
-   </property>
    <item>
     <layout class="QHBoxLayout" name="topHLayout">
      <item>
diff --git a/scribus/ui/printpreviewbase.ui b/scribus/ui/printpreviewbase.ui
index 561ac08f2fa04d4277c15b6fe10d6b1241f2565d..ae37f3ce19e99e8c5dc035abd9e55444634e1f17 100644
--- a/scribus/ui/printpreviewbase.ui
+++ b/scribus/ui/printpreviewbase.ui
@@ -14,21 +14,6 @@
    <string>Print Preview</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
-   <property name="spacing">
-    <number>0</number>
-   </property>
-   <property name="leftMargin">
-    <number>0</number>
-   </property>
-   <property name="topMargin">
-    <number>0</number>
-   </property>
-   <property name="rightMargin">
-    <number>0</number>
-   </property>
-   <property name="bottomMargin">
-    <number>0</number>
-   </property>
    <item>
     <layout class="QHBoxLayout" name="topHLayout">
      <item>
@@ -83,21 +68,6 @@
              <string>Preview Settings</string>
             </property>
             <layout class="QVBoxLayout" name="verticalLayout_2">
-             <property name="spacing">
-              <number>5</number>
-             </property>
-             <property name="leftMargin">
-              <number>5</number>
-             </property>
-             <property name="topMargin">
-              <number>5</number>
-             </property>
-             <property name="rightMargin">
-              <number>5</number>
-             </property>
-             <property name="bottomMargin">
-              <number>5</number>
-             </property>
              <item>
               <widget class="PrintLanguageCombo" name="printLanguageCombo"/>
              </item>
@@ -159,21 +129,6 @@
              <string>Display Settings</string>
             </property>
             <layout class="QVBoxLayout" name="verticalLayout_3">
-             <property name="spacing">
-              <number>5</number>
-             </property>
-             <property name="leftMargin">
-              <number>5</number>
-             </property>
-             <property name="topMargin">
-              <number>5</number>
-             </property>
-             <property name="rightMargin">
-              <number>5</number>
-             </property>
-             <property name="bottomMargin">
-              <number>5</number>
-             </property>
              <item>
               <widget class="QCheckBox" name="antiAliasing">
                <property name="text">
bigger_dialogs.diff (7,942 bytes)
preflight_verifier.gif (24,747 bytes)
preflight_verifier.gif (24,747 bytes)
color_and_fills.gif (43,732 bytes)
color_and_fills.gif (43,732 bytes)
print_preview.gif (82,190 bytes)
print_preview.gif (82,190 bytes)
output_preview_pdf.gif (85,464 bytes)
output_preview_pdf.gif (85,464 bytes)
output_preview_ps.gif (83,515 bytes)
output_preview_ps.gif (83,515 bytes)

jghali

2021-01-03 00:09

administrator   ~0048617

After patching, in the Print Preview and Output Preview dialogs, the space between the Close/Print/Export buttons and the bottom of the dialog looks too important. In this case I would reduce the bottom margin of the top layout from 9 to 6.

bubu

2021-01-03 13:24

reporter   ~0048621

@jghali, thanks for accurate reviewing. I investigated the topic a little bit and I found that I made a mistake. I assumed that Qt has 9 px margin for windows too, but no, the default margin for windows is 11 px: “The default margin most Qt styles specify is 9 for child widgets and 11 for windows.” (https://doc.qt.io/qt-5/qboxlayout.html). Sorry, this is my fault.

I checked the current layouts pixel by pixel and I found that in this case Preflight Verifier has 9 px window margin because it is set by C++ code, Colors and Fills + Print/Output preview dialogs have 11 px window margin because those are set by .ui files and margins are not explicitly defined. So you have right, that distance is too big, it is not 9 px but also 11 px.

I have to review my all patches submitted last month :-(. I will do that. Please help me only to define the used margins in Scribus:

- Margin for dock palettes: 3 px.
- Default spacing: 6 px
- Default margin for internal child widgets: 9 px
- Default margin for windows/dialogs: 9 px or 11 px? Please decide. I prefer 9 px, but if you want to use Qt’s default 11 px, I’m not against it.

Are these correct? Is there any case/value should be I pay attention?

jghali

2021-01-04 11:40

administrator   ~0048623

>> - Default margin for windows/dialogs: 9 px or 11 px? Please decide. I prefer 9 px, but if you want to use Qt’s default 11 px, I’m not against it.

I am fine with 9px.

bubu

2021-01-04 20:59

reporter   ~0048627

@jghali, thank you for the answer. Here is the corrected patch. Window margins are 9px. Please review it.

bigger_dialogs2.diff (8,659 bytes)
diff --git a/scribus/ui/checkDocument.cpp b/scribus/ui/checkDocument.cpp
index bacd3e1dc5b00d851560bb987848517cff0a925b..d8f46e1add035812371aea1cd3d6298b025d9dcf 100644
--- a/scribus/ui/checkDocument.cpp
+++ b/scribus/ui/checkDocument.cpp
@@ -46,12 +46,12 @@ CheckDocument::CheckDocument( QWidget* parent, bool modal )
 	iconSetChange();
 
 	checkDocumentLayout = new QVBoxLayout( this );
-	checkDocumentLayout->setMargin(5);
-	checkDocumentLayout->setSpacing(5);
+	checkDocumentLayout->setContentsMargins(9, 9, 9, 9);
+	checkDocumentLayout->setSpacing(6);
 
 	layout1 = new QHBoxLayout;
-	layout1->setMargin(0);
-	layout1->setSpacing(5);
+	layout1->setContentsMargins(0, 0, 0, 0);
+	layout1->setSpacing(6);
 	textLabel1 = new QLabel( this );
 	layout1->addWidget( textLabel1 );
 	curCheckProfile = new QComboBox( this );
@@ -66,8 +66,8 @@ CheckDocument::CheckDocument( QWidget* parent, bool modal )
 	checkDocumentLayout->addWidget( reportDisplay );
 
 	layout2 = new QHBoxLayout;
-	layout2->setMargin(0);
-	layout2->setSpacing(5);
+	layout2->setContentsMargins(0, 0, 0, 0);
+	layout2->setSpacing(6);
 	reScan = new QPushButton(this );
 	layout2->addWidget( reScan );
 	QSpacerItem* spacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
diff --git a/scribus/ui/colorsandfillsbase.ui b/scribus/ui/colorsandfillsbase.ui
index af6a0efd93dd88f6c80ba4df7588ff731054376c..e037003949080076b91cac833cf704a9e6d16802 100644
--- a/scribus/ui/colorsandfillsbase.ui
+++ b/scribus/ui/colorsandfillsbase.ui
@@ -20,20 +20,17 @@
    <bool>true</bool>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
-   <property name="spacing">
-    <number>5</number>
-   </property>
    <property name="leftMargin">
-    <number>5</number>
+    <number>9</number>
    </property>
    <property name="topMargin">
-    <number>5</number>
+    <number>9</number>
    </property>
    <property name="rightMargin">
-    <number>5</number>
+    <number>9</number>
    </property>
    <property name="bottomMargin">
-    <number>5</number>
+    <number>9</number>
    </property>
    <item>
     <widget class="QTreeWidget" name="dataTree">
@@ -131,21 +128,6 @@ p, li { white-space: pre-wrap; }
         <string>Color Sets</string>
        </property>
        <layout class="QVBoxLayout" name="verticalLayout">
-        <property name="spacing">
-         <number>5</number>
-        </property>
-        <property name="leftMargin">
-         <number>5</number>
-        </property>
-        <property name="topMargin">
-         <number>5</number>
-        </property>
-        <property name="rightMargin">
-         <number>5</number>
-        </property>
-        <property name="bottomMargin">
-         <number>5</number>
-        </property>
         <item>
          <widget class="QLabel" name="label">
           <property name="text">
diff --git a/scribus/ui/outputpreview_pdf.ui b/scribus/ui/outputpreview_pdf.ui
index 1e34d0d8b1c1623feed7a37aba9f08c5cce59c00..24bc03247221f845590edd304d6a7a01d5ff054c 100644
--- a/scribus/ui/outputpreview_pdf.ui
+++ b/scribus/ui/outputpreview_pdf.ui
@@ -103,21 +103,6 @@
       <string>Display Settings</string>
      </property>
      <layout class="QVBoxLayout" name="verticalLayout_3">
-      <property name="spacing">
-       <number>5</number>
-      </property>
-      <property name="leftMargin">
-       <number>5</number>
-      </property>
-      <property name="topMargin">
-       <number>5</number>
-      </property>
-      <property name="rightMargin">
-       <number>5</number>
-      </property>
-      <property name="bottomMargin">
-       <number>5</number>
-      </property>
       <item>
        <widget class="QCheckBox" name="antiAliasing">
         <property name="toolTip">
diff --git a/scribus/ui/outputpreview_ps.ui b/scribus/ui/outputpreview_ps.ui
index b8b9605aad204dc2928b1cebad08cdf348296168..940d9b17d30d976157438467aefaab239043722f 100644
--- a/scribus/ui/outputpreview_ps.ui
+++ b/scribus/ui/outputpreview_ps.ui
@@ -108,21 +108,6 @@
       <string>Display Settings</string>
      </property>
      <layout class="QVBoxLayout" name="verticalLayout_3">
-      <property name="spacing">
-       <number>5</number>
-      </property>
-      <property name="leftMargin">
-       <number>5</number>
-      </property>
-      <property name="topMargin">
-       <number>5</number>
-      </property>
-      <property name="rightMargin">
-       <number>5</number>
-      </property>
-      <property name="bottomMargin">
-       <number>5</number>
-      </property>
       <item>
        <widget class="QCheckBox" name="antiAliasing">
         <property name="toolTip">
diff --git a/scribus/ui/outputpreviewbase.ui b/scribus/ui/outputpreviewbase.ui
index 3cb1a6b32dc7575f45b426de4d83e2cc3de2459c..55cb57f90eb1d7598b767b754c69d1a3eccde89c 100644
--- a/scribus/ui/outputpreviewbase.ui
+++ b/scribus/ui/outputpreviewbase.ui
@@ -14,20 +14,17 @@
    <string>Dialog</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
-   <property name="spacing">
-    <number>0</number>
-   </property>
    <property name="leftMargin">
-    <number>0</number>
+    <number>9</number>
    </property>
    <property name="topMargin">
-    <number>0</number>
+    <number>9</number>
    </property>
    <property name="rightMargin">
-    <number>0</number>
+    <number>9</number>
    </property>
    <property name="bottomMargin">
-    <number>0</number>
+    <number>9</number>
    </property>
    <item>
     <layout class="QHBoxLayout" name="topHLayout">
@@ -84,9 +81,6 @@
        <property name="text">
         <string>Scaling:</string>
        </property>
-       <property name="margin">
-        <number>6</number>
-       </property>
       </widget>
      </item>
      <item>
diff --git a/scribus/ui/printpreviewbase.ui b/scribus/ui/printpreviewbase.ui
index 561ac08f2fa04d4277c15b6fe10d6b1241f2565d..291e8238f1004a4aaa9eb5afda0a6630aceef692 100644
--- a/scribus/ui/printpreviewbase.ui
+++ b/scribus/ui/printpreviewbase.ui
@@ -14,20 +14,17 @@
    <string>Print Preview</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
-   <property name="spacing">
-    <number>0</number>
-   </property>
    <property name="leftMargin">
-    <number>0</number>
+    <number>9</number>
    </property>
    <property name="topMargin">
-    <number>0</number>
+    <number>9</number>
    </property>
    <property name="rightMargin">
-    <number>0</number>
+    <number>9</number>
    </property>
    <property name="bottomMargin">
-    <number>0</number>
+    <number>9</number>
    </property>
    <item>
     <layout class="QHBoxLayout" name="topHLayout">
@@ -83,21 +80,6 @@
              <string>Preview Settings</string>
             </property>
             <layout class="QVBoxLayout" name="verticalLayout_2">
-             <property name="spacing">
-              <number>5</number>
-             </property>
-             <property name="leftMargin">
-              <number>5</number>
-             </property>
-             <property name="topMargin">
-              <number>5</number>
-             </property>
-             <property name="rightMargin">
-              <number>5</number>
-             </property>
-             <property name="bottomMargin">
-              <number>5</number>
-             </property>
              <item>
               <widget class="PrintLanguageCombo" name="printLanguageCombo"/>
              </item>
@@ -159,21 +141,6 @@
              <string>Display Settings</string>
             </property>
             <layout class="QVBoxLayout" name="verticalLayout_3">
-             <property name="spacing">
-              <number>5</number>
-             </property>
-             <property name="leftMargin">
-              <number>5</number>
-             </property>
-             <property name="topMargin">
-              <number>5</number>
-             </property>
-             <property name="rightMargin">
-              <number>5</number>
-             </property>
-             <property name="bottomMargin">
-              <number>5</number>
-             </property>
              <item>
               <widget class="QCheckBox" name="antiAliasing">
                <property name="text">
@@ -278,9 +245,6 @@
        <property name="text">
         <string>Scaling:</string>
        </property>
-       <property name="margin">
-        <number>6</number>
-       </property>
       </widget>
      </item>
      <item>
bigger_dialogs2.diff (8,659 bytes)
Colors and Fills.png (44,099 bytes)
Colors and Fills.png (44,099 bytes)
Output Preview, PDF.png (54,645 bytes)
Output Preview, PDF.png (54,645 bytes)
Output Preview, PS.png (57,561 bytes)
Output Preview, PS.png (57,561 bytes)
Print Preview.png (59,127 bytes)
Print Preview.png (59,127 bytes)

jghali

2021-01-04 21:23

administrator   ~0048628

Applied, thanks!

Issue History

Date Modified Username Field Change
2021-01-02 13:37 bubu New Issue
2021-01-02 13:37 bubu File Added: bigger_dialogs.diff
2021-01-02 13:37 bubu File Added: preflight_verifier.gif
2021-01-02 13:37 bubu File Added: color_and_fills.gif
2021-01-02 13:37 bubu File Added: print_preview.gif
2021-01-02 13:37 bubu File Added: output_preview_pdf.gif
2021-01-02 13:37 bubu File Added: output_preview_ps.gif
2021-01-02 15:55 PeterBenedek Relationship added child of 0013906
2021-01-02 15:55 PeterBenedek Relationship added related to 0016383
2021-01-03 00:09 jghali Note Added: 0048617
2021-01-03 13:24 bubu Note Added: 0048621
2021-01-04 11:40 jghali Note Added: 0048623
2021-01-04 20:59 bubu File Added: bigger_dialogs2.diff
2021-01-04 20:59 bubu File Added: Colors and Fills.png
2021-01-04 20:59 bubu File Added: Output Preview, PDF.png
2021-01-04 20:59 bubu File Added: Output Preview, PS.png
2021-01-04 20:59 bubu File Added: Print Preview.png
2021-01-04 20:59 bubu Note Added: 0048627
2021-01-04 21:23 jghali Assigned To => jghali
2021-01-04 21:23 jghali Status new => resolved
2021-01-04 21:23 jghali Resolution open => fixed
2021-01-04 21:23 jghali Fixed in Version => 1.5.7.svn
2021-01-04 21:23 jghali Note Added: 0048628