mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 10:20:38 +00:00
Lock focus fixes - get cells to lock focus before drawing themselves.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4924 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8171e4cc22
commit
dd34792910
13 changed files with 85 additions and 25 deletions
|
@ -59,13 +59,15 @@
|
|||
- (void) drawWithFrame: (NSRect)cellFrame
|
||||
inView: (NSView*)view
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSGraphicsContext *ctxt;
|
||||
NSColor *backColor;
|
||||
NSImage *toDraw = nil;
|
||||
NSRect rect = cellFrame;
|
||||
NSRect arect = cellFrame;
|
||||
NSPoint point;
|
||||
|
||||
[view lockFocus];
|
||||
ctxt = GSCurrentContext();
|
||||
NSDrawButton(cellFrame, cellFrame);
|
||||
|
||||
arect.size.width -= 3;
|
||||
|
@ -188,5 +190,6 @@
|
|||
position.y += size.height;
|
||||
[toDraw compositeToPoint: position operation: NSCompositeCopy];
|
||||
}
|
||||
[view unlockFocus];
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue