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 706897 - Add printer dialog - "No printers detected" should be vertically centered
Add printer dialog - "No printers detected" should be vertically centered
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Printers
3.9.x
Other Linux
: Normal enhancement
: ---
Assigned To: Marek Kašík
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-27 14:31 UTC by Allan Day
Modified: 2014-02-12 15:17 UTC
See Also:
GNOME target: ---
GNOME version: 3.9/3.10


Attachments
screenshot (65.75 KB, image/png)
2013-08-27 14:31 UTC, Allan Day
  Details
Vertically center text for no devices (2.72 KB, patch)
2013-10-15 15:00 UTC, Marek Kašík
reviewed Details | Review
corresponding screenshot (12.91 KB, image/png)
2013-10-15 15:00 UTC, Marek Kašík
  Details
printers: Vertically center text for no devices (5.86 KB, patch)
2013-10-24 11:31 UTC, Marek Kašík
none Details | Review
Vertically center text for no devices (6.34 KB, patch)
2014-02-12 14:17 UTC, Marek Kašík
committed Details | Review
updated screenshot (8.11 KB, image/png)
2014-02-12 14:18 UTC, Marek Kašík
  Details

Description Allan Day 2013-08-27 14:31:47 UTC
Created attachment 253259 [details]
screenshot

The "No printers detected" string currently sits at the top of the list (see attached screenshot), which looks a bit strange, doesn't attract attention, and leaves a big gap below.

It would be better if the string was located in the middle of the list.
Comment 1 Marek Kašík 2013-10-15 15:00:27 UTC
Created attachment 257350 [details] [review]
Vertically center text for no devices

Attached patch moves the text to the center of the treeview. It sets height of rows to 1/3 of the treeview and adds empty row above the one with the text.
Comment 2 Marek Kašík 2013-10-15 15:00:47 UTC
Created attachment 257351 [details]
corresponding screenshot
Comment 3 Matthias Clasen 2013-10-16 18:08:54 UTC
Review of attachment 257350 [details] [review]:

thats a bit of a cumbersome way to do this. I would suggest to hide the treeview if it is empty, and place a label there instead, with h/valign == center
Comment 4 Marek Kašík 2013-10-24 11:31:04 UTC
Created attachment 258002 [details] [review]
printers: Vertically center text for no devices

(In reply to comment #3)
> Review of attachment 257350 [details] [review]:
> 
> thats a bit of a cumbersome way to do this. I would suggest to hide the
> treeview if it is empty, and place a label there instead, with h/valign ==
> center

You are right. I somehow forgot that the border is drawn by the GtkScrolledWindow and not by the GtkTreeView so I wanted to preserve the treeview there.
I've changed it so the there is a GtkStack inside the GtkScrolledWindow which contains the treeview and the new GtkLabel. I switch betweeen them as needed.
Comment 5 Marek Kašík 2014-02-12 14:17:25 UTC
Created attachment 268916 [details] [review]
Vertically center text for no devices

Updated patch. I forgot to set minimal width of the column with icons to 80 pixels.
Comment 6 Marek Kašík 2014-02-12 14:18:36 UTC
Created attachment 268917 [details]
updated screenshot
Comment 7 Bastien Nocera 2014-02-12 14:51:02 UTC
Review of attachment 268916 [details] [review]:

Looks fine, but please get the ack from the designers.

::: panels/printers/new-printer-dialog.ui
@@ +149,3 @@
+                            <property name="can_focus">False</property>
+                            <property name="sensitive">False</property>
+                            <property name="label" translatable="yes" comments="Translators: No printers were found">No printers detected.</property>

Is this really useful as a comment?
Comment 8 Allan Day 2014-02-12 15:04:15 UTC
Looks better indeed. Might be better with a symbolic printer icon above and without the bold weight, but don't let that stop you from landing this.
Comment 9 Marek Kašík 2014-02-12 15:16:53 UTC
Comment on attachment 268916 [details] [review]
Vertically center text for no devices

(In reply to comment #7)
> Review of attachment 268916 [details] [review]:
> ::: panels/printers/new-printer-dialog.ui
> @@ +149,3 @@
> +                            <property name="can_focus">False</property>
> +                            <property name="sensitive">False</property>
> +                            <property name="label" translatable="yes"
> comments="Translators: No printers were found">No printers detected.</property>
> 
> Is this really useful as a comment?

I guess not because the string is self-explanatory. But since all translated strings should have a comment for translators, I tried to comment it in a little different way.


(In reply to comment #8)
> Looks better indeed. Might be better with a symbolic printer icon above and
> without the bold weight, but don't let that stop you from landing this.

Thank you all for the reviews.