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 754149 - In properties dialog the link label isn't aligned
In properties dialog the link label isn't aligned
Status: RESOLVED OBSOLETE
Product: gnome-documents
Classification: Core
Component: general
3.17.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-08-26 23:10 UTC by Alessandro Bono
Modified: 2021-07-05 11:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
properties: Align the source label (3.87 KB, patch)
2015-08-26 23:19 UTC, Alessandro Bono
committed Details | Review
Revert "properties: Align the source label" (3.79 KB, patch)
2015-08-27 16:16 UTC, Alessandro Bono
none Details | Review
style: Align the source label (719 bytes, patch)
2015-08-27 16:16 UTC, Alessandro Bono
none Details | Review
properties: Port to templates (23.28 KB, patch)
2015-08-27 21:09 UTC, Alessandro Bono
none Details | Review
properties: Make all rows with the same height (1.26 KB, patch)
2015-08-27 21:15 UTC, Alessandro Bono
none Details | Review
properties: Port to templates (23.13 KB, patch)
2015-08-28 14:53 UTC, Alessandro Bono
needs-work Details | Review
properties: Port to templates (23.41 KB, patch)
2015-08-31 11:27 UTC, Debarshi Ray
none Details | Review
properties: Port to templates (21.55 KB, patch)
2015-09-30 19:46 UTC, Alessandro Bono
none Details | Review
properties: Make all rows with the same height (1.25 KB, patch)
2015-09-30 19:46 UTC, Alessandro Bono
none Details | Review
properties: Make all rows with the same height (1.64 KB, patch)
2015-12-09 11:47 UTC, Bastien Nocera
none Details | Review

Description Alessandro Bono 2015-08-26 23:10:03 UTC
In the properties dialog, the link label isn't aligned with the other text.
Comment 1 Alessandro Bono 2015-08-26 23:19:09 UTC
Created attachment 310066 [details] [review]
properties: Align the source label

Since GtkLinkButton is a button, it has some extra padding.
Using a GtkLabel with markup we have the same functionality
without the extra padding
Comment 2 Cosimo Cecchi 2015-08-26 23:29:09 UTC
Looks good, pushed to master.

Attachment 310066 [details] pushed as 4478068 - properties: Align the source label
Comment 3 Debarshi Ray 2015-08-27 11:18:12 UTC
Reopening.

While this fixes the horizontal alignment issue (thanks for that!), it introduces a vertical size issue. Property dialogs that don't have a GtkEntry (eg., remote items) have thinner rows now.
Comment 4 Alessandro Bono 2015-08-27 16:16:31 UTC
Created attachment 310106 [details] [review]
Revert "properties: Align the source label"

This reverts commit 44780682c56ee436746d8f6cf902d8e07fe7d9f3.
Comment 5 Alessandro Bono 2015-08-27 16:16:44 UTC
Created attachment 310107 [details] [review]
style: Align the source label

