[gnome-color-manager] Make the CIE x and y offset scale as the widget is resized



commit 9757a9d0d8b2fe33783595ba91a3a191855865bc
Author: Richard Hughes <richard hughsie com>
Date:   Thu Dec 3 16:20:42 2009 +0000

    Make the CIE x and y offset scale as the widget is resized

 src/gcm-cie-widget.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gcm-cie-widget.c b/src/gcm-cie-widget.c
index 785b911..960e10b 100644
--- a/src/gcm-cie-widget.c
+++ b/src/gcm-cie-widget.c
@@ -577,8 +577,6 @@ gcm_cie_widget_init (GcmCieWidget *cie)
 	cie->priv->blue_x = 0;
 	cie->priv->blue_y = 0;
 	cie->priv->use_grid = TRUE;
-	cie->priv->x_offset = 20.0f;
-	cie->priv->y_offset = 10.0f;
 	cie->priv->tongue_buffer = g_ptr_array_new_with_free_func (g_free);
 
 	/* default is CIE REC 709 */
@@ -1194,6 +1192,8 @@ gcm_cie_widget_draw_cie (GtkWidget *cie_widget, cairo_t *cr)
 	gtk_widget_get_allocation (cie_widget, &allocation);
 	cie->priv->chart_height = allocation.height;
 	cie->priv->chart_width = allocation.width;
+	cie->priv->x_offset = cie->priv->chart_width / 18.0f;
+	cie->priv->y_offset = cie->priv->chart_height / 20.0f;
 
 	/* cie background */
 	gcm_cie_widget_draw_bounding_box (cr, 0, 0, cie->priv->chart_width, cie->priv->chart_height);



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