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/gtkhruler.c | |
parent | b02ebc65e4a0aa3d6b198d5491589f4ac3e60365 (diff) | |
download | gdk-pixbuf-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/gtkhruler.c')
-rw-r--r-- | gtk/gtkhruler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkhruler.c b/gtk/gtkhruler.c index 8ddc5399b..7f5ee26b3 100644 --- a/gtk/gtkhruler.c +++ b/gtk/gtkhruler.c @@ -169,14 +169,14 @@ gtk_hruler_draw_ticks (GtkRuler *ruler) xthickness = widget->style->xthickness; ythickness = widget->style->ythickness; - digit_height = ink_rect.height / PANGO_SCALE + 2; + digit_height = PANGO_PIXELS (ink_rect.height) + 2; digit_offset = ink_rect.y; layout = gtk_widget_create_pango_layout (widget); pango_layout_set_text (layout, "012456789", -1); pango_layout_get_extents (layout, &ink_rect, &logical_rect); - digit_height = ink_rect.height / PANGO_SCALE + 1; + digit_height = PANGO_PIXELS (ink_rect.height) + 1; digit_offset = ink_rect.y; width = widget->allocation.width; @@ -263,7 +263,7 @@ gtk_hruler_draw_ticks (GtkRuler *ruler) pango_layout_get_extents (layout, &logical_rect, NULL); gdk_draw_layout (ruler->backing_store, gc, - pos + 2, ythickness + (logical_rect.y - digit_offset) / PANGO_SCALE, + pos + 2, ythickness + PANGO_PIXELS (logical_rect.y - digit_offset), layout); } } |