From 47fe611bd9c070d3ecb3dad76cac6a8e3069a90e Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:18:47 +0000 Subject: Correct conf dialog drop border git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@249 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../asit/pdfover/gui/composites/SimpleConfigurationComposite.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'pdf-over-gui/src/main/java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java index c1c6ce04..a2267a62 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java @@ -39,6 +39,7 @@ import org.eclipse.swt.graphics.FontData; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; @@ -235,14 +236,11 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { @Override public void paintControl(PaintEvent e) { - //Workaround for paint event being called twice initially - if (e.x > 0) - return; - // e.gc.setForeground(); e.gc.setForeground(Constants.DROP_BORDER_COLOR); e.gc.setLineWidth(3); e.gc.setLineStyle(SWT.LINE_DASH); - e.gc.drawRoundRectangle(e.x, e.y, e.width - 2, e.height - 2, + Point size = controlComposite.getSize(); + e.gc.drawRoundRectangle(0, 0, size.x - 2, size.y - 2, 10, 10); } }); -- cgit v1.2.3