Skip to content

Commit 8571454

Browse files
committed
[3010563] misaligned title text when using GTK backend
svn path=/trunk/matplotlib/; revision=8406
1 parent b5ce842 commit 8571454

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/backends/backend_gdk.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,9 @@ def get_text_width_height_descent(self, s, prop, ismath):
308308

309309
layout, inkRect, logicalRect = self._get_pango_layout(s, prop)
310310
l, b, w, h = inkRect
311-
return w, h+1, h + 1
311+
ll, lb, lw, lh = logicalRect
312+
313+
return w, h + 1, h - lh
312314

313315
def new_gc(self):
314316
return GraphicsContextGDK(renderer=self)

0 commit comments

Comments
 (0)