mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2025-02-19 19:11:00 +00:00
(fixes issue #425) by Markus Hitter, BezelStyle button shouldn't background drawing
This commit is contained in:
parent
3c80fea0f8
commit
94d611ab3c
@ -285,6 +285,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
}
|
||||
|
||||
-(BOOL)isOpaque {
|
||||
if(_bezelStyle==NSDisclosureBezelStyle)
|
||||
return NO;
|
||||
return ![self isTransparent] && [self isBordered];
|
||||
}
|
||||
|
||||
|
@ -632,7 +632,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
-(void)highlight:(BOOL)highlight withFrame:(NSRect)frame inView:(NSView *)view {
|
||||
if(_isHighlighted!=highlight){
|
||||
_isHighlighted=highlight;
|
||||
[self drawWithFrame:frame inView:view];
|
||||
}
|
||||
}
|
||||
|
||||
@ -654,8 +653,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
if(![self startTrackingAt:[event locationInWindow] inView:view])
|
||||
return NO;
|
||||
|
||||
[self drawWithFrame:frame inView:view];
|
||||
|
||||
do{
|
||||
NSPoint currentPoint;
|
||||
BOOL isWithinCellFrame;
|
||||
@ -699,8 +696,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
|
||||
}while(YES);
|
||||
|
||||
[self drawWithFrame:frame inView:view];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -435,6 +435,7 @@ static NSMutableDictionary *cellClassDictionary = nil;
|
||||
|
||||
if(NSMouseInRect(point,[self bounds],[self isFlipped])){
|
||||
[_cell highlight:YES withFrame:[self bounds] inView:self];
|
||||
[self setNeedsDisplay:YES];
|
||||
|
||||
if([_cell trackMouse:event inRect:[self bounds] ofView:self untilMouseUp:NO]){
|
||||
[_cell setState:![_cell state]];
|
||||
|
Loading…
x
Reference in New Issue
Block a user