Skip to content
Snippets Groups Projects
Commit d96bf6b7 authored by George Nachman's avatar George Nachman
Browse files

Fix hilarious bug in which content is flipped when a 0x0 region is drawn in a scrollbar.

parent 192ba402
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -102,13 +102,16 @@
}
 
- (void)drawRect:(NSRect)dirtyRect {
if (IsLionOrLater() && self.hasDarkBackground) {
if (IsLionOrLater() &&
self.hasDarkBackground &&
dirtyRect.size.width > 0 &&
dirtyRect.size.height > 0) {
NSImage *superDrawn = [[NSImage alloc] initWithSize:NSMakeSize(dirtyRect.origin.x + dirtyRect.size.width,
dirtyRect.origin.y + dirtyRect.size.height)];
[superDrawn lockFocus];
[super drawRect:dirtyRect];
[superDrawn unlockFocus];
NSImage *temp = [[NSImage alloc] initWithSize:[superDrawn size]];
[temp lockFocus];
[superDrawn drawAtPoint:dirtyRect.origin
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment