summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2016-09-13 18:09:16 +0200
committerRui Matos <tiagomatos@gmail.com>2016-09-14 21:23:26 +0200
commit194aee00b3323ca0f8219ab4d60498189c90ae7e (patch)
tree94d139f06d23551b9525a4f08e1e10ea9e620a9d
parent5f260b2b73a3eb0a275b657e1aadbc0d133a6177 (diff)
downloadlibgnomekbd-194aee00b3323ca0f8219ab4d60498189c90ae7e.tar.gz
gkbd-keyboard-drawing: Use non-deprecated API to get the font desc
-rw-r--r--libgnomekbd/gkbd-keyboard-drawing.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libgnomekbd/gkbd-keyboard-drawing.c b/libgnomekbd/gkbd-keyboard-drawing.c
index 64e62ea..81cab11 100644
--- a/libgnomekbd/gkbd-keyboard-drawing.c
+++ b/libgnomekbd/gkbd-keyboard-drawing.c
@@ -1466,9 +1466,7 @@ alloc_render_context (GkbdKeyboardDrawing * drawing)
pango_layout_set_ellipsize (context->layout, PANGO_ELLIPSIZE_END);
context->font_desc =
- pango_font_description_copy (gtk_widget_get_style
- (GTK_WIDGET
- (drawing))->font_desc);
+ pango_font_description_copy (pango_context_get_font_description (pangoContext));
context->angle = 0;
context->scale_numerator = 1;
context->scale_denominator = 1;
@@ -2249,13 +2247,13 @@ gkbd_keyboard_drawing_render (GkbdKeyboardDrawing * kbdrawing,
gtk_widget_get_state_flags (GTK_WIDGET (kbdrawing));
GtkStyleContext *style_context =
gtk_widget_get_style_context (GTK_WIDGET (kbdrawing));
+ PangoContext *pangoContext =
+ gtk_widget_get_pango_context (GTK_WIDGET (kbdrawing));
GkbdKeyboardDrawingRenderContext context = {
cr,
kbdrawing->renderContext->angle,
layout,
- pango_font_description_copy (gtk_widget_get_style
- (GTK_WIDGET
- (kbdrawing))->font_desc),
+ pango_font_description_copy (pango_context_get_font_description (pangoContext)),
1, 1
};