View Issue Details

IDProjectCategoryView StatusLast Update
0016424ScribusUser Interfacepublic2021-01-13 07:16
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.5.7.svn 
Target VersionFixed in Version1.5.7.svn 
Summary0016424: Update layout for Edit Colors dialog
DescriptionIn this patch I propose a visual update for Edit Colors dialog (Edit > Colors and Fills > Add/Edit/Duplicate). I want to prevent layout trembling. Please see the attached screenshot.

Modifications:
1) Stop dialog layout trembling:
- Set minimum size for color slider's spinbox
- Set minimum size for color slider's label
- Reorganize spacers to move color map to the top and sliders to the bottom
2) Use standard margins and spacing:
- Remove huge spacing around OK and Cancel button and use spacers around them

Please review the patch. Thanks.
TagsNo tags attached.
PatchNo

Relationships

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

Activities

bubu

2021-01-10 21:48

reporter  

0001-Update-Layout-for-Edit-Colors-dialog.patch (11,387 bytes)
From 182c6f99cd5eee7558894ce783148a2ac96c1d5e Mon Sep 17 00:00:00 2001
Message-Id: <182c6f99cd5eee7558894ce783148a2ac96c1d5e.1610314794.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Sun, 10 Jan 2021 22:39:41 +0100
Subject: [PATCH] Update Layout for Edit Colors dialog

Prevent dialog layout to trembles, moves back and forth:
- Set minimum size for color slider's spinbox
- Set minimum size for color slider's label
- Reorganize spacers to move color map to the top and sliders to the
bottom
Use standard margins and spacing:
- Remove huge spacing around OK and Cancel button and use spacers around
them
---
 scribus/ui/cmykfwbase.ui | 184 +++++++++++++++++++++++++++++++--------
 1 file changed, 148 insertions(+), 36 deletions(-)

diff --git a/scribus/ui/cmykfwbase.ui b/scribus/ui/cmykfwbase.ui
index 82cc389b5..1c5211f2d 100644
--- a/scribus/ui/cmykfwbase.ui
+++ b/scribus/ui/cmykfwbase.ui
@@ -6,28 +6,25 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>652</width>
-    <height>361</height>
+    <width>530</width>
+    <height>319</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Edit Color</string>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout">
-   <property name="spacing">
-    <number>5</number>
-   </property>
    <property name="leftMargin">
-    <number>10</number>
+    <number>9</number>
    </property>
    <property name="topMargin">
-    <number>10</number>
+    <number>9</number>
    </property>
    <property name="rightMargin">
-    <number>10</number>
+    <number>9</number>
    </property>
    <property name="bottomMargin">
-    <number>10</number>
+    <number>9</number>
    </property>
    <item>
     <layout class="QVBoxLayout" name="verticalLayout">
@@ -209,20 +206,33 @@
      <item>
       <layout class="QHBoxLayout" name="horizontalLayout_5">
        <property name="spacing">
-        <number>20</number>
+        <number>0</number>
        </property>
        <property name="leftMargin">
-        <number>10</number>
+        <number>0</number>
        </property>
        <property name="topMargin">
-        <number>10</number>
+        <number>0</number>
        </property>
        <property name="rightMargin">
-        <number>10</number>
+        <number>0</number>
        </property>
        <property name="bottomMargin">
-        <number>10</number>
+        <number>0</number>
        </property>
+       <item>
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
        <item>
         <widget class="QPushButton" name="buttonOK">
          <property name="text">
@@ -233,6 +243,19 @@
          </property>
         </widget>
        </item>
+       <item>
+        <spacer name="horizontalSpacer_3">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
        <item>
         <widget class="QPushButton" name="buttonCancel">
          <property name="text">
@@ -240,6 +263,19 @@
          </property>
         </widget>
        </item>
+       <item>
+        <spacer name="horizontalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
       </layout>
      </item>
     </layout>
@@ -253,9 +289,6 @@
       <enum>QFrame::Raised</enum>
      </property>
      <layout class="QVBoxLayout" name="verticalLayout_2">
-      <property name="spacing">
-       <number>5</number>
-      </property>
       <property name="leftMargin">
        <number>0</number>
       </property>
@@ -286,6 +319,12 @@
       </item>
       <item>
        <widget class="QStackedWidget" name="TabStack">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
         <property name="frameShape">
          <enum>QFrame::NoFrame</enum>
         </property>
@@ -294,9 +333,6 @@
         </property>
         <widget class="QWidget" name="page">
          <layout class="QHBoxLayout" name="horizontalLayout_6">
-          <property name="spacing">
-           <number>0</number>
-          </property>
           <property name="leftMargin">
            <number>0</number>
           </property>
@@ -318,8 +354,26 @@
              <enum>QFrame::Sunken</enum>
             </property>
             <layout class="QVBoxLayout" name="verticalLayout_3">
+             <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="QFrame" name="frame_3">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
                <property name="minimumSize">
                 <size>
                  <width>182</width>
@@ -339,9 +393,6 @@
                 <enum>QFrame::Sunken</enum>
                </property>
                <layout class="QHBoxLayout" name="horizontalLayout_7">
