Skip to content

Commit

Permalink
Revert "Fixes: eclipse-platform#677 For"
Browse files Browse the repository at this point in the history
This reverts commit 0032340.
  • Loading branch information
kohlschuetter committed Mar 15, 2024
1 parent c61465f commit 18a169d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ 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.
Expand Down Expand Up @@ -1182,7 +1179,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) + VERTICAL_CELL_PADDING);
((NSTableView)view).setRowHeight ((int)Math.ceil (ascent + descent) + 1);
setScrollWidth();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ 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.
Expand Down Expand Up @@ -2825,7 +2822,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) + VERTICAL_CELL_PADDING;
int height = (int)Math.ceil (ascent + descent) + 1;
Rectangle bounds = image != null ? image.getBounds () : imageBounds;
if (bounds != null) {
imageBounds = bounds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ 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.
Expand Down Expand Up @@ -3173,7 +3170,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) + VERTICAL_CELL_PADDING;
int height = (int)Math.ceil (ascent + descent) + 1;
Rectangle bounds = image != null ? image.getBounds () : imageBounds;
if (bounds != null) {
imageBounds = bounds;
Expand Down

0 comments on commit 18a169d

Please sign in to comment.