summaryrefslogtreecommitdiff
path: root/gtk/gtkaccellabel.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-07-02 21:32:56 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-07-02 21:32:56 +0000
commitbf87b7c6281f98b44f732c7c1c274129d83c5a7a (patch)
treed595f39147e0ff2a6a7e1eb18b6170093942c547 /gtk/gtkaccellabel.c
parentb02ebc65e4a0aa3d6b198d5491589f4ac3e60365 (diff)
downloadgtk+-bf87b7c6281f98b44f732c7c1c274129d83c5a7a.tar.gz
Use pango_layout_get_pixel_extents() to remove a large number of '/
Sun Jul 2 17:06:40 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkcalendar.c gtk/gtkclist.c gtk/gtkctree.c gtk/gtkhscale.c gtk/gtkprogressbar.c gtk/gtkscale.c gtk/gtkvscale.c gtk/gtkaccellabel.c: Use pango_layout_get_pixel_extents() to remove a large number of '/ PANGO_SCALE'. * gtk/gtk[hv]ruler.c gtk/gtklabel.c: replace some / PANGO_SCALE with PANGO_PIXELS() macro.
Diffstat (limited to 'gtk/gtkaccellabel.c')
-rw-r--r--gtk/gtkaccellabel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c
index bfe338181a..36a2610073 100644
--- a/gtk/gtkaccellabel.c
+++ b/gtk/gtkaccellabel.c
@@ -231,7 +231,7 @@ gtk_accel_label_size_request (GtkWidget *widget,
{
GtkAccelLabel *accel_label;
PangoLayout *layout;
- PangoRectangle logical_rect;
+ gint width;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_ACCEL_LABEL (widget));
@@ -244,9 +244,9 @@ gtk_accel_label_size_request (GtkWidget *widget,
layout = gtk_widget_create_pango_layout (widget);
pango_layout_set_text (layout, accel_label->accel_string, -1);
- pango_layout_get_extents (layout, NULL, &logical_rect);
+ pango_layout_get_pixel_size (layout, &width, NULL);
+ accel_label->accel_string_width = width;
- accel_label->accel_string_width = logical_rect.width / PANGO_SCALE;
g_object_unref (G_OBJECT (layout));
}