mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 05:40:37 +00:00
Set backgrounds of images before drawing them.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4184 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ae7f99c597
commit
6847940a3e
3 changed files with 29 additions and 15 deletions
|
@ -261,15 +261,15 @@ static NSImage *highlight_image;
|
|||
//
|
||||
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView *)controlView
|
||||
{
|
||||
NSRect title_rect = cellFrame;
|
||||
NSRect image_rect = cellFrame;
|
||||
NSImage *image = nil;
|
||||
NSRect title_rect = cellFrame;
|
||||
NSRect image_rect = cellFrame;
|
||||
NSImage *image = nil;
|
||||
NSColor *backColor;
|
||||
|
||||
control_view = controlView; // remember last view cell was drawn in
|
||||
control_view = controlView; // remember last view cell was drawn in
|
||||
if (cell_highlighted || cell_state) // temporary hack FAR FIX ME?
|
||||
{
|
||||
NSColor *backColor = [NSColor selectedControlColor];
|
||||
|
||||
backColor = [NSColor selectedControlColor];
|
||||
[backColor set];
|
||||
if (!_isLeaf)
|
||||
{
|
||||
|
@ -284,8 +284,7 @@ static NSImage *highlight_image;
|
|||
}
|
||||
else
|
||||
{
|
||||
NSColor *backColor = [[controlView window] backgroundColor];
|
||||
|
||||
backColor = [[controlView window] backgroundColor];
|
||||
[backColor set];
|
||||
if (!_isLeaf)
|
||||
{
|
||||
|
@ -304,7 +303,10 @@ static NSImage *highlight_image;
|
|||
[_browserText drawWithFrame: title_rect inView: controlView];
|
||||
|
||||
if (image)
|
||||
[self _drawImage: image inFrame: image_rect];
|
||||
{
|
||||
[image setBackgroundColor: backColor];
|
||||
[self _drawImage: image inFrame: image_rect];
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue