aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2012-05-21 16:48:53 +0800
committerSjoerd Simons <sjoerd@luon.net>2012-05-21 19:54:00 +0800
commit246b14f2722e6aac0c9744e49edd70594846f004 (patch)
tree56a62f6efbb4a409f5b52102a8445318d2f9c971
parent4f2d28ecffbd3b5f77b81539fba0f7ce66618ed9 (diff)
downloadgsoc2013-empathy-246b14f2722e6aac0c9744e49edd70594846f004.tar
gsoc2013-empathy-246b14f2722e6aac0c9744e49edd70594846f004.tar.gz
gsoc2013-empathy-246b14f2722e6aac0c9744e49edd70594846f004.tar.bz2
gsoc2013-empathy-246b14f2722e6aac0c9744e49edd70594846f004.tar.lz
gsoc2013-empathy-246b14f2722e6aac0c9744e49edd70594846f004.tar.xz
gsoc2013-empathy-246b14f2722e6aac0c9744e49edd70594846f004.tar.zst
gsoc2013-empathy-246b14f2722e6aac0c9744e49edd70594846f004.zip
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.
-rw-r--r--src/empathy-call-window.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 38aebe669..67b1aea0b 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);