After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724384 - Save dialog labels are not aligned correctly
Save dialog labels are not aligned correctly
Status: RESOLVED FIXED
Product: gnome-screenshot
Classification: Core
Component: general
3.10.x
Other Linux
: Normal minor
: ---
Assigned To: gnome-screenshot-maint
gnome-screenshot-maint
Depends on:
Blocks:
 
 
Reported: 2014-02-14 21:10 UTC by Edwin Pujols
Modified: 2019-07-25 09:25 UTC
See Also:
GNOME target: ---
GNOME version: 3.9/3.10


Attachments
Patch for the alignment of the labels (7.59 KB, patch)
2014-02-14 21:30 UTC, Edwin Pujols
none Details | Review
Fix alignment of the labels (7.59 KB, patch)
2014-02-14 23:50 UTC, Edwin Pujols
none Details | Review
Fix alignment of the labels (7.13 KB, patch)
2014-02-15 04:09 UTC, Edwin Pujols
none Details | Review

Description Edwin Pujols 2014-02-14 21:10:56 UTC
On "Save Screenshot", the labels are misplaced with respect to the text entry and the file chooser widgets.
Comment 1 Edwin Pujols 2014-02-14 21:30:21 UTC
Created attachment 269150 [details] [review]
Patch for the alignment of the labels
Comment 2 Edwin Pujols 2014-02-14 21:36:55 UTC
Comment on attachment 269150 [details] [review]
Patch for the alignment of the labels

>From 6eaa498f0709c7c2f88bd16e0077f246d352cc9e Mon Sep 17 00:00:00 2001
>From: Edwin Pujols <edwinpm5@gmail.com>
>Date: Fri, 14 Feb 2014 12:58:58 -0400
>Subject: [PATCH] Fix the alignment of the labels on the save dialog
>
>The labels on the "Save Screenshot" dialog are misplaced with respect
>to the text entry and the file chooser widget. I added these four
>elements to a new GtkGrid to fix the alignment.
>
>https://bugzilla.gnome.org/show_bug.cgi?id=724384
>---
> src/screenshot-dialog.ui | 125 +++++++++++++++++++++++++++--------------------
> 1 file changed, 71 insertions(+), 54 deletions(-)
>
>diff --git a/src/screenshot-dialog.ui b/src/screenshot-dialog.ui
>index e1babea..3fdacdf 100644
>--- a/src/screenshot-dialog.ui
>+++ b/src/screenshot-dialog.ui
>@@ -45,51 +45,82 @@
>           </packing>
>         </child>
>         <child>
>-          <object class="GtkLabel" id="label1">
>+          <object class="GtkGrid" id="grid2">
>             <property name="visible">True</property>
>             <property name="can_focus">False</property>
>-            <property name="halign">start</property>
>+            <property name="row_spacing">8</property>
>+            <property name="column_spacing">8</property>
>             <property name="valign">start</property>
>-            <property name="label" translatable="yes">_Name:</property>
>-            <property name="use_underline">True</property>
>-            <property name="mnemonic_widget">filename_entry</property>
>-          </object>
>-          <packing>
>-            <property name="left_attach">1</property>
>-            <property name="top_attach">0</property>
>-            <property name="width">1</property>
>-            <property name="height">1</property>
>-          </packing>
>-        </child>
>-        <child>
>-          <object class="GtkLabel" id="label2">
>-            <property name="visible">True</property>
>-            <property name="can_focus">False</property>
>-            <property name="halign">start</property>
>-            <property name="valign">start</property>
>-            <property name="label" translatable="yes">Save in _folder:</property>
>-            <property name="use_underline">True</property>
>-            <property name="mnemonic_widget">save_widget</property>
>+            <child>
>+              <object class="GtkLabel" id="label1">
>+                <property name="visible">True</property>
>+                <property name="can_focus">False</property>
>+                <property name="halign">start</property>
>+                <property name="valign">center</property>
>+                <property name="label" translatable="yes">_Name:</property>
>+                <property name="use_underline">True</property>
>+                <property name="mnemonic_widget">filename_entry</property>
>+              </object>
>+              <packing>
>+                <property name="left_attach">0</property>
>+                <property name="top_attach">0</property>
>+                <property name="width">1</property>
>+                <property name="height">1</property>
>+              </packing>
>+            </child>
>+            <child>
>+              <object class="GtkLabel" id="label2">
>+                <property name="visible">True</property>
>+                <property name="can_focus">False</property>
>+                <property name="halign">start</property>
>+                <property name="valign">center</property>
>+                <property name="label" translatable="yes">Save in _folder:</property>
>+                <property name="use_underline">True</property>
>+                <property name="mnemonic_widget">save_widget</property>
>+              </object>
>+              <packing>
>+                <property name="left_attach">0</property>
>+                <property name="top_attach">1</property>
>+                <property name="width">1</property>
>+                <property name="height">1</property>
>+              </packing>
>+            </child>
>+            <child>
>+              <object class="GtkEntry" id="filename_entry">
>+                <property name="visible">True</property>
>+                <property name="can_focus">True</property>
>+                <property name="valign">center</property>
>+                <property name="activates_default">True</property>
>+                <property name="width_chars">32</property>
>+              </object>
>+              <packing>
>+                <property name="left_attach">1</property>
>+                <property name="top_attach">0</property>
>+                <property name="width">1</property>
>+                <property name="height">1</property>
>+              </packing>
>+            </child>
>+            <child>
>+              <object class="GtkFileChooserButton" id="save_widget">
>+                <property name="visible">True</property>
>+                <property name="can_focus">False</property>
>+                <property name="valign">center</property>
>+                <property name="vexpand">True</property>
>+                <property name="action">select-folder</property>
>+                <property name="local_only">False</property>
>+              </object>
>+              <packing>
>+                <property name="left_attach">1</property>
>+                <property name="top_attach">1</property>
>+                <property name="width">1</property>
>+                <property name="height">1</property>
>+              </packing>
>+            </child>
>           </object>
>           <packing>
>             <property name="left_attach">1</property>
>-            <property name="top_attach">1</property>
>-            <property name="width">1</property>
>-            <property name="height">1</property>
>-          </packing>
>-        </child>
>-        <child>
>-          <object class="GtkEntry" id="filename_entry">
>-            <property name="visible">True</property>
>-            <property name="can_focus">True</property>
>-            <property name="valign">start</property>
>-            <property name="activates_default">True</property>
>-            <property name="width_chars">32</property>
>-          </object>
>-          <packing>
>-            <property name="left_attach">2</property>
>             <property name="top_attach">0</property>
>-            <property name="width">1</property>
>+            <property name="width">2</property>
>             <property name="height">1</property>
>           </packing>
>         </child>
>@@ -97,6 +128,8 @@
>           <object class="GtkButtonBox" id="buttonbox1">
>             <property name="visible">True</property>
>             <property name="can_focus">False</property>
>+            <property name="layout-style">start</property>
>+            <property name="spacing">6</property>
>             <child>
>               <object class="GtkButton" id="copy_button">
>                 <property name="label" translatable="yes">C_opy to Clipboard</property>
>@@ -135,22 +168,6 @@
>             <property name="height">1</property>
>           </packing>
>         </child>
>-        <child>
>-          <object class="GtkFileChooserButton" id="save_widget">
>-            <property name="visible">True</property>
>-            <property name="can_focus">False</property>
>-            <property name="valign">start</property>
>-            <property name="vexpand">True</property>
>-            <property name="action">select-folder</property>
>-            <property name="local_only">False</property>
>-          </object>
>-          <packing>
>-            <property name="left_attach">2</property>
>-            <property name="top_attach">1</property>
>-            <property name="width">1</property>
>-            <property name="height">1</property>
>-          </packing>
>-        </child>
>       </object>
>     </child>
>   </object>
>-- 
>1.8.5.4
>
Comment 3 Edwin Pujols 2014-02-14 21:37:47 UTC
Comment on attachment 269150 [details] [review]
Patch for the alignment of the labels

