Re: patch for drawing left frame in usage row bars



On Mon, Aug 25, 2008 at 03:38:20AM +0100, Lee Baylis wrote:
> My first planner patch - whilst tinkering around in planner-usage-row.c I 
> found a FIXME line which was near to what I happened to be playing with, so 
> I have fixed it.

I have reviewed the problem and the patch and I think that the reason
the problem was introduced is that two independent conditions (whether
the left side was at the start date and whether the right side was at
the end date) were forced into one enum.

I'd rather prefer to undo this initial decision, by for instance passing
two booleans to usage_row_draw_resource_ival() or using a bitmask
instead of an enum, instead of extending the enum with a ROW_WHOLE value
and complicating the conditions of if statements in
usage_row_draw_resource_ival() and usage_row_draw_resource().


By the way, I disagree with the other FIXME that is present near the
part of the code you changed:

        /* FIXME: This should be changed to draw the rectangle frame in one
         * piece, then fill the different colors.
         */

The shadow of the bars differs depending on whether it is at the start,
middle or end, so the information required for drawing the frame is
already present in usage_row_draw_resource_ival(). I see no reason for
moving frame drawing out of this function, so I'm fine with it if you
remove the FIXME comment.


Regards,
Maurice.

-- 
Maurice van der Pot

Gentoo Linux Developer   griffon26 gentoo org    http://www.gentoo.org
Gnome Planner Developer  griffon26 kfk4ever com  http://live.gnome.org/Planner

Attachment: pgp3fwbkqSjTa.pgp
Description: PGP signature



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