mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
make gradient a bit more subtle (don't go to the full background, but to a
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)
This commit is contained in:
parent
f36ba88085
commit
9ed27d3dcb
@ -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>
|
2002-01-06 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* src/window.c (meta_window_notify_focus): put in attempted fix
|
* src/window.c (meta_window_notify_focus): put in attempted fix
|
||||||
|
11
src/frames.c
11
src/frames.c
@ -1759,12 +1759,21 @@ meta_frames_expose_event (GtkWidget *widget,
|
|||||||
if (flags & META_FRAME_HAS_FOCUS)
|
if (flags & META_FRAME_HAS_FOCUS)
|
||||||
{
|
{
|
||||||
GdkPixbuf *gradient;
|
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];
|
layout_gc = widget->style->fg_gc[GTK_STATE_SELECTED];
|
||||||
|
|
||||||
gradient = meta_theme_get_gradient (META_GRADIENT_DIAGONAL,
|
gradient = meta_theme_get_gradient (META_GRADIENT_DIAGONAL,
|
||||||
|
&selected_faded,
|
||||||
&widget->style->bg[GTK_STATE_SELECTED],
|
&widget->style->bg[GTK_STATE_SELECTED],
|
||||||
&widget->style->bg[GTK_STATE_NORMAL],
|
|
||||||
fgeom.title_rect.width,
|
fgeom.title_rect.width,
|
||||||
fgeom.title_rect.height);
|
fgeom.title_rect.height);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user