Revision: 15094
          http://sourceforge.net/p/skim-app/code/15094
Author:   hofman
Date:     2025-04-07 09:29:15 +0000 (Mon, 07 Apr 2025)
Log Message:
-----------
Draw text color swatch smaller in upper-right corner of font well. Also draw a 
T to clarify its meaning.

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

Modified: trunk/SKFontWell.m
===================================================================
--- trunk/SKFontWell.m  2025-04-07 08:38:52 UTC (rev 15093)
+++ trunk/SKFontWell.m  2025-04-07 09:29:15 UTC (rev 15094)
@@ -445,6 +445,10 @@
     if ([self hasTextColor]) {
         NSRect rect = NSInsetRect(frame, 4.0, 4.0);
         rect = SKSliceRect(rect, NSHeight(rect), NSMaxXEdge);
+        rect = NSMakeRect(NSMaxX(frame) - 12.0, 2.0, 10.0, 10.0);
+        NSAttributedString *T = [[NSAttributedString alloc] 
initWithString:@"T" attributes:@{NSForegroundColorAttributeName: [NSColor 
labelColor], NSFontAttributeName: [NSFont fontWithName:@"Palatino" size:8.0]}];
+        NSSize size = [T size];
+        [T drawInRect:NSMakeRect(NSMinX(rect) - ceil(size.width) - 2.0, 
NSMidY(rect) - floor(0.5 * size.height) - 0.0, size.width, size.height)];
         [NSGraphicsContext saveGraphicsState];
         [[self textColor] drawSwatchInRect:rect];
         if (SKHasDarkAppearance()) {

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