summaryrefslogtreecommitdiff
path: root/x11/wxGTK24/patches/patch-af
blob: 351bd60dcd9f9c4f6a44f232d717965efca11949 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$NetBSD: patch-af,v 1.1.1.1 2005/08/07 11:27:29 wiz Exp $

--- src/gtk/window.cpp.orig	2003-09-21 13:31:58.000000000 +0200
+++ src/gtk/window.cpp	2005-01-02 14:11:08.000000000 +0100
@@ -3448,8 +3448,10 @@
     if (y) (*y) = (wxCoord) (rect.height / PANGO_SCALE);
     if (descent)
     {
-        // Do something about metrics here
-        (*descent) = 0;
+        PangoLayoutIter *iter = pango_layout_get_iter(layout);
+        int baseline = pango_layout_iter_get_baseline(iter);
+        pango_layout_iter_free(iter);
+        *descent = *y - PANGO_PIXELS(baseline);
     }
     if (externalLeading) (*externalLeading) = 0;  // ??