>From 6eaa498f0709c7c2f88bd16e0077f246d352cc9e Mon Sep 17 00:00:00 2001
>From: Edwin Pujols <edwinpm5@gmail.com>
>Date: Fri, 14 Feb 2014 12:58:58 -0400
>Subject: [PATCH] Fix the alignment of the labels on the save dialog
>
>The labels on the "Save Screenshot" dialog are misplaced with respect
>to the text entry and the file chooser widget. I added these four
>elements to a new GtkGrid to fix the alignment.
>
>https://bugzilla.gnome.org/show_bug.cgi?id=724384
>---
> src/screenshot-dialog.ui | 125 +++++++++++++++++++++++++++--------------------
> 1 file changed, 71 insertions(+), 54 deletions(-)
>
>diff --git a/src/screenshot-dialog.ui b/src/screenshot-dialog.ui
>index e1babea..3fdacdf 100644
>--- a/src/screenshot-dialog.ui
>+++ b/src/screenshot-dialog.ui
>@@ -45,51 +45,82 @@
>           </packing>
>         </child>
>         <child>
>-          <object class="GtkLabel" id="label1">
>+          <object class="GtkGrid" id="grid2">
>             <property name="visible">True</property>
>             <property name="can_focus">False</property>
>-            <property name="halign">start</property>
>+            <property name="row_spacing">8</property>
>+            <property name="column_spacing">8</property>
>             <property name="valign">start</property>
>-            <property name="label" translatable="yes">_Name:</property>
>-            <property name="use_underline">True</property>
>-            <property name="mnemonic_widget">filename_entry</property>
>-          </object>
>-          <packing>
>-            <property name="left_attach">1</property>
>-            <property name="top_attach">0</property>
>-            <property name="width">1</property>
>-            <property name="height">1</property>
>-          </packing>
>-        </child>
>-        <child>
>-          <object class="GtkLabel" id="label2">
>-            <property name="visible">True</property>
>-            <property name="can_focus">False</property>
>-            <property name="halign">start</property>
>-            <property name="valign">start</property>
>-            <property name="label" translatable="yes">Save in _folder:</property>
>-            <property name="use_underline">True</property>
>-            <property name="mnemonic_widget">save_widget</property>
>+            <child>
>+              <object class="GtkLabel" id="label1">
>+                <property name="visible">True</property>
>+                <property name="can_focus">False</property>
>+                <property name="halign">start</property>
>+                <property name="valign">center</property>
>+                <property name="label" translatable="yes">_Name:</property>
>+                <property name="use_underline">True</property>
>+                <property name="mnemonic_widget">filename_entry</property>
>+              </object>
>+              <packing>
>+                <property name="left_attach">0</property>
>+                <property name="top_attach">0</property>
>+                <property name="width">1</property>
>+                <property name="height">1</property>
>+              </packing>
>+            </child>
>+            <child>
>+              <object class="GtkLabel" id="label2">
>+                <property name="visible">True</property>
>+                <property name="can_focus">False</property>
>+                <property name="halign">start</property>
>+                <property name="valign">center</property>
>+                <property name="label" translatable="yes">Save in _folder:</property>
>+                <property name="use_underline">True</property>
>+                <property name="mnemonic_widget">save_widget</property>
>+              </object>
>+              <packing>
>+                <property name="left_attach">0</property>
>+                <property name="top_attach">1</property>
>+                <property name="width">1</property>
>+                <property name="height">1</property>
>+              </packing>
>+            </child>
>+            <child>
>+              <object class="GtkEntry" id="filename_entry">
>+                <property name="visible">True</property>
>+                <property name="can_focus">True</property>
>+                <property name="valign">center</property>
>+                <property name="activates_default">True</property>
>+                <property name="width_chars">32</property>
>+              </object>
>+              <packing>
>+                <property name="left_attach">1</property>
>+                <property name="top_attach">0</property>
>+                <property name="width">1</property>
>+                <property name="height">1</property>
>+              </packing>
>+            </child>
>+            <child>
>+              <object class="GtkFileChooserButton" id="save_widget">
>+                <property name="visible">True</property>
>+                <property name="can_focus">False</property>
>+                <property name="valign">center</property>
>+                <property name="vexpand">True</property>
>+                <property name="action">select-folder</property>
>+                <property name="local_only">False</property>
>+              </object>
>+              <packing>
>+                <property name="left_attach">1</property>
>+                <property name="top_attach">1</property>
>+                <property name="width">1</property>
>+                <property name="height">1</property>
>+              </packing>
>+            </child>
>           </object>
>           <packing>
>             <property name="left_attach">1</property>
>-            <property name="top_attach">1</property>
>-            <property name="width">1</property>
>-            <property name="height">1</property>
>-          </packing>
>-        </child>
>-        <child>
>-          <object class="GtkEntry" id="filename_entry">
>-            <property name="visible">True</property>
>-            <property name="can_focus">True</property>
>-            <property name="valign">start</property>
>-            <property name="activates_default">True</property>
>-            <property name="width_chars">32</property>
>-          </object>
>-          <packing>
>-            <property name="left_attach">2</property>
>             <property name="top_attach">0</property>
>-            <property name="width">1</property>
>+            <property name="width">2</property>
>             <property name="height">1</property>
>           </packing>
>         </child>
>@@ -97,6 +128,8 @@
>           <object class="GtkButtonBox" id="buttonbox1">
>             <property name="visible">True</property>
>             <property name="can_focus">False</property>
>+            <property name="layout-style">start</property>
>+            <property name="spacing">6</property>
>             <child>
>               <object class="GtkButton" id="copy_button">
>                 <property name="label" translatable="yes">C_opy to Clipboard</property>
>@@ -135,22 +168,6 @@
>             <property name="height">1</property>
>           </packing>
>         </child>
>-        <child>
>-          <object class="GtkFileChooserButton" id="save_widget">
>-            <property name="visible">True</property>
>-            <property name="can_focus">False</property>
>-            <property name="valign">start</property>
>-            <property name="vexpand">True</property>
>-            <property name="action">select-folder</property>
>-            <property name="local_only">False</property>
>-          </object>
>-          <packing>
>-            <property name="left_attach">2</property>
>-            <property name="top_attach">1</property>
>-            <property name="width">1</property>
>-            <property name="height">1</property>
>-          </packing>
>-        </child>
>       </object>
>     </child>
>   </object>
>-- 
>1.8.5.4
>
Comment 4 Edwin Pujols 2014-02-14 23:19:55 UTC
Sorry for the spamming, I'll submit another patch with typos fixed in the description.
Comment 5 Edwin Pujols 2014-02-14 23:50:27 UTC
Created attachment 269152 [details] [review]
Fix alignment of the labels
Comment 6 Edwin Pujols 2014-02-15 04:09:05 UTC
Created attachment 269163 [details] [review]
Fix alignment of the labels

In the previous patches, I broke the placement of the Copy and Save buttons. This one recovers correct placement of these buttons.
Comment 7 Cosimo Cecchi 2019-07-25 09:25:09 UTC
Thanks, and sorry this took so long to get merged. I now pushed the patch to master with a couple minor tweaks.