1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Fix the cases where the item text outgrows the icons.

Makes sure the item height is big enough.

Change-Id: I2a218f590795cd9c08a1627d32f691e12d5b14b9
This commit is contained in:
Doug Schaefer 2016-11-03 16:21:45 -04:00
parent 11ccb83e9f
commit 5d1e1347a5

View file

@ -97,8 +97,12 @@ public class TemplateTable implements Listener {
}
private void computeItemArea(Event event) {
GC gc = event.gc;
FontMetrics metrics = gc.getFontMetrics();
int height = (int) (metrics.getHeight() * 3.15);
event.width = table.getClientArea().width - event.x;
event.height = 56; // 48 for icon, 8 buffer
event.height = Math.max(48, height) + 8; // 48 for icon/text, 8 buffer
}
private void paintItem(Event event) {