[gnome-settings-daemon] media-keys: Remove external define
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] media-keys: Remove external define
- Date: Wed, 18 Apr 2012 15:32:25 +0000 (UTC)
commit 35c27a19c8a6111574b49d1dd51101463c686fb9
Author: Bastien Nocera <hadess hadess net>
Date: Wed Apr 18 13:06:04 2012 +0100
media-keys: Remove external define
It was unused
plugins/media-keys/gsd-osd-window.c | 21 +++++++++++----------
plugins/media-keys/gsd-osd-window.h | 3 ---
2 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/plugins/media-keys/gsd-osd-window.c b/plugins/media-keys/gsd-osd-window.c
index 1206c2e..5535062 100644
--- a/plugins/media-keys/gsd-osd-window.c
+++ b/plugins/media-keys/gsd-osd-window.c
@@ -45,6 +45,7 @@
#define FADE_TIMEOUT 10 /* timeout in ms between each frame of the fade */
#define ICON_SCALE 0.50 /* size of the icon compared to the whole OSD */
#define BG_ALPHA 0.75 /* background transparency */
+#define FG_ALPHA 1.0 /* Alpha value to be used for foreground objects drawn in an OSD window */
#define GSD_OSD_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_OSD_WINDOW, GsdOsdWindowPrivate))
@@ -561,10 +562,10 @@ draw_eject (cairo_t *cr,
cairo_rel_line_to (cr, -width / 2, -tri_height);
cairo_rel_line_to (cr, -width / 2, tri_height);
cairo_close_path (cr);
- cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, GSD_OSD_WINDOW_FG_ALPHA);
+ cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, FG_ALPHA);
cairo_fill_preserve (cr);
- cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, GSD_OSD_WINDOW_FG_ALPHA / 2);
+ cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, FG_ALPHA / 2);
cairo_set_line_width (cr, 2);
cairo_stroke (cr);
}
@@ -623,12 +624,12 @@ draw_cross (cairo_t *cr,
cairo_move_to (cr, cx, cy + size/2.0);
cairo_rel_line_to (cr, size, -size);
- cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, GSD_OSD_WINDOW_FG_ALPHA / 2);
+ cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, FG_ALPHA / 2);
cairo_set_line_width (cr, 14);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
cairo_stroke_preserve (cr);
- cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, GSD_OSD_WINDOW_FG_ALPHA);
+ cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, FG_ALPHA);
cairo_set_line_width (cr, 10);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
cairo_stroke (cr);
@@ -662,10 +663,10 @@ draw_speaker (cairo_t *cr,
cairo_line_to (cr, _x0, _y0);
cairo_close_path (cr);
- cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, GSD_OSD_WINDOW_FG_ALPHA);
+ cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, FG_ALPHA);
cairo_fill_preserve (cr);
- cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, GSD_OSD_WINDOW_FG_ALPHA / 2);
+ cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, FG_ALPHA / 2);
cairo_set_line_width (cr, 2);
cairo_stroke (cr);
}
@@ -694,7 +695,7 @@ render_speaker (GsdOsdDrawContext *ctx,
}
gdk_cairo_set_source_pixbuf (cr, pixbuf, _x0, _y0);
- cairo_paint_with_alpha (cr, GSD_OSD_WINDOW_FG_ALPHA);
+ cairo_paint_with_alpha (cr, FG_ALPHA);
g_object_unref (pixbuf);
@@ -724,7 +725,7 @@ draw_volume_boxes (GsdOsdDrawContext *ctx,
gtk_style_context_get_background_color (ctx->style, GTK_STATE_NORMAL, &acolor);
gsd_osd_window_color_shade (&acolor, DARKNESS_MULT);
gsd_osd_window_color_reverse (&acolor);
- acolor.alpha = GSD_OSD_WINDOW_FG_ALPHA / 2;
+ acolor.alpha = FG_ALPHA / 2;
gsd_osd_window_draw_rounded_rectangle (cr, 1.0, _x0, _y0, height / 6, width, height);
gdk_cairo_set_source_rgba (cr, &acolor);
cairo_fill (cr);
@@ -733,7 +734,7 @@ draw_volume_boxes (GsdOsdDrawContext *ctx,
if (percentage < 0.01)
return;
gtk_style_context_get_background_color (ctx->style, GTK_STATE_NORMAL, &acolor);
- acolor.alpha = GSD_OSD_WINDOW_FG_ALPHA;
+ acolor.alpha = FG_ALPHA;
gsd_osd_window_draw_rounded_rectangle (cr, 1.0, _x0, _y0, height / 6, x1, height);
gdk_cairo_set_source_rgba (cr, &acolor);
cairo_fill (cr);
@@ -869,7 +870,7 @@ render_custom (GsdOsdDrawContext *ctx,
}
gdk_cairo_set_source_pixbuf (cr, pixbuf, _x0, _y0);
- cairo_paint_with_alpha (cr, GSD_OSD_WINDOW_FG_ALPHA);
+ cairo_paint_with_alpha (cr, FG_ALPHA);
g_object_unref (pixbuf);
diff --git a/plugins/media-keys/gsd-osd-window.h b/plugins/media-keys/gsd-osd-window.h
index 2513472..f88fca6 100644
--- a/plugins/media-keys/gsd-osd-window.h
+++ b/plugins/media-keys/gsd-osd-window.h
@@ -45,9 +45,6 @@
G_BEGIN_DECLS
-/* Alpha value to be used for foreground objects drawn in an OSD window */
-#define GSD_OSD_WINDOW_FG_ALPHA 1.0
-
#define GSD_TYPE_OSD_WINDOW (gsd_osd_window_get_type ())
#define GSD_OSD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSD_TYPE_OSD_WINDOW, GsdOsdWindow))
#define GSD_OSD_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSD_TYPE_OSD_WINDOW, GsdOsdWindowClass))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]