diff options
author | Andy Hertzfeld <andy@src.gnome.org> | 2000-09-12 08:13:00 +0000 |
---|---|---|
committer | Andy Hertzfeld <andy@src.gnome.org> | 2000-09-12 08:13:00 +0000 |
commit | 9b9e79d172ff3f80d854eefff8fec63e78898c61 (patch) | |
tree | c6f67a61ac4ddfcb9212aeea6f04d1c916c69c50 | |
parent | 69b71df37d4919c8af25027198172eed33005265 (diff) | |
download | nautilus-9b9e79d172ff3f80d854eefff8fec63e78898c61.tar.gz |
fixed bug 2979, numbers in zoom control need to prelight, too.
fixed bug 2979, numbers in zoom control need to prelight, too.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/nautilus-zoom-control.c | 14 |
2 files changed, 18 insertions, 1 deletions
@@ -1,5 +1,10 @@ 2000-09-12 Andy Hertzfeld <andy@eazel.com> + * src/nautilus-zoom-control.c: (draw_number): + fixed bug 2979, numbers in zoom control need to prelight, too. + +2000-09-12 Andy Hertzfeld <andy@eazel.com> + * components/music/nautilus-music-view.c: (determine_attribute): fixed bug 2160, don't display album title and artist for mixed directories in music view. diff --git a/src/nautilus-zoom-control.c b/src/nautilus-zoom-control.c index 15f571827..e9171a876 100644 --- a/src/nautilus-zoom-control.c +++ b/src/nautilus-zoom-control.c @@ -281,8 +281,10 @@ void draw_number (GtkWidget *widget, GdkRectangle *box) int char_height, char_width, char_offset; int num_v_offset, num_h_offset; NautilusZoomControl *zoom_control; + GdkPixbuf *number_pixbuf; zoom_control = NAUTILUS_ZOOM_CONTROL (widget); + number_pixbuf = NULL; num_v_offset = get_zoom_offset ("NUMBER_V_OFFSET"); num_h_offset = get_zoom_offset ("NUMBER_H_OFFSET"); @@ -301,11 +303,17 @@ void draw_number (GtkWidget *widget, GdkRectangle *box) if (zoom_control->details->number_strip) { cur_char = &buffer[0]; char_height = gdk_pixbuf_get_height (zoom_control->details->number_strip); + + number_pixbuf = zoom_control->details->number_strip; + if (zoom_control->details->prelight_mode == PRELIGHT_CENTER) { + number_pixbuf = nautilus_create_spotlight_pixbuf (number_pixbuf); + } + while (*cur_char) { /* draw the character */ char_offset = (*cur_char++ - '0') * char_width; - gdk_pixbuf_render_to_drawable_alpha (zoom_control->details->number_strip, + gdk_pixbuf_render_to_drawable_alpha (number_pixbuf, widget->window, char_offset, 0, x, y, char_width, @@ -324,6 +332,10 @@ void draw_number (GtkWidget *widget, GdkRectangle *box) gdk_font_unref(label_font); } + if (number_pixbuf != zoom_control->details->number_strip) { + gdk_pixbuf_unref (number_pixbuf); + } + gdk_gc_unref(temp_gc); } |