View Issue Details

IDProjectCategoryView StatusLast Update
0016472ScribusUser Interfacepublic2021-02-16 20:44
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.5.7.svn 
Target VersionFixed in Version1.5.7.svn 
Summary0016472: Unify margins and spacing for dialogs, set 7
DescriptionI propose a new set of trivial margin/spacing adjustment for dialogs.

In multiprogressdialog.ui there are whitespace changes. Others are trivial.

Please review. Thanks.
TagsNo tags attached.
PatchNo

Relationships

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

Activities

bubu

2021-02-14 20:36

reporter  

0001-Unify-margins-and-spacing-for-dialogs-set-7.patch (11,154 bytes)
From 4a027cd89691744c65d2e7134c2a6ab03ae76b6a Mon Sep 17 00:00:00 2001
Message-Id: <4a027cd89691744c65d2e7134c2a6ab03ae76b6a.1613334787.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Sun, 14 Feb 2021 21:32:43 +0100
Subject: [PATCH] Unify margins and spacing for dialogs, set 7

---
 scribus/ui/buttonicon.cpp         | 20 ++++-----
 scribus/ui/cmykfw.cpp             |  4 +-
 scribus/ui/cxfimportdialogbase.ui | 12 ++++++
 scribus/ui/gtfiledialog.ui        | 12 ++++++
 scribus/ui/multiprogressdialog.ui | 70 +++++++++++++++++--------------
 scribus/ui/osgeditor.ui           | 18 +++++---
 scribus/ui/picstatus.ui           |  2 +-
 scribus/ui/transformdialogbase.ui | 12 ++++++
 8 files changed, 99 insertions(+), 51 deletions(-)

diff --git a/scribus/ui/buttonicon.cpp b/scribus/ui/buttonicon.cpp
index 2b6f98e85..ae0383bf9 100644
--- a/scribus/ui/buttonicon.cpp
+++ b/scribus/ui/buttonicon.cpp
@@ -29,11 +29,11 @@ ButtonIcon::ButtonIcon(QWidget* parent, PageItem* ite) : QDialog( parent )
 	setWindowTitle( tr( "Icon Placement" ) );
 	setWindowIcon(IconManager::instance().loadPixmap("AppIcon.png"));
 	ButtonIconLayout = new QVBoxLayout( this );
-	ButtonIconLayout->setMargin(10);
-	ButtonIconLayout->setSpacing(5);
+	ButtonIconLayout->setContentsMargins(9, 9, 9, 9);
+	ButtonIconLayout->setSpacing(6);
 	Layout1 = new QGridLayout;
-	Layout1->setMargin(0);
-	Layout1->setSpacing(5);
+	Layout1->setContentsMargins(0, 0, 0, 0);
+	Layout1->setSpacing(6);
 	TextLabel1_2 = new QLabel( this );
 	TextLabel1_2->setText( tr( "Layout:" ) );
 	Layout1->addWidget( TextLabel1_2, 0, 0 );
@@ -71,13 +71,13 @@ ButtonIcon::ButtonIcon(QWidget* parent, PageItem* ite) : QDialog( parent )
 	QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
 	ButtonIconLayout->addItem( spacer );
 	Layout5 = new QHBoxLayout;
-	Layout5->setMargin(0);
-	Layout5->setSpacing(5);
+	Layout5->setContentsMargins(0, 0, 0, 0);
+	Layout5->setSpacing(6);
 	QSpacerItem* spacer_2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
 	Layout5->addItem( spacer_2 );
 	Layout3 = new QGridLayout;
-	Layout3->setMargin(0);
-	Layout3->setSpacing(5);
+	Layout3->setContentsMargins(0, 0, 0, 0);
+	Layout3->setSpacing(6);
 	GroupButton = new QGroupBox( this );
 	GroupButton->setMinimumSize( QSize( 150, 150 ) );
 	GroupButton->setMaximumSize( QSize( 150, 150 ) );
@@ -111,8 +111,8 @@ ButtonIcon::ButtonIcon(QWidget* parent, PageItem* ite) : QDialog( parent )
 	QSpacerItem* spacer_4 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
 	ButtonIconLayout->addItem( spacer_4 );
 	Layout4 = new QHBoxLayout;
-	Layout4->setMargin(0);
-	Layout4->setSpacing(5);
+	Layout4->setContentsMargins(0, 0, 0, 0);
+	Layout4->setSpacing(6);
 	OK = new QPushButton( this );
 	OK->setText( tr( "OK" ) );
 	OK->setDefault( true );
