Skip to content

Commit 61baf36

Browse files
committed
[Mac] GC#fillGradientRectangle don't color for y < 0 eclipse-platform#1652
GC#fillGradientRectangle must be applied for negative y too. Fixes eclipse-platform#1652
1 parent 3c1065b commit 61baf36

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ public void fillGradientRectangle(int x, int y, int width, int height, boolean v
20032003
NSGradient gradient = ((NSGradient)new NSGradient().alloc()).initWithStartingColor(startingColor, endingColor);
20042004
NSRect rect = new NSRect();
20052005
rect.x = x;
2006-
rect.y = y < 0 ? 0 : y;
2006+
rect.y = y;
20072007
rect.width = width;
20082008
rect.height = height;
20092009
gradient.drawInRect(rect, vertical ? 90 : 0);

0 commit comments

Comments
 (0)