[epiphany/wip/exalm/tnum] download-widget: Use tabular numbers for status



commit 04460c8befe3491719f898b238d373e288b37111
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Jan 24 19:49:37 2020 +0500

    download-widget: Use tabular numbers for status
    
    Avoid jumping around by making the digits have fixed width when the font
    supports it.

 lib/widgets/ephy-download-widget.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index 8ca0442ba..748e3ea20 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -355,6 +355,7 @@ ephy_download_widget_constructed (GObject *object)
   WebKitDownload *download;
   const char *action_icon_name = NULL;
   GError *error = NULL;
+  PangoAttrList *status_attrs;
 
   G_OBJECT_CLASS (ephy_download_widget_parent_class)->constructed (object);
 
@@ -395,6 +396,11 @@ ephy_download_widget_constructed (GObject *object)
   g_object_set (widget->status, "width-request", 260, NULL);
   gtk_label_set_max_width_chars (GTK_LABEL (widget->status), 30);
   gtk_label_set_ellipsize (GTK_LABEL (widget->status), PANGO_ELLIPSIZE_END);
+  status_attrs = pango_attr_list_new ();
+  pango_attr_list_insert (status_attrs, pango_attr_font_features_new ("tnum=1"));
+  gtk_label_set_attributes (GTK_LABEL (widget->status), status_attrs);
+  pango_attr_list_unref (status_attrs);
+
   if (ephy_download_failed (widget->download, &error)) {
     g_autofree char *error_msg = NULL;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]