View Issue Details

IDProjectCategoryView StatusLast Update
0016437ScribusUser Interfacepublic2021-01-18 21:57
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.5.7.svn 
Target VersionFixed in Version1.5.7.svn 
Summary0016437: Unify window margin for New From Template dialog
Descriptionin this patch I suggest to use the default 9px window margin for "New From Template" dialog: File > New from Template... I made sure the "New From Template" on startup dialog didn't change. Please check that interface too on reviewing.

There are several space changes in the diff.

Please review the patch. Thanks.

A question: scribus/plugins/newfromtemplateplugin/nftdialog.ui|.h|.cpp is in use?
TagsNo tags attached.
PatchNo

Activities

bubu

2021-01-18 13:35

reporter  

0001-Unify-margin-for-New-From-Template-dialog.patch (4,052 bytes)
From 48d8817dda63bb34b7fc2de17b74e71e9f32bfc4 Mon Sep 17 00:00:00 2001
Message-Id: <48d8817dda63bb34b7fc2de17b74e71e9f32bfc4.1610926032.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Mon, 18 Jan 2021 00:26:56 +0100
Subject: [PATCH] Unify margin for New From Template dialog

---
 scribus/ui/newdocdialog.cpp |  2 +-
 scribus/ui/nftdialog.ui     | 39 ++++++++++++++++++++++++-------------
 scribus/ui/nftwidget.ui     | 13 +++++++++++--
 3 files changed, 38 insertions(+), 16 deletions(-)

diff --git a/scribus/ui/newdocdialog.cpp b/scribus/ui/newdocdialog.cpp
index da5a08d67..e545e8677 100644
--- a/scribus/ui/newdocdialog.cpp
+++ b/scribus/ui/newdocdialog.cpp
@@ -352,7 +352,7 @@ void NewDocDialog::createNewFromTempPage()
 {
 	newFromTempFrame = new QFrame(this);
 	verticalLayout = new QVBoxLayout(newFromTempFrame);
-	verticalLayout->setContentsMargins(0, 0, 0, 0);
+	verticalLayout->setContentsMargins(9, 9, 9, 9);
 	nftGui = new nftwidget(newFromTempFrame);
 	verticalLayout->addWidget(nftGui);
 }
diff --git a/scribus/ui/nftdialog.ui b/scribus/ui/nftdialog.ui
index c845ba074..5497f9fda 100644
--- a/scribus/ui/nftdialog.ui
+++ b/scribus/ui/nftdialog.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>nftdialog</class>
- <widget class="QDialog" name="nftdialog" >
-  <property name="geometry" >
+ <widget class="QDialog" name="nftdialog">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,19 +10,31 @@
     <height>480</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>New From Template</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout" >
+  <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="nftwidget" native="1" name="nftGui" />
+    <widget class="nftwidget" name="nftGui" native="true"/>
    </item>
    <item>
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="orientation" >
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
-     <property name="standardButtons" >
+     <property name="standardButtons">
       <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
      </property>
     </widget>
@@ -44,11 +57,11 @@
    <receiver>nftdialog</receiver>
    <slot>accept()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>248</x>
      <y>254</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>157</x>
      <y>274</y>
     </hint>
@@ -60,11 +73,11 @@
    <receiver>nftdialog</receiver>
    <slot>reject()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>316</x>
      <y>260</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>286</x>
      <y>274</y>
     </hint>
diff --git a/scribus/ui/nftwidget.ui b/scribus/ui/nftwidget.ui
index 91d638c96..07337720a 100644
--- a/scribus/ui/nftwidget.ui
+++ b/scribus/ui/nftwidget.ui
@@ -14,8 +14,17 @@
    <string notr="true">Form</string>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout">
-   <property name="spacing">
-    <number>5</number>
+   <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>
     <widget class="QListWidget" name="categoryList">
-- 
2.27.0

new_from_template.gif (55,515 bytes)
new_from_template.gif (55,515 bytes)

jghali

2021-01-18 21:57

administrator   ~0048713

Applied, thanks!

>> A question: scribus/plugins/newfromtemplateplugin/nftdialog.ui|.h|.cpp is in use?

Nope, the newfromtemplateplugin directory is commented out in the CMakeLists.txt file located at the root of plugins directory.

Issue History

Date Modified Username Field Change
2021-01-18 13:35 bubu New Issue
2021-01-18 13:35 bubu File Added: 0001-Unify-margin-for-New-From-Template-dialog.patch
2021-01-18 13:35 bubu File Added: new_from_template.gif
2021-01-18 21:57 jghali Assigned To => jghali
2021-01-18 21:57 jghali Status new => resolved
2021-01-18 21:57 jghali Resolution open => fixed
2021-01-18 21:57 jghali Fixed in Version => 1.5.7.svn
2021-01-18 21:57 jghali Note Added: 0048713