diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-01-23 12:07:49 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-01-23 23:44:54 -0500 |
commit | 3f05313ec3d3a98db666e347133528bbd62022f0 (patch) | |
tree | 4e9c417039281ebbe48d60a1a4c63c94e3ff6c90 /gtk/gtkcellrendererprogress.c | |
parent | 9960be7eebd9e32900986b11ebef42c44b10fa94 (diff) | |
download | gtk+-pango-line-breaker.tar.gz |
Port to pango2 apipango-line-breaker
Diffstat (limited to 'gtk/gtkcellrendererprogress.c')
-rw-r--r-- | gtk/gtkcellrendererprogress.c | 6 |
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; |