aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Fauth2013-07-25 05:56:16 (EDT)
committerDirk Fauth2013-07-25 05:56:16 (EDT)
commit4472745729447e901ff80b65b5dcc732ef1e2596 (patch)
tree6a9a23129a0cbdc2821497926436e50c2c0d9851
parent1012b2e30999842048746f1a5913724e0ee53763 (diff)
downloadorg.eclipse.nebula-4472745729447e901ff80b65b5dcc732ef1e2596.zip
org.eclipse.nebula-4472745729447e901ff80b65b5dcc732ef1e2596.tar.gz
org.eclipse.nebula-4472745729447e901ff80b65b5dcc732ef1e2596.tar.bz2
Bug 413714 - draw the background for the bottom of the gantt chart as on
Win7 it would be transparent
-rw-r--r--widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java
index 52f5a13..b430738 100644
--- a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java
+++ b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java
@@ -1131,6 +1131,25 @@ public final class GanttComposite extends Canvas implements MouseListener, Mouse
drawFills(gc, extraBounds);
drawVerticalLines(gc, extraBounds, false);
}
+ else {
+ //draw the background for the bottom of the gantt chart as on Win7 it would be transparent
+ final int dayWidth = (_currentView == ISettings.VIEW_WEEK || _currentView == ISettings.VIEW_D_DAY ? _dayWidth : _monthDayWidth);
+ final int maxX = bounds.width + dayWidth; // we need to draw beyond 1 day as the days at the edge of the viewport also needs to be filled in case a half-day is visible there
+ int startX = bounds.x;
+
+ int offset = _vScrollPos;
+ if (offset > getHeaderHeight()) {
+ offset = getHeaderHeight();
+ }
+
+ final int startY = bounds.y - offset;
+ final int heightY = bounds.height;
+
+ gc.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+ gc.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+
+ gc.fillRectangle(startX, startY, maxX, heightY);
+ }
for (int i = 0; i < _ganttSections.size(); i++) {
final GanttSection section = (GanttSection) _ganttSections.get(i);