Skip to content

Commit

Permalink
Moved tiling to drawRect: in _CPDOMImageAndTitleView.
Browse files Browse the repository at this point in the history
Reviewed by me.
  • Loading branch information
Francisco Ryan Tolmasky I committed Jan 23, 2009
1 parent add96e9 commit 986a881
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions AppKit/_CPImageAndTitleView.j
Expand Up @@ -111,7 +111,7 @@
[self createOrDestroyDOMTextElement];
#endif

[self tile];
[self setNeedsDisplay:YES];
}

- (CPCellImagePosition)imagePosition
Expand All @@ -126,7 +126,7 @@

_imageScaling = anImageScaling;

[self tile];
[self setNeedsDisplay:YES];
}

- (void)imageScaling
Expand Down Expand Up @@ -164,7 +164,7 @@

_titleSize = NULL;

[self tile];
[self setNeedsDisplay:YES];
}

- (CPFont)font
Expand Down Expand Up @@ -219,7 +219,7 @@
#endif
}

[self tile];
[self setNeedsDisplay:YES];
}

- (CPImage)image
Expand Down Expand Up @@ -280,15 +280,15 @@

_titleSize = NULL;

[self tile];
[self setNeedsDisplay:YES];
}

- (CPString)title
{
return _title;
}

- (void)tile
- (void)drawRect:(CGRect)aRect
{
if (!_titleSize && _DOMTextElement)
_titleSize = [_title sizeWithFont:_font];
Expand Down Expand Up @@ -418,9 +418,4 @@
[self setFrameSize:size];
}

- (void)resizeSubviewsWithOldSize:(CGSize)aSize
{
[self tile];
}

@end

0 comments on commit 986a881

Please sign in to comment.