diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java index 9370f9788dd..7d56e8a552a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java @@ -50,6 +50,9 @@ public class List extends Scrollable { static final int CELL_GAP = 1; + /* Vertical cell padding for list item */ + static final int VERTICAL_CELL_PADDING= 8; + /** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. @@ -1179,7 +1182,7 @@ void setFont (NSFont font) { super.setFont (font); double ascent = font.ascender (); double descent = -font.descender () + font.leading (); - ((NSTableView)view).setRowHeight ((int)Math.ceil (ascent + descent) + 1); + ((NSTableView)view).setRowHeight ((int)Math.ceil (ascent + descent) + VERTICAL_CELL_PADDING); setScrollWidth(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java index c49f1354fee..f62d8bc4d42 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java @@ -93,6 +93,9 @@ public class Table extends Composite { static final int TEXT_GAP = 2; static final int CELL_GAP = 1; + /* Vertical cell padding for table item */ + static final int VERTICAL_CELL_PADDING= 8; + /** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. @@ -2822,7 +2825,7 @@ void setItemHeight (Image image, NSFont font, boolean set) { if (font == null) font = getFont ().handle; double ascent = font.ascender (); double descent = -font.descender () + font.leading (); - int height = (int)Math.ceil (ascent + descent) + 1; + int height = (int)Math.ceil (ascent + descent) + VERTICAL_CELL_PADDING; Rectangle bounds = image != null ? image.getBounds () : imageBounds; if (bounds != null) { imageBounds = bounds; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java index 1c2de57fa6e..45fd96cba4c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java @@ -109,6 +109,9 @@ public class Tree extends Composite { static final int TEXT_GAP = 2; static final int CELL_GAP = 1; + /* Vertical cell padding for tree item */ + static final int VERTICAL_CELL_PADDING= 8; + /** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. @@ -3170,7 +3173,7 @@ void setItemHeight (Image image, NSFont font, boolean set) { if (font == null) font = getFont ().handle; double ascent = font.ascender (); double descent = -font.descender () + font.leading (); - int height = (int)Math.ceil (ascent + descent) + 1; + int height = (int)Math.ceil (ascent + descent) + VERTICAL_CELL_PADDING; Rectangle bounds = image != null ? image.getBounds () : imageBounds; if (bounds != null) { imageBounds = bounds;