diff options
author | Isaque Galdino <igaldino@gmail.com> | 2018-02-01 18:45:44 +0100 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2018-02-01 19:53:09 +0100 |
commit | 9117650bda7f981ccb41adce8018bbbe45cdb3b3 (patch) | |
tree | 98101aa3cd3f35a19bd46842ac1df4cc074bc15d | |
parent | dea06ecf1c29c9463c52ff49df5aaa57b78d92d0 (diff) | |
download | libgd-9117650bda7f981ccb41adce8018bbbe45cdb3b3.tar.gz |
two-lines-renderer: Don't ignore the y-offset when rendering
Otherwise, currently, the text is oddly biased towards the upper edge
of the cell. This is very clearly noticeable when there's no sub-title,
but is also discernable, although to a lesser degree, when there is.
This also matches what GtkCellRendererText does.
Some changes by Debarshi Ray.
https://bugzilla.gnome.org/show_bug.cgi?id=792665
-rw-r--r-- | libgd/gd-two-lines-renderer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libgd/gd-two-lines-renderer.c b/libgd/gd-two-lines-renderer.c index 85c033a..a2c3fdc 100644 --- a/libgd/gd-two-lines-renderer.c +++ b/libgd/gd-two-lines-renderer.c @@ -305,6 +305,7 @@ gd_two_lines_renderer_render (GtkCellRenderer *cell, render_area = area; render_area.x += x_offset_1 - layout_rect.x; + render_area.y += y_offset; gtk_render_layout (context, cr, render_area.x, @@ -328,7 +329,7 @@ gd_two_lines_renderer_render (GtkCellRenderer *cell, render_area = area; render_area.x += x_offset_2 - layout_rect.x; - render_area.y += line_one_height; + render_area.y += y_offset + line_one_height; gtk_render_layout (context, cr, render_area.x, |