summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/frames.c13
2 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e866819..76ef57a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-07 Havoc Pennington <hp@redhat.com>
+
+ * 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 <hp@pobox.com>
* src/window.c (meta_window_notify_focus): put in attempted fix
diff --git a/src/frames.c b/src/frames.c
index 10dd5af..cb93a23 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);