diff --git a/ChangeLog b/ChangeLog index e8668196a..76ef57a15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-01-07 Havoc Pennington + + * src/frames.c (meta_frames_expose_event): make gradient a bit + more subtle (don't go to the full background, but to a blend of + selection and background; put lighter color on top) + 2002-01-06 Havoc Pennington * src/window.c (meta_window_notify_focus): put in attempted fix diff --git a/src/frames.c b/src/frames.c index 10dd5af71..cb93a231f 100644 --- a/src/frames.c +++ b/src/frames.c @@ -1759,12 +1759,21 @@ meta_frames_expose_event (GtkWidget *widget, if (flags & META_FRAME_HAS_FOCUS) { GdkPixbuf *gradient; + GdkColor selected_faded; + const GdkColor *bg = &widget->style->bg[GTK_STATE_NORMAL]; + /* alpha blend selection color into normal color */ +#define ALPHA 25000 + selected_faded = widget->style->bg[GTK_STATE_SELECTED]; + selected_faded.red = selected_faded.red + (((bg->red - selected_faded.red) * ALPHA + 32768) >> 16); + selected_faded.green = selected_faded.green + (((bg->green - selected_faded.green) * ALPHA + 32768) >> 16); + selected_faded.blue = selected_faded.blue + (((bg->blue - selected_faded.blue) * ALPHA + 32768) >> 16); + layout_gc = widget->style->fg_gc[GTK_STATE_SELECTED]; gradient = meta_theme_get_gradient (META_GRADIENT_DIAGONAL, + &selected_faded, &widget->style->bg[GTK_STATE_SELECTED], - &widget->style->bg[GTK_STATE_NORMAL], fgeom.title_rect.width, fgeom.title_rect.height);