[PATCH] resource name redraw fix

Maurice van der Pot <griffon26-bCGDfOjggl9Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.gnome.apps.planner.devel
Message-ID <[email protected]>
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   [email protected]     http://www.gentoo.org
Creator of BiteMe!       griffon26-bCGDfOjggl9Wk0Htik3J/[email protected]   http://www.kfk4ever.com

_______________________________________________
Planner-dev-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/planner-dev-list
planner-resource-name-redraw-fix.patch (text/plain, 884 B)
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) {
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (GNU/Linux)

iD8DBQFGp5v4MGnpIbeahxwRAlVmAJ9bk4kkhjOll2363A6UlDNpDjppFgCgpbe9
JD4RFiJLcW4tadHnTPvFl+Q=
=cKT3
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.