GNOME Bugzilla – Bug 393620
Gantt header width in HTML output is incorrect if tasks fit on single screen
Last modified: 2008-02-09 17:13:53 UTC
Please describe the problem: If all tasks in the exported HTML gantt fit on a single screen, then the right side of the gantt chart is expanded to fill the screen. Because of this the width of the header cells is increased, while the task bars stay the same length. Steps to reproduce: 1. create a planner file with one small task (a few days) 2. export to HTML 3. open in a large browser window to give the chart plenty of room (decreasing font size has the same result) Actual results: Expected results: Does this happen every time? Other information:
Created attachment 79547 [details] [review] Small patch to html1_gantt.xsl This patch fixes the issue by adding an empty column to the gantt table that fills up the remaining space of the parent table. It has a disadvantage though: the column is still visible (1 or 2 pixels wide) if the gantt chart is larger than the browser window (scroll to the end to see it). An alternative solution would be to not have the table fill 100% of the browser window width, but I didn't like how that looked.
Created attachment 79627 [details] [review] Better patch to html1_gantt.xsl I've created a better patch. The previous one did not work in all cases with Firefox and did not work at all with Internet Explorer. The new patch changes the right-hand table in the gantt like this: - it adds an empty column with unspecified width to the end of each row - it sets table-layout to fixed - it explicitly sets width for all cells in the top row except the last one This not only fixes the problem for which this bug was submitted, but also the widening of day headers if font sizes are increased. Now the headers stay aligned with the task bars regardless of font size.
This was fixed in revision 844 with a different version of the patch that was sent to the planner-dev mailing list: http://mail.gnome.org/archives/planner-dev-list/2007-June/msg00000.html