Re: [Planner Dev] "Nonstandard Days" and "Dominant tasks" - 3th patch, additive patch



On Thu, Mar 16, 2006 at 08:30:35AM -0500, Kurt Maute wrote:
> On Wed, 2006-03-15 at 11:21 +0100, Matteo Nastasi wrote:
> > Hi, the third iteration of my work is finished.
> > 
> > This is the report about changes:
> > 
> > MADE IT - "vampire" => "dominant"
> > MADE IT - "Not Standard" => "Nonstandard"
> > MADE IT - Key name "not_standard_days" => "display_nonstandard_days"
> 
> excellent! 
> 
> > MADE IT - change height only when the nonstandard is active
> > ABORTED - editable text field dimension: it's not possible change the effect
> >   and probably it is a bug; see references:
> >   http://mail.gnome.org/archives/gtk-app-devel-list/2006-March/msg00121.html
> >   http://mail.gnome.org/archives/gtk-app-devel-list/2006-March/msg00135.html
> 
> I think this is why Richard said we shouldn't enlarge the treeview
> height.  We'll have to come up with another way to show the nonstandard
> days without changing the height.

I have reduce the y padding from 6 to 4, the bad effect is minimized (nearly disappeared); I think that is acceptable.

This is a patch to apply after you have applied the 3th patch.

> Perhaps shading the gantt bar?
I don't like it, because isn't coerent with other days and because
don't explain how show the not standard days in normal non working days.

Try it please and tell me your opinion.

Regards, Matteo.

-- 
 Matteo Nastasi  -  Milano - Italy  | HomePage: www.alternativeoutput.it
 Sostenere e supportare GNU/Linux ! | IRC:    #linux-mi irc freenode net   
 Milano Linux                       | E-Mail:   matteo nastasi milug org 
        Users Group  www.milug.org  |       nastasi alternativeoutput it
* looking for nastasi alternativeoutput it--projects/planner--mop--0--patch-2 to compare with
* comparing to nastasi alternativeoutput it--projects/planner--mop--0--patch-2
M  src/planner-task-tree.c
M  src/planner-task-tree.h
M  src/planner-gantt-row.c

* modified files

--- orig/src/planner-gantt-row.c
+++ mod/src/planner-gantt-row.c
@@ -570,9 +570,10 @@
 
 			priv->height = tmp_dbl;
 
-			// (6 - 2) * 2 => 6: our pad, 2: default pad, 
-			//                *2 because pad is up and down
-			htask = (priv->height + (nonstd_days ? 0 : ((6-2) * 2))) / 2.0;
+			// (NONSTANDARD_DAYS_YPAD - 2) * 2 => NONSTANDARD_DAYS_YPAD: our pad, 
+                        //           2: default pad, *2 because pad is up and down.
+			htask = (priv->height + (nonstd_days ? 0 :
+						 ((NONSTANDARD_DAYS_YPAD - 2) * 2))) / 2.0;
 
 			priv->bar_top = ((priv->height - htask) / 2.0);
 			priv->bar_bot = ((priv->height + htask) / 2.0);


--- orig/src/planner-task-tree.c
+++ mod/src/planner-task-tree.c
@@ -2282,7 +2282,7 @@
 		/* NOTE: with ypad and yalign add space 
 		   to insert not working bands */
 
-		g_object_set (cell, "ypad", (tree->priv->nonstandard_days ? 6 : 2), NULL);
+		g_object_set (cell, "ypad", (tree->priv->nonstandard_days ? NONSTANDARD_DAYS_YPAD : 2), NULL);
 		g_object_set (cell, "yalign", 0.5, NULL);
 
 		col = gtk_tree_view_column_new_with_attributes (title,
@@ -3610,7 +3610,7 @@
 		for (r = rends ; r ; r = r->next) {
 			ren_cur = r->data;
 			gtk_object_set((GtkObject *)ren_cur, "ypad", 
-				       (nonstandard_days ? 6 : 2), NULL);
+				       (nonstandard_days ? NONSTANDARD_DAYS_YPAD : 2), NULL);
 		}
 	}
 


--- orig/src/planner-task-tree.h
+++ mod/src/planner-task-tree.h
@@ -36,6 +36,9 @@
 #define PLANNER_IS_TASK_TREE_CLASS(klass)	(GTK_CHECK_CLASS_TYPE ((obj), PLANNER_TYPE_TASK_TREE))
 #define PLANNER_TASK_TREE_GET_CLASS(obj)	(GTK_CHECK_GET_CLASS ((obj), PLANNER_TYPE_TASK_TREE, PlannerTaskTreeClass))
 
+/* Padding to set to cellrenderertext when display_nonstandard_days is active. */
+#define NONSTANDARD_DAYS_YPAD   4
+
 typedef struct _PlannerTaskTree           PlannerTaskTree;
 typedef struct _PlannerTaskTreeClass      PlannerTaskTreeClass;
 typedef struct _PlannerTaskTreePriv       PlannerTaskTreePriv;





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