From: Mitchell Livingston Date: Wed, 14 Sep 2011 03:15:58 +0000 (+0000) Subject: when drawing gradients in the status and filter bar, always draw the full height X-Git-Tag: 2.40b1~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9cf99d9ccc75ad5fd9de026fad2349b60366bc2;p=transmission when drawing gradients in the status and filter bar, always draw the full height --- diff --git a/macosx/FilterBarView.m b/macosx/FilterBarView.m index 62fdb1506..5da8ed28e 100644 --- a/macosx/FilterBarView.m +++ b/macosx/FilterBarView.m @@ -82,7 +82,8 @@ NSRectFillListWithColors(gridRects, colorRects, count); - [fGradient drawInRect: rect angle: 270.0]; + const NSRect gradientRect = NSMakeRect(NSMinX(rect), 1.0, NSWidth(rect), NSHeight([self bounds]) - 1.0 - 1.0); //proper gradient requires the full height of the bar + [fGradient drawInRect: gradientRect angle: 270.0]; } @end diff --git a/macosx/StatusBarView.m b/macosx/StatusBarView.m index dc512e215..04d07f82f 100644 --- a/macosx/StatusBarView.m +++ b/macosx/StatusBarView.m @@ -100,7 +100,10 @@ } if (active) - [fGradient drawInRect: rect angle: 270.0]; + { + const NSRect gradientRect = NSMakeRect(NSMinX(rect), 1.0, NSWidth(rect), NSHeight([self bounds]) - 1.0 - 1.0); //proper gradient requires the full height of the bar + [fGradient drawInRect: gradientRect angle: 270.0]; + } else { gridRects[count] = rect;