From 08f1a68f341bf2db21f099395bf6ec236fca69bf Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 16 Nov 1999 23:54:10 +0000 Subject: [PATCH] Added isOpaque git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5216 72102866-910b-0410-8b05-ffd578937521 --- Source/NSSliderCell.m | 5 +++++ Source/NSText.m | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Source/NSSliderCell.m b/Source/NSSliderCell.m index a59ad05e8..f1b99596e 100644 --- a/Source/NSSliderCell.m +++ b/Source/NSSliderCell.m @@ -152,6 +152,11 @@ [controlView unlockFocus]; } +- (BOOL) isOpaque +{ + return YES; +} + - (float) knobThickness { NSImage* image = [_knobCell image]; diff --git a/Source/NSText.m b/Source/NSText.m index 96146e166..2b916f9b4 100644 --- a/Source/NSText.m +++ b/Source/NSText.m @@ -3192,7 +3192,20 @@ _relocLayoutArray (NSMutableArray *lineLayoutInformation, } // text lays out from top to bottom -- (BOOL) isFlipped {return YES;} +- (BOOL) isFlipped +{ + return YES; +} + +- (BOOL) isOpaque +{ + if (draws_background == NO + || background_color == nil + || [background_color alphaComponent] < 1.0) + return NO; + else + return YES; +} // // Copy and paste