From 03fbb1f34f953336842e94722a3e59eda59f99b0 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 22 May 2011 03:53:02 +0200 Subject: [PATCH] label: Account for y-translation when rotating --- gtk/gtklabel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 0b35c96466..169117f232 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -3966,9 +3966,9 @@ get_layout_location (GtkLabel *label, * middle". You want to read the first line, at least, to get some context. */ if (pango_layout_get_line_count (priv->layout) == 1) - y = floor (allocation.y + ypad + (allocation.height - req_height) * yalign); + y = floor (allocation.y + ypad + (allocation.height - req_height) * yalign) - logical.y; else - y = floor (allocation.y + ypad + MAX ((allocation.height - req_height) * yalign, 0)); + y = floor (allocation.y + ypad + MAX ((allocation.height - req_height) * yalign, 0)) - logical.y; if (xp) *xp = x;