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 --- .../asit/pdfover/gui/controls/MainBarRectangleButton.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java index edac29e5..17971982 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarRectangleButton.java @@ -46,27 +46,21 @@ public class MainBarRectangleButton extends MainBarButton { /* (non-Javadoc) * @see at.asit.pdfover.gui.controls.MainBarButton#paintButton(org.eclipse.swt.events.PaintEvent) */ - /*@Override + @Override protected void paintButton(PaintEvent e) { Point size = this.getSize(); int height = size.y - 2; int width = size.x; - - int textlen = 0; - if(getText() != null) { - textlen = getText().length(); - } e.gc.drawLine(0, 0, width, 0); e.gc.drawLine(width, 0, 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#getCustomRegion() -- cgit v1.2.3