View Issue Details

IDProjectCategoryView StatusLast Update
0016452ScribusUser Interfacepublic2021-01-30 15:25
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.5.7.svn 
Target VersionFixed in Version1.5.7.svn 
Summary0016452: Update layout for Check Spelling dialog
DescriptionIn this patch I propose an update for Extras > Check Spelling dialog: use same with for "Not in dictionary" and "Suggestions" fields. Please see the attached before-after screenshot. I choose to relayout the dialog to support different button widths for translations.

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-29 21:57

reporter  

0001-Update-layout-for-Check-Spelling-dialog.patch (7,077 bytes)
From 06112a6b237237bf57abefd217d9f9ce2543d10d Mon Sep 17 00:00:00 2001
Message-Id: <06112a6b237237bf57abefd217d9f9ce2543d10d.1611955184.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Fri, 29 Jan 2021 22:19:23 +0100
Subject: [PATCH] Update layout for Check Spelling dialog

---
 .../tools/hunspellcheck/hunspelldialogbase.ui | 178 +++++++++++-------
 1 file changed, 113 insertions(+), 65 deletions(-)

diff --git a/scribus/plugins/tools/hunspellcheck/hunspelldialogbase.ui b/scribus/plugins/tools/hunspellcheck/hunspelldialogbase.ui
index 96f16316b..d3e3233d0 100644
--- a/scribus/plugins/tools/hunspellcheck/hunspelldialogbase.ui
+++ b/scribus/plugins/tools/hunspellcheck/hunspelldialogbase.ui
@@ -14,6 +14,18 @@
    <string>Check Spelling</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">
      <item>
@@ -42,90 +54,126 @@
     </layout>
    </item>
    <item>
-    <widget class="QLabel" name="label_3">
-     <property name="text">
-      <string>Not in dictionary</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_2">
-     <item>
-      <widget class="QTextEdit" name="sentenceTextEdit"/>
-     </item>
+    <layout class="QHBoxLayout" name="horizontalLayout_5">
      <item>
-      <layout class="QVBoxLayout" name="verticalLayout">
+      <layout class="QVBoxLayout" name="verticalLayout_4">
        <item>
-        <widget class="QPushButton" name="ignoreOncePushButton">
+        <widget class="QLabel" name="label_3">
          <property name="text">
-          <string>Ignore Once</string>
+          <string>Not in dictionary</string>
          </property>
         </widget>
        </item>
        <item>
-        <widget class="QPushButton" name="ignoreAllPushButton">
+        <widget class="QTextEdit" name="sentenceTextEdit"/>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_2">
          <property name="text">
-          <string>Ignore All</string>
+          <string>Suggestions</string>
          </property>
         </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>
+        <widget class="QListWidget" name="suggestionsListWidget"/>
        </item>
       </layout>
      </item>
-    </layout>
-   </item>
-   <item>
-    <widget class="QLabel" name="label_2">
-     <property name="text">
-      <string>Suggestions</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_3">
      <item>
-      <widget class="QListWidget" name="suggestionsListWidget"/>
-     </item>
-     <item>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
-       <item>
-        <widget class="QPushButton" name="changePushButton">
-         <property name="text">
-          <string>Change</string>
-         </property>
-        </widget>
-       </item>
+      <layout class="QVBoxLayout" name="verticalLayout_5">
        <item>
-        <widget class="QPushButton" name="changeAllPushButton">
-         <property name="text">
-          <string>Change All</string>
-         </property>
-        </widget>
+        <layout class="QVBoxLayout" name="verticalLayout">
+         <item>
+          <spacer name="verticalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>23</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="ignoreOncePushButton">
+           <property name="text">
+            <string>Ignore Once</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="ignoreAllPushButton">
+           <property name="text">
+            <string>Ignore All</string>
+           </property>
+          </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>
+        </layout>
        </item>
        <item>
-        <spacer name="verticalSpacer">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>40</height>
-          </size>
-         </property>
-        </spacer>
+        <layout class="QVBoxLayout" name="verticalLayout_2">
+         <item>
+          <spacer name="verticalSpacer_4">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>23</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="changePushButton">
+           <property name="text">
+            <string>Change</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="changeAllPushButton">
+           <property name="text">
+            <string>Change All</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="verticalSpacer">
+           <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>
        </item>
       </layout>
      </item>
-- 
2.27.0

check_spelling.gif (59,730 bytes)
check_spelling.gif (59,730 bytes)

jghali

2021-01-29 22:59

administrator   ~0048786

Unfortunately the new layout cause a misalignment between the buttons on the right and the textedit/list widgets on the left of the dialog. This might be a case where you will need to use a grid layout to consistently fix this issue across platforms.

16452_win_screenshot.png (11,804 bytes)
16452_win_screenshot.png (11,804 bytes)

bubu

2021-01-29 23:17

reporter   ~0048787

Oh, yes, this is the right solution! Thanks for the tip. Here is the 2nd version with grid layout.

