View Issue Details

IDProjectCategoryView StatusLast Update
0016407ScribusUser Interfacepublic2021-03-21 15:22
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.7.svn 
Fixed in Version1.5.7.svn 
Summary0016407: Unify spacing and margin for dock palettes
DescriptionIn this patch I propose unifying margin and spacing for all dock palettes (except [content] properties palette).

I propose these distances:
For windows/dialogs:
- Window margin: 9 px
- Spacing: 6 px
- Internal margin: 9 px
Fro dock palettes:
- Window margin: 3 px
- Spacing: 3 px
- Internal margin: 6 px

I this patch I use consistently these values for all dock palettes. I think the result is elegant. Please see the before-after screenshot.

I hope patch is good, please review it. Thanks.

This is (last) 5/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-06 21:34

reporter  

dock_palettes.diff (13,522 bytes)   
diff --git a/scribus/plugins/shapes/shapepalette.cpp b/scribus/plugins/shapes/shapepalette.cpp
index 7e104e3e203d85da352cd02eeb15904ed429ecd5..50b1006ae17cb992358f3881dbb0b66d38bab75f 100644
--- a/scribus/plugins/shapes/shapepalette.cpp
+++ b/scribus/plugins/shapes/shapepalette.cpp
@@ -285,11 +285,11 @@ ShapePalette::ShapePalette( QWidget* parent) : ScDockPalette(parent, "Shap", Qt:
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
 	containerWidget = new QWidget(this);
 	vLayout = new QVBoxLayout( containerWidget );
-	vLayout->setSpacing( 0 );
-	vLayout->setMargin( 0 );
+	vLayout->setSpacing(3);
+	vLayout->setContentsMargins(3, 3, 3, 3);
 	buttonLayout = new QHBoxLayout;
-	buttonLayout->setSpacing( 5 );
-	buttonLayout->setMargin( 0 );
+	buttonLayout->setSpacing(6);
+	buttonLayout->setContentsMargins(0, 0, 0, 0);
 
 	importButton = new QToolButton(this);
 	importButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
diff --git a/scribus/ui/aligndistribute.ui b/scribus/ui/aligndistribute.ui
index 8e9ae8e397f71f55ff025da5aa2bb964561ada91..30163d713f50b556f54404f5755bed0b589e76f5 100644
--- a/scribus/ui/aligndistribute.ui
+++ b/scribus/ui/aligndistribute.ui
@@ -15,6 +15,18 @@
   </property>
   <widget class="QWidget" name="dockWidgetContents">
    <layout class="QVBoxLayout" name="verticalLayout_3">
+    <property name="leftMargin">
+     <number>3</number>
+    </property>
+    <property name="topMargin">
+     <number>3</number>
+    </property>
+    <property name="rightMargin">
+     <number>3</number>
+    </property>
+    <property name="bottomMargin">
+     <number>3</number>
+    </property>
     <item>
      <widget class="QTabWidget" name="tabWidget">
       <property name="currentIndex">
@@ -25,8 +37,26 @@
         <string>Align</string>
        </attribute>
        <layout class="QVBoxLayout">
+        <property name="spacing">
+         <number>3</number>
+        </property>
+        <property name="leftMargin">
+         <number>6</number>
+        </property>
+        <property name="topMargin">
+         <number>6</number>
+        </property>
+        <property name="rightMargin">
+         <number>6</number>
+        </property>
+        <property name="bottomMargin">
+         <number>6</number>
+        </property>
         <item>
          <layout class="QHBoxLayout" name="_2">
+          <property name="spacing">
+           <number>3</number>
+          </property>
           <item>
            <spacer>
             <property name="orientation">
@@ -115,6 +145,9 @@
         </item>
         <item>
          <layout class="QHBoxLayout" name="_4">
+          <property name="spacing">
+           <number>3</number>
+          </property>
           <item>
            <spacer>
             <property name="orientation">
@@ -306,8 +339,26 @@
         <string>Distribute</string>
        </attribute>
        <layout class="QVBoxLayout" name="verticalLayout_2">
+        <property name="spacing">
+         <number>3</number>
+        </property>
+        <property name="leftMargin">
+         <number>6</number>
+        </property>
+        <property name="topMargin">
+         <number>6</number>
+        </property>
+        <property name="rightMargin">
+         <number>6</number>
+        </property>
+        <property name="bottomMargin">
+         <number>6</number>
+        </property>
         <item>
          <layout class="QHBoxLayout" name="_6">
+          <property name="spacing">
+           <number>3</number>
+          </property>
           <item>
            <spacer>
             <property name="orientation">
@@ -586,6 +637,9 @@
           </item>
           <item>
            <layout class="QHBoxLayout" name="_9">
+            <property name="spacing">
+             <number>3</number>
+            </property>
             <item>
              <widget class="QLabel" name="distributeDistLabel">
               <property name="text">
@@ -634,6 +688,9 @@
         </item>
         <item>
          <layout class="QHBoxLayout" name="horizontalLayout_2">
+          <property name="spacing">
+           <number>3</number>
+          </property>
           <item>
            <spacer name="spacer">
             <property name="orientation">
@@ -698,8 +755,26 @@
         <string>Swap</string>
        </attribute>
        <layout class="QVBoxLayout" name="verticalLayout">
+        <property name="spacing">
+         <number>3</number>
+        </property>
+        <property name="leftMargin">
+         <number>6</number>
+        </property>
+        <property name="topMargin">
+         <number>6</number>
+        </property>
+        <property name="rightMargin">
+         <number>6</number>
+        </property>
+        <property name="bottomMargin">
+         <number>6</number>
+        </property>
         <item>
          <layout class="QHBoxLayout" name="horizontalLayout">
+          <property name="spacing">
+           <number>3</number>
+          </property>
           <item>
            <spacer name="horizontalSpacer">
             <property name="orientation">
diff --git a/scribus/ui/bookmarkpalette.cpp b/scribus/ui/bookmarkpalette.cpp
index 75267a2a01d82478131bdb1fce9054b381cf69d8..02cb0cf92ed2ace17547f7223bb298678fce746a 100644
--- a/scribus/ui/bookmarkpalette.cpp
+++ b/scribus/ui/bookmarkpalette.cpp
@@ -28,6 +28,7 @@ for which a new license (GPL+exception) is in place.
 BookPalette::BookPalette(QWidget* parent) : ScDockPalette( parent, "Books" )
 {;
 	setObjectName(QString::fromLocal8Bit("Books"));
+	setContentsMargins(3, 3, 3, 3);
 	setMinimumSize( QSize(220, 240) );
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
 	BView = new BookmarkView(this);
diff --git a/scribus/ui/inlinepalette.cpp b/scribus/ui/inlinepalette.cpp
index 8a6f55c91891be8b8f9354917110222a52c1c509..9c4f8373f892809ad318adcfa2ab66b94c5ac35b 100644
--- a/scribus/ui/inlinepalette.cpp
+++ b/scribus/ui/inlinepalette.cpp
@@ -103,6 +103,7 @@ void InlineView::dropEvent(QDropEvent *e)
 
 InlinePalette::InlinePalette( QWidget* parent) : ScDockPalette(parent, "Inline", Qt::WindowFlags())
 {
+	setContentsMargins(3, 3, 3, 3);
 	setMinimumSize( QSize( 220, 240 ) );
 	setObjectName(QString::fromLocal8Bit("Inline"));
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
diff --git a/scribus/ui/layers.cpp b/scribus/ui/layers.cpp
index 5c7c87f8d9a51121683e15aabc4d348288efd14b..ebef6159803f32b1fd09b73c3bcd339207d6a33c 100644
--- a/scribus/ui/layers.cpp
+++ b/scribus/ui/layers.cpp
@@ -49,12 +49,12 @@ LayerPalette::LayerPalette(QWidget* parent) : ScDockPalette(parent, "Layers", Qt
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
 	containerWidget = new QWidget(this);
 	LayerPaletteLayout = new QVBoxLayout();
-	LayerPaletteLayout->setMargin(2);
-	LayerPaletteLayout->setSpacing(2);
+	LayerPaletteLayout->setContentsMargins(3, 3, 3, 3);
+	LayerPaletteLayout->setSpacing(3);
 
 	layout1 = new QHBoxLayout;
-	layout1->setMargin(0);
-	layout1->setSpacing(2);
+	layout1->setContentsMargins(0, 0, 0, 0);
+	layout1->setSpacing(3);
 	textLabel1 = new QLabel( this);
 	layout1->addWidget( textLabel1 );
 	blendMode = new QComboBox( this);
@@ -107,7 +107,7 @@ LayerPalette::LayerPalette(QWidget* parent) : ScDockPalette(parent, "Layers", Qt
 	LayerPaletteLayout->addWidget( Table );
 
 	Layout1 = new QHBoxLayout;
-	Layout1->setMargin(0);
+	Layout1->setContentsMargins(0, 0, 0, 0);
 	Layout1->setSpacing(0);
 	QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
 	Layout1->addItem( spacer );
diff --git a/scribus/ui/outlinepalette.cpp b/scribus/ui/outlinepalette.cpp
index 8049f42e0b527c1eca88578723150cba7e58128d..a7fffff325e1b2a7076417045a2fa16696a8ad48 100644
--- a/scribus/ui/outlinepalette.cpp
+++ b/scribus/ui/outlinepalette.cpp
@@ -473,7 +473,8 @@ OutlinePalette::OutlinePalette( QWidget* parent) : ScDockPalette(parent, "Tree",
 	layout->addWidget( filterLabel, 0, 0 );
 	layout->addWidget( filterEdit, 0, 1 );
 	layout->addWidget( reportDisplay, 1, 0, 1, 2 );
-	layout->setContentsMargins( 3, 3, 3, 3);
+	layout->setSpacing(3);
+	layout->setContentsMargins(3, 3, 3, 3);
 	containerWidget->setLayout( layout );
 	setWidget( containerWidget );
 
diff --git a/scribus/ui/pagelayout.cpp b/scribus/ui/pagelayout.cpp
index 69d6ae7f4c7435f690742d13f49d403961f67e06..5e7a2fe1257413c66c123b4fb866b74e47e8cf7d 100644
--- a/scribus/ui/pagelayout.cpp
+++ b/scribus/ui/pagelayout.cpp
@@ -72,8 +72,8 @@ PageLayouts::PageLayouts(QWidget* parent)  : QGroupBox( parent )
 
 	modus = false;
 	layoutGroupLayout = new QVBoxLayout(this);
-	layoutGroupLayout->setSpacing(6);
-	layoutGroupLayout->setContentsMargins(9, 9, 9, 9);
+	layoutGroupLayout->setSpacing(3);
+	layoutGroupLayout->setContentsMargins(6, 6, 6, 6);
 
 	layoutsCombo = new QComboBox( this );
 	layoutGroupLayout->addWidget( layoutsCombo );
diff --git a/scribus/ui/pagepalette_masterpagesbase.ui b/scribus/ui/pagepalette_masterpagesbase.ui
index 015730d041107983bb4f61186d863c2b82dc54e1..fca605728e4a71a2f59a7d56ddd271dce6e95254 100644
--- a/scribus/ui/pagepalette_masterpagesbase.ui
+++ b/scribus/ui/pagepalette_masterpagesbase.ui
@@ -24,16 +24,16 @@
     <enum>QLayout::SetDefaultConstraint</enum>
    </property>
    <property name="leftMargin">
-    <number>5</number>
+    <number>3</number>
    </property>
    <property name="topMargin">
-    <number>5</number>
+    <number>3</number>
    </property>
    <property name="rightMargin">
-    <number>5</number>
+    <number>3</number>
    </property>
    <property name="bottomMargin">
-    <number>5</number>
+    <number>3</number>
    </property>
    <item>
     <layout class="QHBoxLayout" name="buttonLayout">
diff --git a/scribus/ui/pagepalette_pagesbase.ui b/scribus/ui/pagepalette_pagesbase.ui
index 2fc5c32d272cabf4821beab463bfda4eded65c1e..83597724ec33883c99a0bcf9ee52b6b6835b0d07 100644
--- a/scribus/ui/pagepalette_pagesbase.ui
+++ b/scribus/ui/pagepalette_pagesbase.ui
@@ -14,20 +14,17 @@
    <string>Arrange Pages</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
-   <property name="spacing">
-    <number>5</number>
-   </property>
    <property name="leftMargin">
-    <number>5</number>
+    <number>3</number>
    </property>
    <property name="topMargin">
-    <number>5</number>
+    <number>3</number>
    </property>
    <property name="rightMargin">
-    <number>5</number>
+    <number>3</number>
    </property>
    <property name="bottomMargin">
-    <number>5</number>
+    <number>3</number>
    </property>
    <item>
     <widget class="QSplitter" name="splitter">
diff --git a/scribus/ui/scrapbookpalette.cpp b/scribus/ui/scrapbookpalette.cpp
index cfd39acdec8dc40a7b138000c58407a651a285d3..febb8443a6d3e0e1b92b60930e92ac639708a0eb 100644
--- a/scribus/ui/scrapbookpalette.cpp
+++ b/scribus/ui/scrapbookpalette.cpp
@@ -724,12 +724,12 @@ Biblio::Biblio(QWidget* parent) : ScDockPalette(parent, "Sclib", Qt::WindowFlags
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
 	containerWidget = new QWidget(this);
 	BiblioLayout = new QVBoxLayout( containerWidget );
-	BiblioLayout->setSpacing( 0 );
-	BiblioLayout->setMargin( 0 );
+	BiblioLayout->setSpacing(3);
+	BiblioLayout->setContentsMargins(3, 3, 3, 3);
 
 	buttonLayout = new QHBoxLayout;
-	buttonLayout->setSpacing( 5 );
-	buttonLayout->setMargin( 0 );
+	buttonLayout->setSpacing(3);
+	buttonLayout->setContentsMargins(0, 0, 0, 0);
 	newButton = new QToolButton(this);
 	newButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
 	newButton->setIcon(IconManager::instance().loadPixmap("16/document-new.png"));
diff --git a/scribus/ui/symbolpalette.cpp b/scribus/ui/symbolpalette.cpp
index 39dd5abcacc527340a7d362a1f3ff098a8c5aec0..6bd76b5ed53dd5808a69996d4c00b47137bce91b 100644
--- a/scribus/ui/symbolpalette.cpp
+++ b/scribus/ui/symbolpalette.cpp
@@ -152,6 +152,7 @@ bool SymbolView::viewportEvent(QEvent *event)
 
 SymbolPalette::SymbolPalette( QWidget* parent) : ScDockPalette(parent, "Symb", Qt::WindowFlags())
 {
+	setContentsMargins(3, 3, 3, 3);
 	setMinimumSize( QSize( 220, 240 ) );
 	setObjectName(QString::fromLocal8Bit("Symb"));
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
diff --git a/scribus/undogui.cpp b/scribus/undogui.cpp
index bdaf3e76a2435e828300b5f4bd474a136d62b0c5..6b1884f3b31659c5646c9871d1d1452bb21c9cbd 100644
--- a/scribus/undogui.cpp
+++ b/scribus/undogui.cpp
@@ -199,8 +199,8 @@ UndoPalette::UndoPalette(QWidget* parent, const char* name) : UndoGui(parent, na
 	currentSelection = 0;
 	redoItems = 0;
 	QVBoxLayout* layout = new QVBoxLayout(container);
-	layout->setMargin(5);
-	layout->setSpacing(5);
+	layout->setContentsMargins(3, 3, 3, 3);
+	layout->setSpacing(3);
 	objectBox = new QCheckBox(this);
 	layout->addWidget(objectBox);
 
@@ -210,8 +210,8 @@ UndoPalette::UndoPalette(QWidget* parent, const char* name) : UndoGui(parent, na
 	layout->addWidget(undoList);
 
 	QHBoxLayout* buttonLayout = new QHBoxLayout;
-	buttonLayout->setMargin(0);
-	buttonLayout->setSpacing(5);
+	buttonLayout->setContentsMargins(0, 0, 0, 0);
+	buttonLayout->setSpacing(6);
 	undoButton = new QPushButton(IconManager::instance().loadPixmap("16/edit-undo.png"), "", this);
 	buttonLayout->addWidget(undoButton);
 	redoButton = new QPushButton(IconManager::instance().loadPixmap("16/edit-redo.png"), "", this);
dock_palettes.diff (13,522 bytes)   
dock_palettes.gif (146,198 bytes)   
dock_palettes.gif (146,198 bytes)   

jghali

2021-01-07 12:33

administrator   ~0048643

Applied, thanks!

FirasH

2021-03-21 15:22

reporter   ~0049015

Thanks!
Fixed in 1.5.7.svn (24381)

Issue History

Date Modified Username Field Change
2021-01-06 21:34 bubu New Issue
2021-01-06 21:34 bubu File Added: dock_palettes.diff
2021-01-06 21:34 bubu File Added: dock_palettes.gif
2021-01-07 07:07 PeterBenedek Relationship added related to 0016383
2021-01-07 07:08 PeterBenedek Relationship added child of 0013906
2021-01-07 12:33 jghali Assigned To => jghali
2021-01-07 12:33 jghali Status new => resolved
2021-01-07 12:33 jghali Resolution open => fixed
2021-01-07 12:33 jghali Fixed in Version => 1.5.7.svn
2021-01-07 12:33 jghali Note Added: 0048643
2021-03-21 15:22 FirasH Status resolved => closed
2021-03-21 15:22 FirasH Note Added: 0049015