Revision: 15101
          http://sourceforge.net/p/skim-app/code/15101
Author:   hofman
Date:     2025-04-08 09:10:17 +0000 (Tue, 08 Apr 2025)
Log Message:
-----------
Don't reset text color when deactivating cfont wwell. We also don't reset the 
font.

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

Modified: trunk/SKFontWell.m
===================================================================
--- trunk/SKFontWell.m  2025-04-07 16:27:17 UTC (rev 15100)
+++ trunk/SKFontWell.m  2025-04-08 09:10:17 UTC (rev 15101)
@@ -164,13 +164,10 @@
 
 - (void)changeActive:(id)sender {
     if ([self isEnabled]) {
-        if ([self isActive]) {
+        if ([self isActive])
             [self activate];
-        } else {
+        else
             [self deactivate];
-            if ([self hasTextColor])
-                [[NSFontManager sharedFontManager] 
setSelectedAttributes:@{NSForegroundColorAttributeName: [NSColor textColor]} 
isMultiple:NO];
-        }
     }
 }
 
@@ -195,12 +192,9 @@
 }
 
 - (void)deactivate {
-    BOOL wasActive = [self isActive];
     [[NSNotificationCenter defaultCenter] removeObserver:self];
     [self setState:NSControlStateValueOff];
     [self setNeedsDisplay:YES];
-    if (wasActive && [self hasTextColor])
-        [[NSFontManager sharedFontManager] 
setSelectedAttributes:@{NSForegroundColorAttributeName: [NSColor textColor]} 
isMultiple:NO];
 }
 
 - (void)fontChanged {

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



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to