[empathy/gnome-3-4] call: Adjust the preview rectangle colors



commit 246b14f2722e6aac0c9744e49edd70594846f004
Author: Sjoerd Simons <sjoerd luon net>
Date:   Mon May 21 10:48:53 2012 +0200

    call: Adjust the preview rectangle colors
    
    As our default background is now black the non-highlighted previews
    get hard to see. Change the rectangle colors to white for the
    highlighted version and a darkened white for the non-highlighted.

 src/empathy-call-window.c |   31 ++++---------------------------
 1 files changed, 4 insertions(+), 27 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 38aebe6..67b1aea 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -845,50 +845,27 @@ empathy_call_window_move_video_preview (EmpathyCallWindow *self,
 }
 
 static void
-_clutter_color_from_rgba (ClutterColor *color,
-                          const GdkRGBA *rgba)
-{
-  color->red = (guint8) floor (rgba->red * 255);
-  color->green = (guint8) floor (rgba->green * 255);
-  color->blue = (guint8) floor (rgba->blue * 255);
-  color->alpha = (guint8) floor (rgba->alpha * 255);
-}
-
-static void
 empathy_call_window_highlight_preview_rectangle (EmpathyCallWindow *self,
     PreviewPosition pos)
 {
   ClutterActor *rectangle;
-  GtkStyleContext *context;
-  GdkRGBA rgba;
-  ClutterColor color, highlight;
+  ClutterColor white = { 0xff, 0xff, 0xff, 0xff};
 
   rectangle = empathy_call_window_get_preview_rectangle (self, pos);
-  context = gtk_widget_get_style_context (GTK_WIDGET (self));
-  gtk_style_context_get_color (context, 0, &rgba);
-
-  _clutter_color_from_rgba (&color, &rgba);
-  clutter_color_shade (&color, 1.4, &highlight);
 
   empathy_rounded_rectangle_set_border_width (
       EMPATHY_ROUNDED_RECTANGLE (rectangle), 2 * SELF_VIDEO_SECTION_MARGIN);
   empathy_rounded_rectangle_set_border_color (
-      EMPATHY_ROUNDED_RECTANGLE (rectangle), &highlight);
+      EMPATHY_ROUNDED_RECTANGLE (rectangle), &white);
 }
 
 static void
 empathy_call_window_darken_preview_rectangle (EmpathyCallWindow *self,
     ClutterActor *rectangle)
 {
-  GtkStyleContext *context;
-  GdkRGBA rgba;
-  ClutterColor color, darker;
-
-  context = gtk_widget_get_style_context (GTK_WIDGET (self));
-  gtk_style_context_get_background_color (context, 0, &rgba);
+  ClutterColor white = { 0xff, 0xff, 0xff, 0xff}, darker;
 
-  _clutter_color_from_rgba (&color, &rgba);
-  clutter_color_shade (&color, 0.55, &darker);
+  clutter_color_shade (&white, 0.55, &darker);
 
   empathy_rounded_rectangle_set_border_width (
       EMPATHY_ROUNDED_RECTANGLE (rectangle), 1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]