import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
//image on left side of dialog
if (aboutImage != null) {
- Label imageLabel = new Label(topContainer, SWT.NONE);
+ final Canvas imageLabel = new Canvas(topContainer, SWT.NONE);
imageLabel.setBackground(background);
imageLabel.setForeground(foreground);
/// Tizen
data.horizontalSpan = 2;
imageLabel.setLayoutData(data);
- imageLabel.setImage(aboutImage);
+ imageLabel.setBackgroundImage(aboutImage);
/// Tizen
//topContainerHeightHint = Math.max(topContainerHeightHint, aboutImage.getBounds().height);
topContainerHeightHint = aboutImage.getBounds().height;
Font font = new Font(event.display, fontName, fontSizeHeight, SWT.BOLD);
event.gc.setForeground(event.display.getSystemColor(SWT.COLOR_WHITE));
event.gc.setFont(font);
- event.gc.drawText(productName, 28, 32, true);
+ Point textSize = event.gc.textExtent(productName);
+ event.gc.drawText(productName, 28, (imageLabel.getSize().y - textSize.y) / 2, true);
font.dispose();
}});
/* ===== */