BUTTON: bug fix that set to the size of the checkbox button
authorHyunJong Park <paulhj.park@samsung.com>
Thu, 27 Oct 2016 01:22:58 +0000 (10:22 +0900)
committerHyunJong Park <paulhj.park@samsung.com>
Thu, 27 Oct 2016 04:10:11 +0000 (13:10 +0900)
If the size smaller than the image of the checkbox image, set to the size of the checkbox image.

Change-Id: I021a056b74cbd7e4a0065f3cf54db4c15ad54f9c
Signed-off-by: HyunJong Park <paulhj.park@samsung.com>
bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TizenCheckBoxButtonRenderer.java

index 09bed99..6926da9 100644 (file)
@@ -33,6 +33,13 @@ public class TizenCheckBoxButtonRenderer extends TizenRadioButtonRenderer {
     }
 
     @Override
+    protected Point computeSize(final TizenButton button, final int wHint, final int hHint, final boolean changed) {
+        Point pt = super.computeSize(button, wHint, hHint, changed);
+        pt.y = Math.max(pt.y, TizenResourceManager.getInstance().checkBoxGrayedHover.getBounds().height);
+        return pt;
+    }
+
+    @Override
     protected Image getImage() {
         if (isState(state, (SELECT | ENABLE | HOVER | GRAYED))) {
             return TizenResourceManager.getInstance().checkBoxGrayedHover;