summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2018-02-01 19:52:51 +0100
committerDebarshi Ray <debarshir@gnome.org>2018-02-01 19:53:09 +0100
commit49269e4e6fdcb6b78ee98ab251cf3e972e4812a0 (patch)
treed1b900672458f549d697a357ab277a03379a534b
parent4e0f712f570716886ebb6983e6fae5411d82d30c (diff)
downloadlibgd-49269e4e6fdcb6b78ee98ab251cf3e972e4812a0.tar.gz
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
-rw-r--r--libgd/gd-main-icon-view.c1
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,