mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 20:19:40 +00:00
more display fine tuning of a table view in a scroll view
implemented NSEraseRect()
This commit is contained in:
parent
bbc801b7d4
commit
68884812bf
@ -85,6 +85,8 @@ APPKIT_EXPORT void NSRectFillListWithGrays(const NSRect *rects, const float *gra
|
||||
APPKIT_EXPORT void NSRectFillList(const NSRect *rects, int count);
|
||||
APPKIT_EXPORT void NSRectFill(NSRect rect);
|
||||
|
||||
APPKIT_EXPORT void NSEraseRect(NSRect rect);
|
||||
|
||||
APPKIT_EXPORT void NSRectFillListUsingOperation(const NSRect *rects, int count, NSCompositingOperation operation);
|
||||
APPKIT_EXPORT void NSRectFillUsingOperation(NSRect rect, NSCompositingOperation operation);
|
||||
|
||||
|
@ -124,6 +124,15 @@ void NSRectFill(NSRect rect) {
|
||||
CGContextRestoreGState(context);
|
||||
}
|
||||
|
||||
void NSEraseRect(NSRect rect) {
|
||||
CGContextRef context=NSCurrentGraphicsPort();
|
||||
CGContextSaveGState(context);
|
||||
[[NSColor whiteColor] setFill];
|
||||
CGContextSetBlendMode(context,kCGBlendModeCopy);
|
||||
CGContextFillRect(NSCurrentGraphicsPort(),rect);
|
||||
CGContextRestoreGState(context);
|
||||
}
|
||||
|
||||
void NSRectFillListUsingOperation(const NSRect *rects,int count,NSCompositingOperation operation) {
|
||||
CGContextRef context=NSCurrentGraphicsPort();
|
||||
CGContextSaveGState(context);
|
||||
|
@ -172,7 +172,7 @@ static Class _rulerViewClass = nil;
|
||||
break;
|
||||
|
||||
case NSBezelBorder:
|
||||
bounds=NSInsetRect(bounds,2,2);
|
||||
bounds=NSInsetRect(bounds,1,1);
|
||||
break;
|
||||
|
||||
case NSGrooveBorder:
|
||||
|
@ -784,13 +784,15 @@ static inline RECT transformToRECT(O2AffineTransform matrix,NSRect rect) {
|
||||
@implementation NSGraphicsStyle_uxtheme (NSTableView)
|
||||
|
||||
-(void)drawTableViewHeaderInRect:(NSRect)rect highlighted:(BOOL)highlighted {
|
||||
rect.origin.y -= 1.0;
|
||||
rect.origin.y -= 1.0;
|
||||
rect.size.height += 1.0;
|
||||
if(![self drawPartId:HP_HEADERITEM stateId:highlighted?HIS_PRESSED:HIS_NORMAL uxthClassId:uxthHEADER inRect:rect])
|
||||
[super drawTableViewHeaderInRect:rect highlighted:highlighted];
|
||||
}
|
||||
|
||||
-(void)drawTableViewCornerInRect:(NSRect)rect {
|
||||
rect.origin.y -= 1.0;
|
||||
rect.origin.y -= 1.0;
|
||||
rect.size.height += 1.0;
|
||||
if(![self drawPartId:HP_HEADERITEM stateId:HIS_NORMAL uxthClassId:uxthHEADER inRect:rect])
|
||||
[super drawTableViewCornerInRect:rect];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user