Skip to content

Commit

Permalink
UKWindowBodyView: Quick dark mode fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
uliwitness committed Apr 16, 2022
1 parent 9834e63 commit dfb1cad
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions UKWindowBodyView.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@ -(void) drawRect: (NSRect)rect
BOOL isActive = [[self window] isMainWindow];
NSRect box = [self bounds];

HIThemeSetFill( isActive ? kThemeBrushModelessDialogBackgroundActive : kThemeBrushModelessDialogBackgroundInactive,
NULL, [[NSGraphicsContext currentContext] CGContext], kHIThemeOrientationInverted );
[NSColor.windowBackgroundColor setFill];
NSRectFill( box );

box.origin.y += 1; box.size.height -= 1;
[[NSColor colorWithCalibratedWhite: isActive? 0.3 : 0.5 alpha: 1.0] set];
[NSColor.systemGrayColor set];
NSFrameRectWithWidth( box, 1 );

[[NSColor colorWithCalibratedWhite: 0.9 alpha: 0.8] set];
[[NSColor.systemGrayColor colorWithAlphaComponent: 0.9] set];
[NSBezierPath strokeLineFromPoint: NSMakePoint(box.origin.x,box.origin.y -1) toPoint: NSMakePoint(NSMaxX(box),box.origin.y -1)];
}

Expand Down

0 comments on commit dfb1cad

Please sign in to comment.