diff --git a/scribus/ui/cmykfw.cpp b/scribus/ui/cmykfw.cpp
index 5699baf32..d027bdbc9 100644
--- a/scribus/ui/cmykfw.cpp
+++ b/scribus/ui/cmykfw.cpp
@@ -113,8 +113,8 @@ CMYKChoose::CMYKChoose( QWidget* parent, ScribusDoc* doc, ScColor orig, const QS
 	// We set it in the dialog showEvent().
 	// Swatches->setCurrentComboItem( tr( "Color Map" ));
 
-	slidersLayout->setSpacing(5);
-	slidersLayout->setMargin(0);
+	slidersLayout->setSpacing(6);
+	slidersLayout->setContentsMargins(0, 0, 0, 0);
 
 	CyanSp->setNewUnit(0);
 	CyanSp->setMinimum(0);
diff --git a/scribus/ui/cxfimportdialogbase.ui b/scribus/ui/cxfimportdialogbase.ui
index 72d43b807..09aa1ec87 100644
--- a/scribus/ui/cxfimportdialogbase.ui
+++ b/scribus/ui/cxfimportdialogbase.ui
@@ -14,6 +14,18 @@
    <string>CxF Import</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
+   <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>
     <widget class="QLabel" name="label">
      <property name="text">
diff --git a/scribus/ui/gtfiledialog.ui b/scribus/ui/gtfiledialog.ui
index 07e2b81e5..c16dacdc8 100644
--- a/scribus/ui/gtfiledialog.ui
+++ b/scribus/ui/gtfiledialog.ui
@@ -14,6 +14,18 @@
    <string>Open</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
+   <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" colspan="3">
     <widget class="ScFileWidget" name="fileWidget" native="true"/>
    </item>
diff --git a/scribus/ui/multiprogressdialog.ui b/scribus/ui/multiprogressdialog.ui
index 48b603072..5bbf768b5 100644
--- a/scribus/ui/multiprogressdialog.ui
+++ b/scribus/ui/multiprogressdialog.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>MultiProgressDialog</class>
- <widget class="QDialog" name="MultiProgressDialog" >
-  <property name="geometry" >
+ <widget class="QDialog" name="MultiProgressDialog">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,28 +10,40 @@
     <height>84</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Progress</string>
   </property>
-  <property name="sizeGripEnabled" >
+  <property name="sizeGripEnabled">
    <bool>false</bool>
   </property>
-  <layout class="QVBoxLayout" >
+  <layout class="QVBoxLayout">
+   <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>
-    <layout class="QGridLayout" >
-     <item row="0" column="0" >
-      <widget class="QLabel" name="overallProgressLabel" >
-       <property name="text" >
+    <layout class="QGridLayout">
+     <item row="0" column="0">
+      <widget class="QLabel" name="overallProgressLabel">
+       <property name="text">
         <string>Overall Progress:</string>
        </property>
-       <property name="wordWrap" >
+       <property name="wordWrap">
         <bool>false</bool>
        </property>
       </widget>
      </item>
-     <item row="0" column="1" >
-      <widget class="QProgressBar" name="overallProgressBar" >
-       <property name="value" >
+     <item row="0" column="1">
+      <widget class="QProgressBar" name="overallProgressBar">
+       <property name="value">
         <number>0</number>
        </property>
       </widget>
@@ -38,22 +51,16 @@
     </layout>
    </item>
    <item>
-    <layout class="QHBoxLayout" >
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <property name="margin" >
-      <number>0</number>
-     </property>
+    <layout class="QHBoxLayout">
      <item>
       <spacer>
-       <property name="orientation" >
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeType" >
+       <property name="sizeType">
         <enum>QSizePolicy::Expanding</enum>
        </property>
-       <property name="sizeHint" >
+       <property name="sizeHint">
         <size>
          <width>20</width>
          <height>20</height>
@@ -62,14 +69,14 @@
       </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="buttonCancel" >
-       <property name="text" >
+      <widget class="QPushButton" name="buttonCancel">
+       <property name="text">
         <string>&amp;Cancel</string>
        </property>
-       <property name="shortcut" >
+       <property name="shortcut">
         <string/>
        </property>
-       <property name="autoDefault" >
+       <property name="autoDefault">
         <bool>true</bool>
        </property>
       </widget>
@@ -78,9 +85,8 @@
    </item>
   </layout>
  </widget>
- <layoutdefault spacing="6" margin="11" />
  <includes>
-  <include location="local" >scribusapi.h</include>
+  <include location="local">scribusapi.h</include>
  </includes>
  <resources/>
  <connections>
@@ -90,11 +96,11 @@
    <receiver>MultiProgressDialog</receiver>
    <slot>reject()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
diff --git a/scribus/ui/osgeditor.ui b/scribus/ui/osgeditor.ui
index 1e21acc48..7bcba888d 100644
--- a/scribus/ui/osgeditor.ui
+++ b/scribus/ui/osgeditor.ui
@@ -14,6 +14,18 @@
    <string>3D Properties</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout_3">
+   <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>
     <layout class="QHBoxLayout" name="horizontalLayout_4">
      <item>
@@ -107,9 +119,6 @@
      </item>
      <item>
       <layout class="QVBoxLayout" name="verticalLayout_2">
-       <property name="spacing">
-        <number>5</number>
-       </property>
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout">
          <item>
@@ -140,9 +149,6 @@
           <string>Views</string>
          </property>
          <layout class="QVBoxLayout" name="verticalLayout">
-          <property name="spacing">
-           <number>5</number>
-          </property>
           <item>
            <layout class="QHBoxLayout" name="horizontalLayout_2">
             <item>
diff --git a/scribus/ui/picstatus.ui b/scribus/ui/picstatus.ui
index f02d8e70a..5b51c231b 100644
--- a/scribus/ui/picstatus.ui
+++ b/scribus/ui/picstatus.ui
@@ -53,7 +53,7 @@
       <enum>QListView::Adjust</enum>
      </property>
      <property name="spacing">
-      <number>5</number>
+      <number>6</number>
      </property>
      <property name="viewMode">
       <enum>QListView::IconMode</enum>
diff --git a/scribus/ui/transformdialogbase.ui b/scribus/ui/transformdialogbase.ui
index 9c7337a11..0a08fbd43 100644
--- a/scribus/ui/transformdialogbase.ui
+++ b/scribus/ui/transformdialogbase.ui
@@ -20,6 +20,18 @@
    <string>Transform</string>
   </property>
   <layout class="QVBoxLayout">
+   <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>
     <layout class="QHBoxLayout">
      <item>
-- 
2.27.0

buttonicon.gif (20,577 bytes)
buttonicon.gif (20,577 bytes)
cmykfw.gif (41,831 bytes)
cmykfw.gif (41,831 bytes)
cxfimportdialogbase.gif (23,974 bytes)
cxfimportdialogbase.gif (23,974 bytes)
gtfiledialog.gif (42,387 bytes)
gtfiledialog.gif (42,387 bytes)
multiprogressdialog.gif (20,958 bytes)
multiprogressdialog.gif (20,958 bytes)
osgeditor.gif (51,567 bytes)
osgeditor.gif (51,567 bytes)
picstatus.gif (99,698 bytes)
picstatus.gif (99,698 bytes)
transformdialogbase.gif (32,682 bytes)
transformdialogbase.gif (32,682 bytes)

jghali

2021-02-15 00:54

administrator   ~0048827

Applied, thanks!

Issue History

Date Modified Username Field Change
2021-02-14 20:36 bubu New Issue
2021-02-14 20:36 bubu File Added: 0001-Unify-margins-and-spacing-for-dialogs-set-7.patch
2021-02-14 20:36 bubu File Added: buttonicon.gif
2021-02-14 20:36 bubu File Added: cmykfw.gif
2021-02-14 20:36 bubu File Added: cxfimportdialogbase.gif
2021-02-14 20:36 bubu File Added: gtfiledialog.gif
2021-02-14 20:36 bubu File Added: multiprogressdialog.gif
2021-02-14 20:36 bubu File Added: osgeditor.gif
2021-02-14 20:36 bubu File Added: picstatus.gif
2021-02-14 20:36 bubu File Added: transformdialogbase.gif
2021-02-15 00:54 jghali Assigned To => jghali
2021-02-15 00:54 jghali Status new => resolved
2021-02-15 00:54 jghali Resolution open => fixed
2021-02-15 00:54 jghali Fixed in Version => 1.5.7.svn
2021-02-15 00:54 jghali Note Added: 0048827
2021-02-16 20:44 PeterBenedek Relationship added child of 0013906