Revision: 10168
          http://sourceforge.net/p/skim-app/code/10168
Author:   hofman
Date:     2018-12-23 13:50:31 +0000 (Sun, 23 Dec 2018)
Log Message:
-----------
Make font well opaque, draws darker background in dark mode. Highlight font and 
line well with pluslighter in dark mode. Draw active state without plus darker 
slightly inset, did not work well in dark mode.

Modified Paths:
--------------
    trunk/SKApplicationController.m
    trunk/SKFontWell.m
    trunk/SKLineWell.m

Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m     2018-12-22 21:45:18 UTC (rev 10167)
+++ trunk/SKApplicationController.m     2018-12-23 13:50:31 UTC (rev 10168)
@@ -217,6 +217,7 @@
 }    
 
 - (void)applicationWillFinishLaunching:(NSNotification *)aNotification {
+    [NSApp setAppearance:[NSAppearance 
appearanceNamed:NSAppearanceNameDarkAqua]];
     [NSImage makeImages];
     [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self 
andSelector:@selector(handleGetURLEvent:withReplyEvent:) 
forEventClass:kInternetEventClass andEventID:kAEGetURL];
 }

Modified: trunk/SKFontWell.m
===================================================================
--- trunk/SKFontWell.m  2018-12-22 21:45:18 UTC (rev 10167)
+++ trunk/SKFontWell.m  2018-12-23 13:50:31 UTC (rev 10168)
@@ -153,6 +153,8 @@
     [super dealloc];
 }
 
+- (BOOL)isOpaque{ return YES; }
+
 - (void)viewWillMoveToWindow:(NSWindow *)newWindow {
     [self deactivate];
     [super viewWillMoveToWindow:newWindow];
@@ -505,7 +507,7 @@
     if ([self state] == NSOnState) {
         [NSGraphicsContext saveGraphicsState];
         [[NSColor selectedControlColor] setFill];
-        NSRectFillUsingOperation(frame, NSCompositePlusDarker);
+        [NSBezierPath fillRect:NSInsetRect(frame, 1.0, 1.0)];
         [NSGraphicsContext restoreGraphicsState];
     }
     if ([self isHighlighted]) {
@@ -512,7 +514,7 @@
         [NSGraphicsContext saveGraphicsState];
         // @@ Dark mode
         [[[NSColor controlTextColor] colorWithAlphaComponent:0.3] setFill];
-        NSFrameRectWithWidthUsingOperation(frame, 1.0, NSCompositePlusDarker);
+        NSFrameRectWithWidthUsingOperation(frame, 1.0, 
SKHasDarkAppearance(controlView) ? NSCompositePlusLighter : 
NSCompositePlusDarker);
         [NSGraphicsContext restoreGraphicsState];
     }
     

Modified: trunk/SKLineWell.m
===================================================================
--- trunk/SKLineWell.m  2018-12-22 21:45:18 UTC (rev 10167)
+++ trunk/SKLineWell.m  2018-12-23 13:50:31 UTC (rev 10168)
@@ -275,7 +275,7 @@
     if ([self isActive]) {
         [NSGraphicsContext saveGraphicsState];
         [[NSColor selectedControlColor] setFill];
-        NSRectFillUsingOperation(bounds, NSCompositePlusDarker);
+        [NSBezierPath fillRect:NSInsetRect(bounds, 1.0, 1.0)];
         [NSGraphicsContext restoreGraphicsState];
     }
     if ([self isHighlighted]) {
@@ -282,7 +282,7 @@
         [NSGraphicsContext saveGraphicsState];
         // @@ Dark mode
         [[[NSColor controlTextColor] colorWithAlphaComponent:0.3] setFill];
-        NSFrameRectWithWidthUsingOperation([self bounds], 1.0, 
NSCompositePlusDarker);
+        NSFrameRectWithWidthUsingOperation(bounds, 1.0, 
SKHasDarkAppearance(self) ? NSCompositePlusLighter : NSCompositePlusDarker);
         [NSGraphicsContext restoreGraphicsState];
     }
     

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to