From cfc65077a2ff494401e76d28ef90fcbd22c0a418 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 18:57:13 +0000 Subject: Added custom border to MainBar buttons Added Hand cursor for MainBar buttons git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@54 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../at/asit/pdfover/gui/controls/MainBarStartButton.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java index 2577ce40..d43c86de 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarStartButton.java @@ -44,7 +44,6 @@ public class MainBarStartButton extends MainBarButton { /* (non-Javadoc) * @see at.asit.pdfover.gui.controls.MainBarButton#paintButton(org.eclipse.swt.events.PaintEvent) */ - /* @Override protected void paintButton(PaintEvent e) { Point size = this.getSize(); @@ -53,21 +52,15 @@ public class MainBarStartButton extends MainBarButton { int split = 10; int width = size.x - split; - - int textlen = 0; - if(getText() != null) { - textlen = getText().length(); - } e.gc.drawLine(0, 0, width, 0); e.gc.drawLine(width, 0, width + split, (height) / 2); e.gc.drawLine(width + split, (height) / 2, width, height); e.gc.drawLine(width, height, 0, height); e.gc.drawLine(0, height, 0, 0); - int texty = (height - e.gc.getFontMetrics().getHeight()) / 2; - int textx = (width - e.gc.getFontMetrics().getAverageCharWidth() * textlen) / 2; - e.gc.drawText(getText(), textx, texty); - }*/ + + super.paintButton(e); + } /* (non-Javadoc) * @see at.asit.pdfover.gui.controls.MainBarButton#getRegion() -- cgit v1.2.3