View Issue Details

IDProjectCategoryView StatusLast Update
0016423ScribusUser Interfacepublic2021-01-13 07:22
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.5.7.svn 
Target VersionFixed in Version1.5.7.svn 
Summary0016423: Update layout for Gradient Editor
DescriptionIn this patch I propose the usual margin and spacing unifying for Gradient Editor. But I need some help to finish it because there is a new area for me:

As I know Gradient Editor (gradienteditor) is used in this places:
- Edit > Colors and Fills... > Gradients > Add (dialog)
- Properties > Colors > Fill/Stroke > Gradient (dock palette)
- Properties > Transparency > Fill Color > Gradient (dock palette)
The challenge is that it is part of a dialog and part of dock palettes and we have different default margin/spacing for dialogs and for dock palettes. I this case I have to manage only the spacing. I thought that I set spacing in gradienteditor.ui for dock palettes to 3px and in gradientaddedit.cpp I will overwrite it to 6px. But I can't do it, I do knot know how to access "editor" child widget's UI spacing property. Maybe the idea is completely wrong. Please help me, Jean, how to solve this challenge.

About this unfinished patch:
- I set default margin/spacing values.
- The original Edit > Colors and Fills... > Gradients > Add dialog could be over resized. I remove minimumSize property to solve this.
TagsNo tags attached.
PatchNo

Relationships

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

Activities

bubu

2021-01-10 09:49

reporter  

0001-Update-layout-for-Gradient-Editor.patch (2,370 bytes)
From 6d1aae27f0aa8bc46f3b58aceb6c89cf3b7e9f6f Mon Sep 17 00:00:00 2001
Message-Id: <6d1aae27f0aa8bc46f3b58aceb6c89cf3b7e9f6f.1610146353.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Fri, 8 Jan 2021 23:52:21 +0100
Subject: [PATCH] Update layout for Gradient Editor

---
 scribus/ui/gradientaddedit.ui | 18 ++++++++++++------
 scribus/ui/gradienteditor.ui  | 10 +++++-----
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/scribus/ui/gradientaddedit.ui b/scribus/ui/gradientaddedit.ui
index 010a343f2..cf017411f 100644
--- a/scribus/ui/gradientaddedit.ui
+++ b/scribus/ui/gradientaddedit.ui
@@ -23,6 +23,18 @@
    <bool>true</bool>
   </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>
     <layout class="QHBoxLayout" name="horizontalLayout">
      <property name="sizeConstraint">
@@ -48,12 +60,6 @@
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
-     <property name="minimumSize">
-      <size>
-       <width>210</width>
-       <height>180</height>
-      </size>
-     </property>
      <property name="frameShape">
       <enum>QFrame::NoFrame</enum>
      </property>
diff --git a/scribus/ui/gradienteditor.ui b/scribus/ui/gradienteditor.ui
index 4b146b172..64fde97f8 100644
--- a/scribus/ui/gradienteditor.ui
+++ b/scribus/ui/gradienteditor.ui
@@ -21,19 +21,19 @@
   </property>
   <layout class="QGridLayout" name="gridLayout">
    <property name="leftMargin">
-    <number>4</number>
+    <number>0</number>
    </property>
    <property name="topMargin">
-    <number>4</number>
+    <number>0</number>
    </property>
    <property name="rightMargin">
-    <number>4</number>
+    <number>0</number>
    </property>
    <property name="bottomMargin">
-    <number>4</number>
+    <number>0</number>
    </property>
    <property name="spacing">
-    <number>2</number>
+    <number>3</number>
    </property>
    <item row="0" column="0" colspan="2">
     <widget class="GradientPreview" name="Preview">
-- 
2.27.0

edit_gradient.gif (39,700 bytes)
edit_gradient.gif (39,700 bytes)

jghali

2021-01-13 01:31

administrator   ~0048681

Applied, thanks!

bubu

2021-01-13 07:22

reporter   ~0048686

Thank for committing. Jean, could you answer my question above please? How to manage that gradienteditor is used in a dialog and in dock palettes ? How to set different spacing?

Issue History

Date Modified Username Field Change
2021-01-10 09:49 bubu New Issue
2021-01-10 09:49 bubu File Added: 0001-Update-layout-for-Gradient-Editor.patch
2021-01-10 09:49 bubu File Added: edit_gradient.gif
2021-01-10 18:36 PeterBenedek Relationship added child of 0013906
2021-01-13 01:31 jghali Assigned To => jghali
2021-01-13 01:31 jghali Status new => resolved
2021-01-13 01:31 jghali Resolution open => fixed
2021-01-13 01:31 jghali Fixed in Version => 1.5.7.svn
2021-01-13 01:31 jghali Note Added: 0048681
2021-01-13 07:22 bubu Note Added: 0048686