diff options
author | waker <wakeroid@gmail.com> | 2009-08-22 22:39:09 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2009-08-22 22:39:09 +0200 |
commit | bf396e17c3624229bd77c5e5002facba3d5cef44 (patch) | |
tree | fc8976bb40aaddfc758765426f61818ae5aa055f /gdkdrawing.c | |
parent | fbd4f538e224e42a651a3e3ef60e89d3d172f50b (diff) |
fixed several gtk style compatibility issues
Diffstat (limited to 'gdkdrawing.c')
-rw-r--r-- | gdkdrawing.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdkdrawing.c b/gdkdrawing.c index 87e51220..d14f5499 100644 --- a/gdkdrawing.c +++ b/gdkdrawing.c @@ -94,10 +94,12 @@ draw_init_font (void) { } float -draw_get_text_size (void) { +draw_get_font_size (void) { + GdkScreen *screen = gdk_screen_get_default (); + float dpi = gdk_screen_get_resolution (screen); GtkStyle *style = gtk_widget_get_default_style (); PangoFontDescription *desc = style->font_desc; - return (float)pango_font_description_get_size (desc) / PANGO_SCALE * 96 / 72; + return (float)pango_font_description_get_size (desc) / PANGO_SCALE * dpi / 72; } void |