Bug 1383: Fixed corner case of deadline and current day right position

The background position of the current day and deadline was outside the
visible area in the timetracker watermark columns when it was on the
last day of the interval.

A better alignment with the tasks layer (reducing the 3px max deviation)
on this cases can be achieved by revamping how lines and borders are
represented on the watermark layer.

FEA: ItEr76S04BugFixing
This commit is contained in:
Lorenzo Tilve Álvaro 2012-12-31 13:28:36 +01:00
parent d76cf5c69c
commit 1ec4d83e95

View file

@ -102,7 +102,8 @@ public final class DetailItem {
new DateTime()).getDays()) + (float) 0.5) / ((float) Days
.daysBetween(this.startDate, this.endDate).getDays()))
* this.size);
this.markCurrentDay(offsetInPx);
// 1px per column side, 1px for right border and 1px own bg-width
this.markCurrentDay(Math.min(this.size - 4, offsetInPx));
}
}
@ -113,7 +114,7 @@ public final class DetailItem {
this.startDate, projectStart).getDays()) / ((float) Days
.daysBetween(this.startDate, this.endDate).getDays()))
* this.size);
this.markprojectStart(Math.min(this.size - 1, offsetInPx));
this.markprojectStart(offsetInPx);
}
}
@ -123,8 +124,8 @@ public final class DetailItem {
this.startDate, deadline).getDays()) / ((float) Days
.daysBetween(this.startDate, this.endDate).getDays()))
* this.size);
// Management of left border case for current line format
this.markDeadlineDay(Math.min(this.size - 1, offsetInPx));
// 1px per column side, 1px for right border and 1px own bg-width
this.markDeadlineDay(Math.min(this.size - 4, offsetInPx));
}
}