summaryrefslogtreecommitdiff
path: root/gtk/gtkscale.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/gtkscale.c
parentb02ebc65e4a0aa3d6b198d5491589f4ac3e60365 (diff)
downloadgdk-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/gtkscale.c')
-rw-r--r--gtk/gtkscale.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index dd23790bd..a23b81614 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -300,12 +300,12 @@ gtk_scale_get_value_size (GtkScale *scale,
buffer[i] = '\0';
pango_layout_set_text (layout, buffer, i);
- pango_layout_get_extents (layout, NULL, &logical_rect);
+ pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
if (width)
- *width = logical_rect.width / PANGO_SCALE;
+ *width = logical_rect.width;
if (height)
- *height = logical_rect.width / PANGO_SCALE;
+ *height = logical_rect.width;
value = ABS (range->adjustment->upper);
if (value == 0) value = 1;
@@ -325,12 +325,12 @@ gtk_scale_get_value_size (GtkScale *scale,
buffer[i] = '\0';
pango_layout_set_text (layout, buffer, i);
- pango_layout_get_extents (layout, NULL, &logical_rect);
+ pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
if (width)
- *width = MAX (*width, logical_rect.width / PANGO_SCALE);
+ *width = MAX (*width, logical_rect.width);
if (height)
- *height = MAX (*height, logical_rect.height / PANGO_SCALE);
+ *height = MAX (*height, logical_rect.height);
g_object_unref (G_OBJECT (layout));
}