Instead of using a GtkLabel with markup, remove the extra
padding with css
Comment 6 Cosimo Cecchi 2015-08-27 16:35:22 UTC
(In reply to Debarshi Ray from comment #3)
> Reopening.
> 
> While this fixes the horizontal alignment issue (thanks for that!), it
> introduces a vertical size issue. Property dialogs that don't have a
> GtkEntry (eg., remote items) have thinner rows now.

Could that be fixed with a vertical size group instead of reverting to buttons?
Comment 7 Debarshi Ray 2015-08-27 18:38:11 UTC
(In reply to Cosimo Cecchi from comment #6)
> (In reply to Debarshi Ray from comment #3)
> > Reopening.
> > 
> > While this fixes the horizontal alignment issue (thanks for that!), it
> > introduces a vertical size issue. Property dialogs that don't have a
> > GtkEntry (eg., remote items) have thinner rows now.
> 
> Could that be fixed with a vertical size group instead of reverting to
> buttons?

A vertical size group might work, but it would need a hack. Since we want to retain the height of the rows across all kinds of dialogs (with and without GtkEntries), we have to always add a row with a hidden entry for that.
Comment 8 Cosimo Cecchi 2015-08-27 18:51:14 UTC
Got it; feel free to revert to buttons then :-)
I think you should remove padding from both sides though, or RTL might break.
Comment 9 Alessandro Bono 2015-08-27 21:09:38 UTC
Created attachment 310133 [details] [review]
properties: Port to templates
Comment 10 Alessandro Bono 2015-08-27 21:15:01 UTC
Created attachment 310136 [details] [review]
properties: Make all rows with the same height
Comment 11 Alessandro Bono 2015-08-28 14:53:01 UTC
Created attachment 310196 [details] [review]
properties: Port to templates
Comment 12 Debarshi Ray 2015-08-31 11:26:08 UTC
Review of attachment 310196 [details] [review]:

Thanks for the port, Alessandro.

There is one unsolved problem in dialogs that have an entry, but not a creation date. eg., a local collection. There is too much space between the rows. I think something is causing the GtkGrid to expand vertically.

::: data/ui/properties-dialog.ui
@@ +45,3 @@
+            <property name="orientation">vertical</property>
+            <property name="row_spacing">6</property>
+            <property name="column_spacing">24</property>

I would suggest setting row-homogeneous to TRUE here. Otherwise, even dialogs with a GtkEntry become shorter. Actually, the way you have arranged the widgets, I think, making the rows homogeneous is enough to ensure that rows have the same height with or without the GtkEntry.

Removing the column-homogenous is OK, because I do not know how it worked the way it did till now and it looks better without it. Even then, we should mention it in the commit message.

@@ +184,3 @@
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>

The GtkGrid needs to have valign=center. Otherwise, titleEntry/titleLabel won't be aligned in dialogs without a creation date.

@@ +192,3 @@
+                    <property name="valign">center</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>

Don't set the valign and vexpand here.

@@ +206,3 @@
+                    <property name="no_show_all">True</property>
+                    <property name="valign">center</property>
+                    <property name="vexpand">True</property>

Ditto.

::: po/POTFILES.in
@@ +10,3 @@
 [type: gettext/glade]data/ui/preview-context-menu.ui
 [type: gettext/glade]data/ui/preview-menu.ui
+[type: gettext/glade]data/ui/properties-dialog.ui

And we can remove src/properties.js.

::: src/properties.js
@@ +54,2 @@
         let toplevel = Application.application.get_windows()[0];
+        this.parent({ transient_for: toplevel, use_header_bar: 1 });

'true', not '1'

@@ +89,3 @@
+            this._author.show()
+            this._authorData.show();
+            this._authorData.set_text(doc.author);

We usually call show after setting the text.

@@ +140,3 @@
+            this._dateCreatedData.set_text(dateCreated.format('%c'));
+            this._dateCreatedData.show();
+            this._dateCreated.show();

This is missing from InternalChildren.
Comment 13 Debarshi Ray 2015-08-31 11:27:49 UTC
Created attachment 310347 [details] [review]
properties: Port to templates

I addressed the above issues, but we still need to figure out why things are expanding vertically for local collections.
Comment 14 Alessandro Bono 2015-09-30 19:46:13 UTC
Created attachment 312448 [details] [review]
properties: Port to templates

Columns are no longer set to homogeneous because we don't want the left
column to be as wide as the right. Earlier, we had a gutter of empty
space on the left edge, which becomes even wider when used with
templates.
Rows aren't set to homogeneous as well because in some dialog there is
too much space between them. The right visual effect will be obtained
using a GtkSizeGroup
Comment 15 Alessandro Bono 2015-09-30 19:46:41 UTC
Created attachment 312449 [details] [review]
properties: Make all rows with the same height
Comment 16 Bastien Nocera 2015-12-09 11:47:33 UTC
Created attachment 317013 [details] [review]
properties: Make all rows with the same height
Comment 17 Bastien Nocera 2015-12-09 11:49:26 UTC
(In reply to Bastien Nocera from comment #16)
> Created attachment 317013 [details] [review] [review]
> properties: Make all rows with the same height

This stops the rows being overly big if there's no text entry in the panel.
Comment 18 GNOME Infrastructure Team 2021-07-05 11:32:23 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-documents/-/issues/

Thank you for your understanding and your help.