summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrendererprogress.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkcellrendererprogress.c')
-rw-r--r--gtk/gtkcellrendererprogress.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtkcellrendererprogress.c b/gtk/gtkcellrendererprogress.c
index 8139a3b058..b89d799533 100644
--- a/gtk/gtkcellrendererprogress.c
+++ b/gtk/gtkcellrendererprogress.c
@@ -289,7 +289,8 @@ compute_dimensions (GtkCellRenderer *cell,
int xpad, ypad;
layout = gtk_widget_create_pango_layout (widget, text);
- pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
+ pango_lines_get_extents (pango_layout_get_lines (layout), NULL, &logical_rect);
+ pango_extents_to_pixels (&logical_rect, NULL);
gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
@@ -506,7 +507,8 @@ gtk_cell_renderer_progress_snapshot (GtkCellRenderer *cell,
float text_xalign;
layout = gtk_widget_create_pango_layout (widget, priv->label);
- pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
+ pango_lines_get_extents (pango_layout_get_lines (layout), NULL, &logical_rect);
+ pango_extents_to_pixels (&logical_rect, NULL);
if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_LTR)
text_xalign = 1.0 - priv->text_xalign;