[PATCH] resource name redraw fix



Hi guys,

This small patch fixes the incorrect redrawing of resource names in the
gantt chart when dragging a relation arrow over it. Currently you will
see the text jumping up and down a little when you drag over it.

Additionally the offset of the text is increased vertically by one pixel
to align perfectly with the text in the task tree and with the center of
the task bar.

A short recording of the problem can be found here (for those who can
play ogg/theora): http://griffon26.kfk4ever.com/~griffon26/planner.ogg


Kurt, can you check if this doesn't make things worse for you? You seem
to have determined the old value empirically.

Maurice.

-- 
Maurice van der Pot

Gentoo Linux Developer   griffon26 gentoo org     http://www.gentoo.org
Creator of BiteMe!       griffon26 kfk4ever com   http://www.kfk4ever.com

Index: src/planner-gantt-row.c
===================================================================
--- src/planner-gantt-row.c	(revision 846)
+++ src/planner-gantt-row.c	(working copy)
@@ -1956,13 +1956,13 @@
 
 	if (priv->layout != NULL && rx1 < rx2) {
 		/* NOTE: cy1 - priv->bar_top: report to the top of the cell,
-		         + 3: is an empirical value to realign with task-tree result of the
-		         default gtkcellrenderertext ypad property (2) + 1 ??? ;). */
+		         + 3.5: is an empirical value to realign with task-tree result of the
+		         default gtkcellrenderertext ypad property (2) + 1.5 ??? ;). */
 		   
 		draw_cut_layout (drawable,
 				 GTK_WIDGET (item->canvas)->style->text_gc[GTK_STATE_NORMAL],
 				 cx2 + TEXT_PADDING,
-				 cy1 - priv->bar_top + 3, 
+				 cy1 - priv->bar_top + 3.5, 
 				 priv->layout);
 
 		if (priv->mouse_over_index != -1) {

Attachment: pgpONq2SWbH1x.pgp
Description: PGP signature



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