From 40172152adfcef7971072e82b8eb226ecb9b127c Mon Sep 17 00:00:00 2001 From: Joseph Spiros Date: Tue, 30 Sep 2003 10:12:05 +0000 Subject: [PATCH] "Fixed" ITButton... it's not REALLY fixed, as that's impossible, but it looks and feels like it is, and it even has a kinda nice side effect... --- ITButton.m | 12 ++++++++++++ ITButtonCell.m | 6 +++++- Showcase/English.lproj/MainMenu.nib/info.nib | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ITButton.m b/ITButton.m index 7a7a242..f5d15b2 100755 --- a/ITButton.m +++ b/ITButton.m @@ -22,6 +22,18 @@ return [ITButtonCell class]; } +- (void)displayIfNeeded { + [self displayIfNeededIgnoringOpacity]; +} + +- (void)displayIfNeededInRect:(NSRect)aRect { + [self displayIfNeededInRectIgnoringOpacity:aRect]; +} + +- (void)displayRect:(NSRect)aRect { + [self displayRectIgnoringOpacity:aRect]; +} + - (id)initWithCoder:(NSCoder *)coder { if ( ( self = [super initWithCoder:coder] ) ) { diff --git a/ITButtonCell.m b/ITButtonCell.m index fa3c5bb..938e571 100755 --- a/ITButtonCell.m +++ b/ITButtonCell.m @@ -86,10 +86,14 @@ if ( [self isHighlighted] ) { alpha = 0.50; } - + [[NSColor colorWithCalibratedWhite:0.0 alpha:alpha] set]; [path fill]; } +- (BOOL)isOpaque +{ + return NO; +} @end diff --git a/Showcase/English.lproj/MainMenu.nib/info.nib b/Showcase/English.lproj/MainMenu.nib/info.nib index 5e6fd3c..876a73d 100755 --- a/Showcase/English.lproj/MainMenu.nib/info.nib +++ b/Showcase/English.lproj/MainMenu.nib/info.nib @@ -12,7 +12,7 @@ 1 271 349 44 0 0 1056 770 IBFramework Version - 286.0 + 291.0 IBOpenObjects 21 -- 2.20.1