0001-Update-layout-for-Check-Spelling-dialog2.patch (4,116 bytes)
From d5f76dd715e55eb7d2e0eec9a400376749422ac8 Mon Sep 17 00:00:00 2001
Message-Id: <d5f76dd715e55eb7d2e0eec9a400376749422ac8.1611962071.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Sat, 30 Jan 2021 00:11:57 +0100
Subject: [PATCH] Update layout for Check Spelling dialog

---
 .../tools/hunspellcheck/hunspelldialogbase.ui | 70 +++++++++----------
 1 file changed, 33 insertions(+), 37 deletions(-)

diff --git a/scribus/plugins/tools/hunspellcheck/hunspelldialogbase.ui b/scribus/plugins/tools/hunspellcheck/hunspelldialogbase.ui
index 96f16316b..4d346e019 100644
--- a/scribus/plugins/tools/hunspellcheck/hunspelldialogbase.ui
+++ b/scribus/plugins/tools/hunspellcheck/hunspelldialogbase.ui
@@ -42,35 +42,45 @@
     </layout>
    </item>
    <item>
-    <widget class="QLabel" name="label_3">
-     <property name="text">
-      <string>Not in dictionary</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_2">
-     <item>
+    <layout class="QGridLayout" name="gridLayout">
+     <item row="0" column="0">
+      <widget class="QLabel" name="label_3">
+       <property name="text">
+        <string>Not in dictionary</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0">
       <widget class="QTextEdit" name="sentenceTextEdit"/>
      </item>
-     <item>
-      <layout class="QVBoxLayout" name="verticalLayout">
+     <item row="2" column="0">
+      <widget class="QLabel" name="label_2">
+       <property name="text">
+        <string>Suggestions</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="0">
+      <widget class="QListWidget" name="suggestionsListWidget"/>
+     </item>
+     <item row="3" column="1">
+      <layout class="QVBoxLayout" name="verticalLayout_2">
        <item>
-        <widget class="QPushButton" name="ignoreOncePushButton">
+        <widget class="QPushButton" name="changePushButton">
          <property name="text">
-          <string>Ignore Once</string>
+          <string>Change</string>
          </property>
         </widget>
        </item>
        <item>
-        <widget class="QPushButton" name="ignoreAllPushButton">
+        <widget class="QPushButton" name="changeAllPushButton">
          <property name="text">
-          <string>Ignore All</string>
+          <string>Change All</string>
          </property>
         </widget>
        </item>
        <item>
-        <spacer name="verticalSpacer_2">
+        <spacer name="verticalSpacer">
          <property name="orientation">
           <enum>Qt::Vertical</enum>
          </property>
@@ -84,38 +94,24 @@
        </item>
       </layout>
      </item>
-    </layout>
-   </item>
-   <item>
-    <widget class="QLabel" name="label_2">
-     <property name="text">
-      <string>Suggestions</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_3">
-     <item>
-      <widget class="QListWidget" name="suggestionsListWidget"/>
-     </item>
-     <item>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
+     <item row="1" column="1">
+      <layout class="QVBoxLayout" name="verticalLayout">
        <item>
-        <widget class="QPushButton" name="changePushButton">
+        <widget class="QPushButton" name="ignoreOncePushButton">
          <property name="text">
-          <string>Change</string>
+          <string>Ignore Once</string>
          </property>
         </widget>
        </item>
        <item>
-        <widget class="QPushButton" name="changeAllPushButton">
+        <widget class="QPushButton" name="ignoreAllPushButton">
          <property name="text">
-          <string>Change All</string>
+          <string>Ignore All</string>
          </property>
         </widget>
        </item>
        <item>
-        <spacer name="verticalSpacer">
+        <spacer name="verticalSpacer_2">
          <property name="orientation">
           <enum>Qt::Vertical</enum>
          </property>
-- 
2.27.0

check_spelling2.png (28,925 bytes)
check_spelling2.png (28,925 bytes)

jghali

2021-01-30 00:31

administrator   ~0048788

Applied, thanks!

Issue History

Date Modified Username Field Change
2021-01-29 21:57 bubu New Issue
2021-01-29 21:57 bubu File Added: 0001-Update-layout-for-Check-Spelling-dialog.patch
2021-01-29 21:57 bubu File Added: check_spelling.gif
2021-01-29 22:59 jghali File Added: 16452_win_screenshot.png
2021-01-29 22:59 jghali Note Added: 0048786
2021-01-29 23:17 bubu File Added: 0001-Update-layout-for-Check-Spelling-dialog2.patch
2021-01-29 23:17 bubu File Added: check_spelling2.png
2021-01-29 23:17 bubu Note Added: 0048787
2021-01-30 00:31 jghali Note Added: 0048788
2021-01-30 00:31 jghali Assigned To => jghali
2021-01-30 00:31 jghali Status new => resolved
2021-01-30 00:31 jghali Resolution open => fixed
2021-01-30 00:31 jghali Fixed in Version => 1.5.7.svn
2021-01-30 15:25 PeterBenedek Relationship added child of 0013906