aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Fauth2013-07-24 11:41:36 (EDT)
committerDirk Fauth2013-07-24 11:41:36 (EDT)
commit66ac7428b5627a626e0d9fdb335e997291dc4d78 (patch)
tree9f4d6a8d9aec4693f09be73a8a85d9e02971226b
parent6c33b74fbd476d56250152cc1c635425affa5eee (diff)
downloadorg.eclipse.nebula-66ac7428b5627a626e0d9fdb335e997291dc4d78.zip
org.eclipse.nebula-66ac7428b5627a626e0d9fdb335e997291dc4d78.tar.gz
org.eclipse.nebula-66ac7428b5627a626e0d9fdb335e997291dc4d78.tar.bz2
Bug 413661 - added check and handling of images that are smaller than
the event height so they get centered
-rw-r--r--widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/AbstractPaintManager.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/AbstractPaintManager.java b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/AbstractPaintManager.java
index ff25a4f..33659ae 100644
--- a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/AbstractPaintManager.java
+++ b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/AbstractPaintManager.java
@@ -554,6 +554,9 @@ public abstract class AbstractPaintManager implements IPaintManager {
} else {
// center it x-wise
x -= (bounds.width - dayWidth) / 2;
+ if (settings.getEventHeight() > bounds.height) {
+ y += (settings.getEventHeight() - bounds.height);
+ }
}
gc.drawImage(image, x, y);