[gnome-settings-daemon] media-keys: Use constant for icon size in OSD



commit bacb20270cde60cc71bff6723336e50acc3935b2
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jul 1 14:33:56 2011 +0100

    media-keys: Use constant for icon size in OSD

 plugins/media-keys/gsd-media-keys-window.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-window.c b/plugins/media-keys/gsd-media-keys-window.c
index c74e2f8..cbb3efa 100644
--- a/plugins/media-keys/gsd-media-keys-window.c
+++ b/plugins/media-keys/gsd-media-keys-window.c
@@ -34,6 +34,9 @@
 
 #define GSD_MEDIA_KEYS_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_MEDIA_KEYS_WINDOW, GsdMediaKeysWindowPrivate))
 
+/* The size of the icon compared to the whole OSD */
+#define ICON_SCALE 0.65
+
 struct GsdMediaKeysWindowPrivate
 {
         GsdMediaKeysWindowAction action;
@@ -424,8 +427,8 @@ draw_action_volume (GsdMediaKeysWindow *window,
 
         gtk_window_get_size (GTK_WINDOW (window), &window_width, &window_height);
 
-        icon_box_width = round (window_width * 0.65);
-        icon_box_height = round (window_height * 0.65);
+        icon_box_width = round (window_width * ICON_SCALE);
+        icon_box_height = round (window_height * ICON_SCALE);
         volume_box_width = icon_box_width;
         volume_box_height = round (window_height * 0.05);
 
@@ -561,8 +564,8 @@ draw_action_custom (GsdMediaKeysWindow *window,
 
         gtk_window_get_size (GTK_WINDOW (window), &window_width, &window_height);
 
-        icon_box_width = round (window_width * 0.65);
-        icon_box_height = round (window_height * 0.65);
+        icon_box_width = round (window_width * ICON_SCALE);
+        icon_box_height = round (window_height * ICON_SCALE);
         bright_box_width = round (icon_box_width);
         bright_box_height = round (window_height * 0.05);
 



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