diff options
author | Silenio Quarti <silenio> | 2005-10-24 22:19:20 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2005-10-24 22:19:20 +0000 |
commit | 8f7aad66582fa802c8b0e0b3d1838e1db384b323 (patch) | |
tree | 8e100c96c00225fd8336fc4041f8871abcdec0a2 | |
parent | e108a36989c1b3c605d0a99a5d000284cdaf0838 (diff) | |
download | eclipse.platform.swt-8f7aad66582fa802c8b0e0b3d1838e1db384b323.tar.gz eclipse.platform.swt-8f7aad66582fa802c8b0e0b3d1838e1db384b323.tar.xz eclipse.platform.swt-8f7aad66582fa802c8b0e0b3d1838e1db384b323.zip |
101331 - implement drawFocus()
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java index 1e74604607..01e80e1613 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java @@ -571,8 +571,16 @@ public void drawArc(int x, int y, int width, int height, int startAngle, int arc public void drawFocus(int x, int y, int width, int height) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (data.updateClip) setCGClipping(); - //NOT DONE -// drawRectangle (x, y, width - 1, height - 1); + if (OS.VERSION >= 0x1030) { + int[] metric = new int[1]; + OS.GetThemeMetric(OS.kThemeMetricFocusRectOutset, metric); + CGRect rect = new CGRect (); + rect.x = x + metric[0]; + rect.y = y + metric[0]; + rect.width = width - metric[0] * 2; + rect.height = height - metric[0] * 2; + OS.HIThemeDrawFocusRect(rect, true, handle, OS.kHIThemeOrientationNormal); + } flush(); } |