-                <property name="spacing">
-                 <number>0</number>
-                </property>
                 <property name="leftMargin">
                  <number>0</number>
                 </property>
@@ -373,6 +424,19 @@
                </layout>
               </widget>
              </item>
+             <item>
+              <spacer name="verticalSpacer_3">
+               <property name="orientation">
+                <enum>Qt::Vertical</enum>
+               </property>
+               <property name="sizeHint" stdset="0">
+                <size>
+                 <width>20</width>
+                 <height>40</height>
+                </size>
+               </property>
+              </spacer>
+             </item>
             </layout>
            </widget>
           </item>
@@ -402,6 +466,19 @@
         </widget>
        </widget>
       </item>
+      <item>
+       <spacer name="verticalSpacer_2">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>20</width>
+          <height>40</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
       <item>
        <layout class="QGridLayout" name="slidersLayout">
         <item row="0" column="1">
@@ -444,6 +521,12 @@
         </item>
         <item row="3" column="0">
          <widget class="QLabel" name="BlackT">
+          <property name="minimumSize">
+           <size>
+            <width>20</width>
+            <height>0</height>
+           </size>
+          </property>
           <property name="text">
            <string>K:</string>
           </property>
@@ -470,6 +553,12 @@
         </item>
         <item row="3" column="2">
          <widget class="ScrSpinBox" name="BlackSp">
+          <property name="minimumSize">
+           <size>
+            <width>70</width>
+            <height>0</height>
+           </size>
+          </property>
           <property name="suffix">
            <string> %</string>
           </property>
@@ -502,6 +591,12 @@
         </item>
         <item row="0" column="0">
          <widget class="QLabel" name="CyanT">
+          <property name="minimumSize">
+           <size>
+            <width>20</width>
+            <height>0</height>
+           </size>
+          </property>
           <property name="text">
            <string>C:</string>
           </property>
@@ -509,6 +604,12 @@
         </item>
         <item row="2" column="2">
          <widget class="ScrSpinBox" name="YellowSp">
+          <property name="minimumSize">
+           <size>
+            <width>70</width>
+            <height>0</height>
+           </size>
+          </property>
           <property name="suffix">
            <string> %</string>
           </property>
@@ -522,6 +623,12 @@
         </item>
         <item row="1" column="2">
          <widget class="ScrSpinBox" name="MagentaSp">
+          <property name="minimumSize">
+           <size>
+            <width>70</width>
+            <height>0</height>
+           </size>
+          </property>
           <property name="suffix">
            <string> %</string>
           </property>
@@ -535,6 +642,12 @@
         </item>
         <item row="1" column="0">
          <widget class="QLabel" name="MagentaT">
+          <property name="minimumSize">
+           <size>
+            <width>20</width>
+            <height>0</height>
+           </size>
+          </property>
           <property name="text">
            <string>M:</string>
           </property>
@@ -542,6 +655,12 @@
         </item>
         <item row="0" column="2">
          <widget class="ScrSpinBox" name="CyanSp">
+          <property name="minimumSize">
+           <size>
+            <width>70</width>
+            <height>0</height>
+           </size>
+          </property>
           <property name="suffix">
            <string> %</string>
           </property>
@@ -555,6 +674,12 @@
         </item>
         <item row="2" column="0">
          <widget class="QLabel" name="YellowT">
+          <property name="minimumSize">
+           <size>
+            <width>20</width>
+            <height>0</height>
+           </size>
+          </property>
           <property name="text">
            <string>Y:</string>
           </property>
@@ -562,19 +687,6 @@
         </item>
        </layout>
       </item>
-      <item>
-       <spacer name="verticalSpacer_2">
-        <property name="orientation">
-         <enum>Qt::Vertical</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>20</width>
-          <height>40</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
      </layout>
     </widget>
    </item>
-- 
2.27.0

edit_colors.gif (199,424 bytes)
edit_colors.gif (199,424 bytes)

jghali

2021-01-13 02:22

administrator   ~0048682

Thanks, committed except for the change related to the additional spacer to move color map to the top, on which I do no agree. I think this color map should take the same size as the color list shown when selecting a palette to import a specific color.

bubu

2021-01-13 07:16

reporter   ~0048685

OK, thanks Jean for clarifying.

Issue History

Date Modified Username Field Change
2021-01-10 21:48 bubu New Issue
2021-01-10 21:48 bubu File Added: 0001-Update-Layout-for-Edit-Colors-dialog.patch
2021-01-10 21:48 bubu File Added: edit_colors.gif
2021-01-11 06:12 PeterBenedek Relationship added child of 0013906
2021-01-13 02:22 jghali Assigned To => jghali
2021-01-13 02:22 jghali Status new => resolved
2021-01-13 02:22 jghali Resolution open => fixed
2021-01-13 02:22 jghali Fixed in Version => 1.5.7.svn
2021-01-13 02:22 jghali Note Added: 0048682
2021-01-13 07:16 bubu Note Added: 0048685