mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:27:39 +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
|
@ -122,7 +122,8 @@
|
|||
// do nothing if cell's frame rect is zero
|
||||
if( NSIsEmptyRect(cellFrame) )
|
||||
return;
|
||||
|
||||
|
||||
[controlView lockFocus];
|
||||
// draw the border if needed
|
||||
switch( [self imageFrameStyle] )
|
||||
{
|
||||
|
@ -144,6 +145,7 @@
|
|||
}
|
||||
|
||||
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
[controlView unlockFocus];
|
||||
}
|
||||
|
||||
static inline float xLeftInRect(NSSize innerSize, NSRect outerRect)
|
||||
|
@ -210,6 +212,7 @@ static inline NSSize scaleProportionally(NSSize imageSize, NSRect canvasRect)
|
|||
|
||||
// leave room for the frame
|
||||
cellFrame = [self drawingRectForBounds: cellFrame];
|
||||
[controlView lockFocus];
|
||||
|
||||
switch( [self imageScaling] )
|
||||
{
|
||||
|
@ -287,6 +290,7 @@ static inline NSSize scaleProportionally(NSSize imageSize, NSRect canvasRect)
|
|||
|
||||
// draw!
|
||||
[image compositeToPoint: position operation: NSCompositeCopy];
|
||||
[controlView unlockFocus];
|
||||
}
|
||||
|
||||
- (NSSize) cellSize
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue