diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-07-02 21:32:56 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-07-02 21:32:56 +0000 |
commit | bf87b7c6281f98b44f732c7c1c274129d83c5a7a (patch) | |
tree | d595f39147e0ff2a6a7e1eb18b6170093942c547 /gtk/gtkaccellabel.c | |
parent | b02ebc65e4a0aa3d6b198d5491589f4ac3e60365 (diff) | |
download | gtk+-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.c | 6 |
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)); } |