[libgd/wip/rishi/two-lines: 1/4] main-icon-view: Explicitly specify the vertical alignment of the text



commit 49269e4e6fdcb6b78ee98ab251cf3e972e4812a0
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Feb 1 19:52:51 2018 +0100

    main-icon-view: Explicitly specify the vertical alignment of the text
    
    The text rendered by the TwoLinesRenderer is vertically aligned to
    touch its border with the TogglePixbufRenderer. This was only working
    this way because TwoLinesRenderer was ignoring its y-offset and always
    treating it as zero.
    
    Ignoring the y-offset causes problems when the TwoLinesRenderer needs
    to obey some other alignment, and will, therefore, be fixed in the
    subsequent commits. To prevent those fixes from breaking the
    MainIconView it is necessary to specify the desired vertical alignment.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792665

 libgd/gd-main-icon-view.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libgd/gd-main-icon-view.c b/libgd/gd-main-icon-view.c
index bff4d15..1f048dc 100644
--- a/libgd/gd-main-icon-view.c
+++ b/libgd/gd-main-icon-view.c
@@ -151,6 +151,7 @@ gd_main_icon_view_constructed (GObject *obj)
   priv->text_cell = cell = gd_two_lines_renderer_new ();
   g_object_set (cell,
                 "xalign", 0.5,
+                "yalign", 0.0,
                 "alignment", PANGO_ALIGN_CENTER,
                 "wrap-mode", PANGO_WRAP_WORD_CHAR,
                 "wrap-width", VIEW_ITEM_WRAP_WIDTH,


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