You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(23) |
Apr
(254) |
May
(252) |
Jun
(209) |
Jul
(198) |
Aug
(192) |
Sep
(207) |
Oct
(120) |
Nov
(179) |
Dec
(52) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(48) |
Feb
(69) |
Mar
(129) |
Apr
(250) |
May
(113) |
Jun
(177) |
Jul
(228) |
Aug
(155) |
Sep
(218) |
Oct
(185) |
Nov
(109) |
Dec
(88) |
2009 |
Jan
(83) |
Feb
(39) |
Mar
(70) |
Apr
(47) |
May
(48) |
Jun
(67) |
Jul
(61) |
Aug
(97) |
Sep
(221) |
Oct
(141) |
Nov
(70) |
Dec
(61) |
2010 |
Jan
(45) |
Feb
(76) |
Mar
(178) |
Apr
(106) |
May
(57) |
Jun
(32) |
Jul
(64) |
Aug
(98) |
Sep
(96) |
Oct
(19) |
Nov
(34) |
Dec
(117) |
2011 |
Jan
(55) |
Feb
(48) |
Mar
(64) |
Apr
(21) |
May
(39) |
Jun
(53) |
Jul
(99) |
Aug
(56) |
Sep
(39) |
Oct
(26) |
Nov
(19) |
Dec
(69) |
2012 |
Jan
(17) |
Feb
(40) |
Mar
(17) |
Apr
|
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
(10) |
Sep
(10) |
Oct
(38) |
Nov
(48) |
Dec
(70) |
2013 |
Jan
(43) |
Feb
(47) |
Mar
(39) |
Apr
(37) |
May
(25) |
Jun
(6) |
Jul
(20) |
Aug
(49) |
Sep
(33) |
Oct
(34) |
Nov
(75) |
Dec
(6) |
2014 |
Jan
(32) |
Feb
(10) |
Mar
(17) |
Apr
|
May
|
Jun
(26) |
Jul
(5) |
Aug
|
Sep
(4) |
Oct
(23) |
Nov
(80) |
Dec
(48) |
2015 |
Jan
(80) |
Feb
(50) |
Mar
(58) |
Apr
(20) |
May
(11) |
Jun
(16) |
Jul
(24) |
Aug
(27) |
Sep
(56) |
Oct
(30) |
Nov
(16) |
Dec
(6) |
2016 |
Jan
(31) |
Feb
(14) |
Mar
(23) |
Apr
(17) |
May
(40) |
Jun
(12) |
Jul
(17) |
Aug
(9) |
Sep
(32) |
Oct
(36) |
Nov
(23) |
Dec
(9) |
2017 |
Jan
(37) |
Feb
(23) |
Mar
(65) |
Apr
(22) |
May
(6) |
Jun
(3) |
Jul
|
Aug
|
Sep
(3) |
Oct
(22) |
Nov
(63) |
Dec
(71) |
2018 |
Jan
(83) |
Feb
(21) |
Mar
(35) |
Apr
(44) |
May
(14) |
Jun
(12) |
Jul
(8) |
Aug
(18) |
Sep
(10) |
Oct
(145) |
Nov
(144) |
Dec
(76) |
2019 |
Jan
(18) |
Feb
(28) |
Mar
(5) |
Apr
(208) |
May
(291) |
Jun
(158) |
Jul
(27) |
Aug
(8) |
Sep
(10) |
Oct
(83) |
Nov
(41) |
Dec
(31) |
2020 |
Jan
(16) |
Feb
(46) |
Mar
(100) |
Apr
(78) |
May
(69) |
Jun
(71) |
Jul
(28) |
Aug
(131) |
Sep
(176) |
Oct
(89) |
Nov
(147) |
Dec
(19) |
2021 |
Jan
(19) |
Feb
(25) |
Mar
(91) |
Apr
(98) |
May
(14) |
Jun
(44) |
Jul
(8) |
Aug
(3) |
Sep
(38) |
Oct
(57) |
Nov
(97) |
Dec
(74) |
2022 |
Jan
(89) |
Feb
(47) |
Mar
(15) |
Apr
(50) |
May
(54) |
Jun
(56) |
Jul
(80) |
Aug
(12) |
Sep
(11) |
Oct
(60) |
Nov
(48) |
Dec
(4) |
2023 |
Jan
(75) |
Feb
(49) |
Mar
(84) |
Apr
(24) |
May
(13) |
Jun
(74) |
Jul
(32) |
Aug
(66) |
Sep
(50) |
Oct
(38) |
Nov
(105) |
Dec
(181) |
2024 |
Jan
(21) |
Feb
(49) |
Mar
(77) |
Apr
(84) |
May
(20) |
Jun
(71) |
Jul
(53) |
Aug
(33) |
Sep
(54) |
Oct
(124) |
Nov
(151) |
Dec
(73) |
2025 |
Jan
(61) |
Feb
(17) |
Mar
(136) |
Apr
(72) |
May
(200) |
Jun
(238) |
Jul
(91) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <ho...@us...> - 2025-04-07 14:13:46
|
Revision: 15098 http://sourceforge.net/p/skim-app/code/15098 Author: hofman Date: 2025-04-07 14:13:23 +0000 (Mon, 07 Apr 2025) Log Message: ----------- Only set string of joined ink notes when old notes had a string Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2025-04-07 14:02:59 UTC (rev 15097) +++ trunk/SKPDFView.m 2025-04-07 14:13:23 UTC (rev 15098) @@ -4165,7 +4165,8 @@ NSString *string2 = [newCurrentAnnotation string]; newAnnotation = [PDFAnnotation newSkimNoteWithPaths:paths]; - [newAnnotation setString:[string2 length] == 0 ? string1 : [string1 length] == 0 ? string2 : [NSString stringWithFormat:@"%@ %@", string1, string2]]; + if ([string1 length] > 0 || [string2 length] > 0) + [newAnnotation setString:[string2 length] == 0 ? string1 : [string1 length] == 0 ? string2 : [NSString stringWithFormat:@"%@ %@", string1, string2]]; [newAnnotation setBorder:[currentAnnotation border]]; } if (newAnnotation) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-07 14:03:16
|
Revision: 15097 http://sourceforge.net/p/skim-app/code/15097 Author: hofman Date: 2025-04-07 14:02:59 +0000 (Mon, 07 Apr 2025) Log Message: ----------- Use old string when selections are non-interlacing when copying text Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2025-04-07 14:01:50 UTC (rev 15096) +++ trunk/SKPDFView.m 2025-04-07 14:02:59 UTC (rev 15097) @@ -4142,7 +4142,7 @@ if ([string1 length] > 0 && [string2 length] > 0) { if ([sel safeIndexOfFirstCharacterOnPage:page] > (copyText ? [newSel safeIndexOfLastCharacterOnPage:page] : [newSel safeIndexOfFirstCharacterOnPage:page])) string = [NSString stringWithFormat:@"%@ %@", string2, string1]; - else if (copyText || [newSel safeIndexOfFirstCharacterOnPage:page] > [sel safeIndexOfLastCharacterOnPage:page]) + else if (copyText == NO || [newSel safeIndexOfFirstCharacterOnPage:page] > [sel safeIndexOfLastCharacterOnPage:page]) string = [NSString stringWithFormat:@"%@ %@", string1, string2]; } [sel addSelection:newSel]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-07 14:02:08
|
Revision: 15096 http://sourceforge.net/p/skim-app/code/15096 Author: hofman Date: 2025-04-07 14:01:50 +0000 (Mon, 07 Apr 2025) Log Message: ----------- Use old string when selections are non-interlacing Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2025-04-07 09:35:49 UTC (rev 15095) +++ trunk/SKPDFView.m 2025-04-07 14:01:50 UTC (rev 15096) @@ -4142,7 +4142,7 @@ if ([string1 length] > 0 && [string2 length] > 0) { if ([sel safeIndexOfFirstCharacterOnPage:page] > (copyText ? [newSel safeIndexOfLastCharacterOnPage:page] : [newSel safeIndexOfFirstCharacterOnPage:page])) string = [NSString stringWithFormat:@"%@ %@", string2, string1]; - else if (copyText || [newSel safeIndexOfFirstCharacterOnPage:page] > [sel safeIndexOfFirstCharacterOnPage:page]) + else if (copyText || [newSel safeIndexOfFirstCharacterOnPage:page] > [sel safeIndexOfLastCharacterOnPage:page]) string = [NSString stringWithFormat:@"%@ %@", string1, string2]; } [sel addSelection:newSel]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-07 09:36:05
|
Revision: 15095 http://sourceforge.net/p/skim-app/code/15095 Author: hofman Date: 2025-04-07 09:35:49 +0000 (Mon, 07 Apr 2025) Log Message: ----------- fix layout calculations Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-07 09:29:15 UTC (rev 15094) +++ trunk/SKFontWell.m 2025-04-07 09:35:49 UTC (rev 15095) @@ -443,12 +443,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); + NSRect 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)]; + [T drawInRect:NSMakeRect(NSMinX(rect) - ceil(size.width) - 2.0, floor(NSMidY(rect) - 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. |
From: <ho...@us...> - 2025-04-07 09:29:32
|
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. |
From: <ho...@us...> - 2025-04-07 08:39:09
|
Revision: 15093 http://sourceforge.net/p/skim-app/code/15093 Author: hofman Date: 2025-04-07 08:38:52 +0000 (Mon, 07 Apr 2025) Log Message: ----------- Update release notes Modified Paths: -------------- trunk/ReleaseNotes.rtf Modified: trunk/ReleaseNotes.rtf =================================================================== --- trunk/ReleaseNotes.rtf 2025-04-06 22:17:19 UTC (rev 15092) +++ trunk/ReleaseNotes.rtf 2025-04-07 08:38:52 UTC (rev 15093) @@ -389,8 +389,7 @@ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\partightenfactor0 \ls2\ilvl0 \f1\i0\b0\fs22 \cf2 {\listtext \uc0\u8226 }Contextual menu for status bar to expose some display options.\ -\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\partightenfactor0 -\ls2\ilvl0\cf2 {\listtext \uc0\u8226 }New hidden preference for the placement of the toolbar relative to the title.\ +{\listtext \uc0\u8226 }New hidden preference for the placement of the toolbar relative to the title.\ {\listtext \uc0\u8226 }New hidden preference prevent links from changing the scale factor.\ {\listtext \uc0\u8226 }Separate toolbar to add and edit notes.\ {\listtext \uc0\u8226 }New toolbar button to toggle the note toolbar.\ @@ -407,6 +406,7 @@ {\listtext \uc0\u8226 }Update help on changing default PDF settings.\ {\listtext \uc0\u8226 }Fix Show/Hide menu titles.\ {\listtext \uc0\u8226 }Fix markup notes for separated text ranges on Sequoia.\ +{\listtext \uc0\u8226 }Try to preserve and join texts when joining markup notes.\ \pard\tx560\tx1440\tx2880\tx4320\tx5760\tx7200\partightenfactor0 \f2\b\fs28 \cf2 \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-06 22:17:35
|
Revision: 15092 http://sourceforge.net/p/skim-app/code/15092 Author: hofman Date: 2025-04-06 22:17:19 +0000 (Sun, 06 Apr 2025) Log Message: ----------- Join strings from joined markup notes when they are layed out non-interlacing in the order they occur, otherwise get the string from the joined selection. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2025-04-06 17:12:15 UTC (rev 15091) +++ trunk/SKPDFView.m 2025-04-06 22:17:19 UTC (rev 15092) @@ -4134,11 +4134,30 @@ if ([currentAnnotation isMarkup]) { NSString *type = [currentAnnotation type]; PDFSelection *sel = [currentAnnotation selection]; - [sel addSelection:[newCurrentAnnotation selection]]; + PDFSelection *newSel = [newCurrentAnnotation selection]; + BOOL copyText = [[NSUserDefaults standardUserDefaults] integerForKey:SKDisableUpdateContentsFromEnclosedTextKey] < 2; + NSString *string1 = [currentAnnotation string]; + NSString *string2 = [newCurrentAnnotation string]; + NSString *string = nil; + if ([string1 length] > 0 && [string2 length] > 0) { + if ([sel safeIndexOfFirstCharacterOnPage:page] > (copyText ? [newSel safeIndexOfLastCharacterOnPage:page] : [newSel safeIndexOfFirstCharacterOnPage:page])) + string = [NSString stringWithFormat:@"%@ %@", string2, string1]; + else if (copyText || [newSel safeIndexOfFirstCharacterOnPage:page] > [sel safeIndexOfFirstCharacterOnPage:page]) + string = [NSString stringWithFormat:@"%@ %@", string1, string2]; + } + [sel addSelection:newSel]; + if (string == nil) { + if (copyText) + string = [sel cleanedString]; + else if ([string1 length]) + string = string1; + else if ([string2 length]) + string = string2; + } newAnnotation = [PDFAnnotation newSkimNoteWithSelection:sel forType:type]; - if ([[NSUserDefaults standardUserDefaults] integerForKey:SKDisableUpdateContentsFromEnclosedTextKey] < 2) - [newAnnotation setString:[sel cleanedString]]; + if ([string length] > 0) + [newAnnotation setString:string]; } else if ([currentAnnotation isInk]) { NSMutableArray *paths = [[currentAnnotation pagePaths] mutableCopy]; [paths addObjectsFromArray:[newCurrentAnnotation pagePaths]]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-06 17:12:32
|
Revision: 15091 http://sourceforge.net/p/skim-app/code/15091 Author: hofman Date: 2025-04-06 17:12:15 +0000 (Sun, 06 Apr 2025) Log Message: ----------- deafult to textColor Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-06 17:02:43 UTC (rev 15090) +++ trunk/SKFontWell.m 2025-04-06 17:12:15 UTC (rev 15091) @@ -395,7 +395,7 @@ - (void)commonInit { if (textColor == nil) - [self setTextColor:[NSColor controlTextColor]]; + [self setTextColor:[NSColor textColor]]; [self setBezelStyle:NSShadowlessSquareBezelStyle]; // this is mainly to make it selectable [self setButtonType:NSPushOnPushOffButton]; [self setState:NSControlStateValueOff]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-06 17:03:00
|
Revision: 15090 http://sourceforge.net/p/skim-app/code/15090 Author: hofman Date: 2025-04-06 17:02:43 +0000 (Sun, 06 Apr 2025) Log Message: ----------- reset text color in font panel when deactivating a font wwell with text color Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-06 16:11:42 UTC (rev 15089) +++ trunk/SKFontWell.m 2025-04-06 17:02:43 UTC (rev 15090) @@ -164,10 +164,13 @@ - (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]; + } } } @@ -192,9 +195,12 @@ } - (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. |
From: <ho...@us...> - 2025-04-06 16:12:03
|
Revision: 15089 http://sourceforge.net/p/skim-app/code/15089 Author: hofman Date: 2025-04-06 16:11:42 +0000 (Sun, 06 Apr 2025) Log Message: ----------- do not care at all about showsStateBBy because we do our own drrawing Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-06 16:04:18 UTC (rev 15088) +++ trunk/SKFontWell.m 2025-04-06 16:11:42 UTC (rev 15089) @@ -392,7 +392,6 @@ [self setTextColor:[NSColor controlTextColor]]; [self setBezelStyle:NSShadowlessSquareBezelStyle]; // this is mainly to make it selectable [self setButtonType:NSPushOnPushOffButton]; - [self setShowsStateBy:NSNoCellMask]; [self setState:NSControlStateValueOff]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-06 16:04:34
|
Revision: 15088 http://sourceforge.net/p/skim-app/code/15088 Author: hofman Date: 2025-04-06 16:04:18 +0000 (Sun, 06 Apr 2025) Log Message: ----------- Initialize showsStateBy in cell class Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-06 15:46:51 UTC (rev 15087) +++ trunk/SKFontWell.m 2025-04-06 16:04:18 UTC (rev 15088) @@ -82,7 +82,6 @@ if ([self font] == nil) [self setFont:[NSFont userFontOfSize:0.0]]; [self setTitle:[NSString stringWithFormat:@"%@ %.0f", [[self font] displayName], [[self font] pointSize]]]; - [[self cell] setShowsStateBy:NSNoCellMask]; [[self cell] setAction:@selector(changeActive:)]; [[self cell] setTarget:self]; [self registerForDraggedTypes:@[SKNSFontPanelDescriptorsPboardType, SKNSFontPanelFamiliesPboardType, NSPasteboardTypeColor]]; @@ -393,6 +392,7 @@ [self setTextColor:[NSColor controlTextColor]]; [self setBezelStyle:NSShadowlessSquareBezelStyle]; // this is mainly to make it selectable [self setButtonType:NSPushOnPushOffButton]; + [self setShowsStateBy:NSNoCellMask]; [self setState:NSControlStateValueOff]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-06 15:47:07
|
Revision: 15087 http://sourceforge.net/p/skim-app/code/15087 Author: hofman Date: 2025-04-06 15:46:51 +0000 (Sun, 06 Apr 2025) Log Message: ----------- Only set title in init Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-06 15:41:29 UTC (rev 15086) +++ trunk/SKFontWell.m 2025-04-06 15:46:51 UTC (rev 15087) @@ -60,7 +60,6 @@ @interface SKFontWell () - (void)changeActive:(id)sender; -- (void)fontChanged; @end @@ -82,7 +81,7 @@ - (void)commonInit { if ([self font] == nil) [self setFont:[NSFont userFontOfSize:0.0]]; - [self fontChanged]; + [self setTitle:[NSString stringWithFormat:@"%@ %.0f", [[self font] displayName], [[self font] pointSize]]]; [[self cell] setShowsStateBy:NSNoCellMask]; [[self cell] setAction:@selector(changeActive:)]; [[self cell] setTarget:self]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-06 15:41:45
|
Revision: 15086 http://sourceforge.net/p/skim-app/code/15086 Author: hofman Date: 2025-04-06 15:41:29 +0000 (Sun, 06 Apr 2025) Log Message: ----------- Set internal action and target on cell to be clearer Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-06 08:57:03 UTC (rev 15085) +++ trunk/SKFontWell.m 2025-04-06 15:41:29 UTC (rev 15086) @@ -84,8 +84,8 @@ [self setFont:[NSFont userFontOfSize:0.0]]; [self fontChanged]; [[self cell] setShowsStateBy:NSNoCellMask]; - [super setAction:@selector(changeActive:)]; - [super setTarget:self]; + [[self cell] setAction:@selector(changeActive:)]; + [[self cell] setTarget:self]; [self registerForDraggedTypes:@[SKNSFontPanelDescriptorsPboardType, SKNSFontPanelFamiliesPboardType, NSPasteboardTypeColor]]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-06 08:57:20
|
Revision: 15085 http://sourceforge.net/p/skim-app/code/15085 Author: hofman Date: 2025-04-06 08:57:03 +0000 (Sun, 06 Apr 2025) Log Message: ----------- set text color in font panel after showing the panel, otherwise it is not set Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-04 15:34:46 UTC (rev 15084) +++ trunk/SKFontWell.m 2025-04-06 08:57:03 UTC (rev 15085) @@ -180,9 +180,9 @@ [nc postNotificationName:SKFontWellWillBecomeActiveNotification object:self]; [fm setSelectedFont:[self font] isMultiple:NO]; + [fm orderFrontFontPanel:self]; if ([self hasTextColor]) [fm setSelectedAttributes:@{NSForegroundColorAttributeName: [self textColor]} isMultiple:NO]; - [fm orderFrontFontPanel:self]; [nc addObserver:self selector:@selector(fontWellWillBecomeActive:) name:SKFontWellWillBecomeActiveNotification object:nil]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-04 15:35:04
|
Revision: 15084 http://sourceforge.net/p/skim-app/code/15084 Author: hofman Date: 2025-04-04 15:34:46 +0000 (Fri, 04 Apr 2025) Log Message: ----------- inset focus ring for line well matching text field Modified Paths: -------------- trunk/SKLineWell.m Modified: trunk/SKLineWell.m =================================================================== --- trunk/SKLineWell.m 2025-04-04 15:32:51 UTC (rev 15083) +++ trunk/SKLineWell.m 2025-04-04 15:34:46 UTC (rev 15084) @@ -269,11 +269,11 @@ } - (NSRect)focusRingMaskBounds { - return [self bounds]; + return NSInsetRect([self bounds], 1.0, 1.0); } - (void)drawFocusRingMask { - NSRectFill([self bounds]); + NSRectFill([self focusRingMaskBounds]); } - (NSImage *)dragImage { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-04 15:33:07
|
Revision: 15083 http://sourceforge.net/p/skim-app/code/15083 Author: hofman Date: 2025-04-04 15:32:51 +0000 (Fri, 04 Apr 2025) Log Message: ----------- let shadowwless square button determine focus ring Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-04 14:48:06 UTC (rev 15082) +++ trunk/SKFontWell.m 2025-04-04 15:32:51 UTC (rev 15083) @@ -455,14 +455,6 @@ } } -- (NSRect)focusRingMaskBoundsForFrame:(NSRect)cellFrame inView:(NSView *)controlView { - return cellFrame; -} - -- (void)drawFocusRingMaskWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { - NSRectFill(cellFrame); -} - - (NSString *)accessibilityRoleDescription { return NSLocalizedString(@"font well", @"Accessibility description"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-04 14:48:22
|
Revision: 15082 http://sourceforge.net/p/skim-app/code/15082 Author: hofman Date: 2025-04-04 14:48:06 +0000 (Fri, 04 Apr 2025) Log Message: ----------- reduce highlight around text color swatch Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-04 09:34:47 UTC (rev 15081) +++ trunk/SKFontWell.m 2025-04-04 14:48:06 UTC (rev 15082) @@ -444,10 +444,10 @@ [NSGraphicsContext saveGraphicsState]; [[self textColor] drawSwatchInRect:rect]; if (SKHasDarkAppearance()) { - [[NSColor colorWithGenericGamma22White:1.0 alpha:0.55] setStroke]; + [[NSColor colorWithGenericGamma22White:1.0 alpha:0.5] setStroke]; [[NSGraphicsContext currentContext] setCompositingOperation:NSCompositingOperationScreen]; } else { - [[NSColor colorWithGenericGamma22White:0.0 alpha:0.55] setStroke]; + [[NSColor colorWithGenericGamma22White:0.0 alpha:0.5] setStroke]; [[NSGraphicsContext currentContext] setCompositingOperation:NSCompositingOperationMultiply]; } [NSBezierPath strokeRect:NSInsetRect(rect, 0.5, 0.5)]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-04 09:35:04
|
Revision: 15081 http://sourceforge.net/p/skim-app/code/15081 Author: hofman Date: 2025-04-04 09:34:47 +0000 (Fri, 04 Apr 2025) Log Message: ----------- remove unused macro Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-04 09:15:36 UTC (rev 15080) +++ trunk/SKFontWell.m 2025-04-04 09:34:47 UTC (rev 15081) @@ -54,7 +54,6 @@ #define TEXTCOLOR_KEY @"textColor" #define HASTEXTCOLOR_KEY @"hasTextColor" -#define FONT_KEY @"font" #define ACTION_KEY @"action" #define TARGET_KEY @"target" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-04 09:15:53
|
Revision: 15080 http://sourceforge.net/p/skim-app/code/15080 Author: hofman Date: 2025-04-04 09:15:36 +0000 (Fri, 04 Apr 2025) Log Message: ----------- Set low compression priority for font wells so they don't expand the layout Modified Paths: -------------- trunk/Base.lproj/NotesPreferences.xib Modified: trunk/Base.lproj/NotesPreferences.xib =================================================================== --- trunk/Base.lproj/NotesPreferences.xib 2025-04-03 21:53:58 UTC (rev 15079) +++ trunk/Base.lproj/NotesPreferences.xib 2025-04-04 09:15:36 UTC (rev 15080) @@ -401,7 +401,7 @@ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> - <button toolTip="Font to use for new text notes" horizontalHuggingPriority="249" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="41" customClass="SKFontWell"> + <button toolTip="Font to use for new text notes" horizontalHuggingPriority="249" horizontalCompressionResistancePriority="250" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="41" customClass="SKFontWell"> <rect key="frame" x="116" y="283" width="287" height="22"/> <constraints> <constraint firstAttribute="height" constant="22" id="RQC-GG-zDW"/> @@ -418,7 +418,7 @@ <binding destination="84" name="fontSize" keyPath="values.SKFreeTextNoteFontSize" previousBinding="108" id="110"/> </connections> </button> - <button toolTip="Font to use for new anchored notes" horizontalHuggingPriority="249" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="42" customClass="SKFontWell"> + <button toolTip="Font to use for new anchored notes" horizontalHuggingPriority="249" horizontalCompressionResistancePriority="250" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="42" customClass="SKFontWell"> <rect key="frame" x="116" y="251" width="287" height="22"/> <constraints> <constraint firstAttribute="height" constant="22" id="Zue-kV-mJ5"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-03 21:54:15
|
Revision: 15079 http://sourceforge.net/p/skim-app/code/15079 Author: hofman Date: 2025-04-03 21:53:58 +0000 (Thu, 03 Apr 2025) Log Message: ----------- Draw text color in swatch at the side of the font well Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-03 21:33:36 UTC (rev 15078) +++ trunk/SKFontWell.m 2025-04-03 21:53:58 UTC (rev 15079) @@ -38,6 +38,7 @@ #import "SKFontWell.h" #import "NSGraphics_SKExtensions.h" +#import "NSGeometry_SKExtensions.h" #import "NSColor_SKExtensions.h" #import "NSObject_SKExtensions.h" #import "NSImage_SKExtensions.h" @@ -437,19 +438,22 @@ [NSBezierPath strokeRect:NSInsetRect(frame, 0.5, 0.5)]; [NSGraphicsContext restoreGraphicsState]; } -} - -- (void)drawInteriorWithFrame:(NSRect)frame inView:(NSView *)controlView { + if ([self hasTextColor]) { - CGFloat textLuminance = [[self textColor] luminance]; - CGFloat backgroundLuminance = [([self state] == NSControlStateValueOn ? [NSColor selectedControlColor] : [NSColor controlBackgroundColor]) luminance]; - if ((fmax(textLuminance, backgroundLuminance) + 0.05) / (fmin(textLuminance, backgroundLuminance) + 0.05) < 4.5) { - drawShadow = YES; - [super drawInteriorWithFrame:frame inView:controlView]; + NSRect rect = NSInsetRect(frame, 4.0, 4.0); + rect = SKSliceRect(rect, NSHeight(rect), NSMaxXEdge); + [NSGraphicsContext saveGraphicsState]; + [[self textColor] drawSwatchInRect:rect]; + if (SKHasDarkAppearance()) { + [[NSColor colorWithGenericGamma22White:1.0 alpha:0.55] setStroke]; + [[NSGraphicsContext currentContext] setCompositingOperation:NSCompositingOperationScreen]; + } else { + [[NSColor colorWithGenericGamma22White:0.0 alpha:0.55] setStroke]; + [[NSGraphicsContext currentContext] setCompositingOperation:NSCompositingOperationMultiply]; } + [NSBezierPath strokeRect:NSInsetRect(rect, 0.5, 0.5)]; + [NSGraphicsContext restoreGraphicsState]; } - [super drawInteriorWithFrame:frame inView:controlView]; - drawShadow = NO; } - (NSRect)focusRingMaskBoundsForFrame:(NSRect)cellFrame inView:(NSView *)controlView { @@ -460,22 +464,6 @@ NSRectFill(cellFrame); } -- (NSAttributedString *)attributedTitle { - if ([self hasTextColor]) { - NSMutableAttributedString *attrString = [[super attributedTitle] mutableCopy]; - [attrString addAttribute:NSForegroundColorAttributeName value:[self textColor] range:NSMakeRange(0, [attrString length])]; - if (drawShadow) { - NSShadow *shade = [[NSShadow alloc] init]; - [shade setShadowColor:SKHasDarkAppearance() ? [NSColor whiteColor] : [NSColor blackColor]]; - [shade setShadowBlurRadius:1.0]; - [attrString addAttribute:NSShadowAttributeName value:shade range:NSMakeRange(0, [attrString length])]; - } - return attrString; - } else { - return [super attributedTitle]; - } -} - - (NSString *)accessibilityRoleDescription { return NSLocalizedString(@"font well", @"Accessibility description"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-03 21:33:53
|
Revision: 15078 http://sourceforge.net/p/skim-app/code/15078 Author: hofman Date: 2025-04-03 21:33:36 +0000 (Thu, 03 Apr 2025) Log Message: ----------- update text color in font panel when text color changes Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-03 17:24:08 UTC (rev 15077) +++ trunk/SKFontWell.m 2025-04-03 21:33:36 UTC (rev 15078) @@ -180,6 +180,8 @@ [nc postNotificationName:SKFontWellWillBecomeActiveNotification object:self]; [fm setSelectedFont:[self font] isMultiple:NO]; + if ([self hasTextColor]) + [fm setSelectedAttributes:@{NSForegroundColorAttributeName: [self textColor]} isMultiple:NO]; [fm orderFrontFontPanel:self]; [nc addObserver:self selector:@selector(fontWellWillBecomeActive:) @@ -205,6 +207,12 @@ NSAccessibilityPostNotification([self cell], NSAccessibilityValueChangedNotification); } +- (void)textColorChanged { + if ([self isActive]) + [[NSFontManager sharedFontManager] setSelectedAttributes:@{NSForegroundColorAttributeName: [self textColor]} isMultiple:NO]; + [self setNeedsDisplay:YES]; +} + - (void)propagateValue:(id)value forBinding:(NSString *)binding { updatedBinding = binding; [super propagateValue:value forBinding:binding]; @@ -246,7 +254,7 @@ BOOL didChange = [[self textColor] isEqual:newTextColor] == NO; [[self cell] setTextColor:newTextColor]; if (didChange) - [self setNeedsDisplay:YES]; + [self textColorChanged]; } - (BOOL)hasTextColor { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-03 17:24:24
|
Revision: 15077 http://sourceforge.net/p/skim-app/code/15077 Author: hofman Date: 2025-04-03 17:24:08 +0000 (Thu, 03 Apr 2025) Log Message: ----------- Draw shadowed text twice to make it more pronounced Modified Paths: -------------- trunk/SKFontWell.h trunk/SKFontWell.m Modified: trunk/SKFontWell.h =================================================================== --- trunk/SKFontWell.h 2025-04-03 16:21:42 UTC (rev 15076) +++ trunk/SKFontWell.h 2025-04-03 17:24:08 UTC (rev 15077) @@ -62,6 +62,7 @@ @interface SKFontWellCell : NSButtonCell { NSColor *textColor; BOOL hasTextColor; + BOOL drawShadow; } @property (nonatomic, nullable, copy) NSColor *textColor; Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-03 16:21:42 UTC (rev 15076) +++ trunk/SKFontWell.m 2025-04-03 17:24:08 UTC (rev 15077) @@ -431,6 +431,19 @@ } } +- (void)drawInteriorWithFrame:(NSRect)frame inView:(NSView *)controlView { + if ([self hasTextColor]) { + CGFloat textLuminance = [[self textColor] luminance]; + CGFloat backgroundLuminance = [([self state] == NSControlStateValueOn ? [NSColor selectedControlColor] : [NSColor controlBackgroundColor]) luminance]; + if ((fmax(textLuminance, backgroundLuminance) + 0.05) / (fmin(textLuminance, backgroundLuminance) + 0.05) < 4.5) { + drawShadow = YES; + [super drawInteriorWithFrame:frame inView:controlView]; + } + } + [super drawInteriorWithFrame:frame inView:controlView]; + drawShadow = NO; +} + - (NSRect)focusRingMaskBoundsForFrame:(NSRect)cellFrame inView:(NSView *)controlView { return cellFrame; } @@ -443,11 +456,9 @@ if ([self hasTextColor]) { NSMutableAttributedString *attrString = [[super attributedTitle] mutableCopy]; [attrString addAttribute:NSForegroundColorAttributeName value:[self textColor] range:NSMakeRange(0, [attrString length])]; - CGFloat textLuminance = [[self textColor] luminance]; - CGFloat backgroundLuminance = [([self state] == NSControlStateValueOn ? [NSColor selectedControlColor] : [self backgroundColor]) luminance]; - if ((fmax(textLuminance, backgroundLuminance) + 0.05) / (fmin(textLuminance, backgroundLuminance) + 0.05) < 4.5) { + if (drawShadow) { NSShadow *shade = [[NSShadow alloc] init]; - [shade setShadowColor:backgroundLuminance < 0.5 ? [NSColor whiteColor] : [NSColor blackColor]]; + [shade setShadowColor:SKHasDarkAppearance() ? [NSColor whiteColor] : [NSColor blackColor]]; [shade setShadowBlurRadius:1.0]; [attrString addAttribute:NSShadowAttributeName value:shade range:NSMakeRange(0, [attrString length])]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-03 16:21:58
|
Revision: 15076 http://sourceforge.net/p/skim-app/code/15076 Author: hofman Date: 2025-04-03 16:21:42 +0000 (Thu, 03 Apr 2025) Log Message: ----------- Override mouseDown to start dragging, so it can start immediately when dragging. Draw drag imae with current appearance. Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-03 15:58:07 UTC (rev 15075) +++ trunk/SKFontWell.m 2025-04-03 16:21:42 UTC (rev 15076) @@ -41,6 +41,7 @@ #import "NSColor_SKExtensions.h" #import "NSObject_SKExtensions.h" #import "NSImage_SKExtensions.h" +#import "SKApplication.h" #define SKNSFontPanelDescriptorsPboardType @"NSFontPanelDescriptorsPboardType" #define SKNSFontPanelFamiliesPboardType @"NSFontPanelFamiliesPboardType" @@ -259,6 +260,42 @@ } } +#pragma mark Dragging + +- (void)mouseDown:(NSEvent *)theEvent { + [[self cell] setHighlighted:YES]; + [self setNeedsDisplay:YES]; + + if ([NSApp willDragMouse]) { + [[self cell] setHighlighted:NO]; + [self setNeedsDisplay:YES]; + + NSRect bounds = [self bounds]; + + NSImage *dragImage = [NSImage bitmapImageWithSize:bounds.size forView:self drawingHandler:^(NSRect rect){ + SKRunWithAppearance(self, ^{ + [[self cell] drawInteriorWithFrame:rect inView:self]; + }); + }]; + + NSDictionary *dict = @{SKNSFontCollectionFontDescriptors: @[[[self font] fontDescriptor]], NSFontSizeAttribute: [NSNumber numberWithDouble:[[self font] pointSize]]}; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:dict]; + NSPasteboardItem *item = [[NSPasteboardItem alloc] init]; + [item setData:data forType:UTIForNSPboardType(SKNSFontPanelDescriptorsPboardType)]; + + NSDraggingItem *dragItem = [[NSDraggingItem alloc] initWithPasteboardWriter:item]; + [dragItem setDraggingFrame:bounds contents:dragImage]; + + [self beginDraggingSessionWithItems:@[dragItem] event:theEvent source:self]; + } else { + [super mouseDown:theEvent]; + } +} + +- (NSString *)accessibilitySubrole { + return @"AXFontWell"; +} + #pragma mark NSDraggingSource protocol - (NSDragOperation)draggingSession:(NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context { @@ -420,32 +457,6 @@ } } -- (BOOL)trackMouse:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)flag { - BOOL didTrack = [super trackMouse:event inRect:cellFrame ofView:controlView untilMouseUp:flag]; - if (didTrack == NO) { - NSRect bounds = [controlView bounds]; - - NSImage *dragImage = [NSImage bitmapImageWithSize:bounds.size forView:controlView drawingHandler:^(NSRect rect){ - [self drawInteriorWithFrame:rect inView:controlView]; - }]; - - NSDictionary *dict = @{SKNSFontCollectionFontDescriptors: @[[[self font] fontDescriptor]], NSFontSizeAttribute: [NSNumber numberWithDouble:[[self font] pointSize]]}; - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:dict]; - NSPasteboardItem *item = [[NSPasteboardItem alloc] init]; - [item setData:data forType:UTIForNSPboardType(SKNSFontPanelDescriptorsPboardType)]; - - NSDraggingItem *dragItem = [[NSDraggingItem alloc] initWithPasteboardWriter:item]; - [dragItem setDraggingFrame:bounds contents:dragImage]; - - [controlView beginDraggingSessionWithItems:@[dragItem] event:event source:(id<NSDraggingSource>)controlView]; - } - return YES; -} - -- (NSString *)accessibilitySubrole { - return @"AXFontWell"; -} - - (NSString *)accessibilityRoleDescription { return NSLocalizedString(@"font well", @"Accessibility description"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-03 15:58:24
|
Revision: 15075 http://sourceforge.net/p/skim-app/code/15075 Author: hofman Date: 2025-04-03 15:58:07 +0000 (Thu, 03 Apr 2025) Log Message: ----------- Don't declare NSDraggingDestination as NSView already does that Modified Paths: -------------- trunk/SKColorSwatch.h trunk/SKFontWell.h trunk/SKLineWell.h Modified: trunk/SKColorSwatch.h =================================================================== --- trunk/SKColorSwatch.h 2025-04-03 14:55:48 UTC (rev 15074) +++ trunk/SKColorSwatch.h 2025-04-03 15:58:07 UTC (rev 15075) @@ -42,7 +42,7 @@ @class SKColorSwatchItemView; -@interface SKColorSwatch : NSControl <NSDraggingSource, NSDraggingDestination, NSAccessibilityGroup> { +@interface SKColorSwatch : NSControl <NSDraggingSource, NSAccessibilityGroup> { NSMutableArray<SKColorSwatchItemView *> *itemViews; NSControl *backgroundView; CGFloat bezelWidth; Modified: trunk/SKFontWell.h =================================================================== --- trunk/SKFontWell.h 2025-04-03 14:55:48 UTC (rev 15074) +++ trunk/SKFontWell.h 2025-04-03 15:58:07 UTC (rev 15075) @@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SKFontWell : NSButton <NSDraggingSource, NSDraggingDestination> { +@interface SKFontWell : NSButton <NSDraggingSource> { id target; SEL action; NSString *updatedBinding; Modified: trunk/SKLineWell.h =================================================================== --- trunk/SKLineWell.h 2025-04-03 14:55:48 UTC (rev 15074) +++ trunk/SKLineWell.h 2025-04-03 15:58:07 UTC (rev 15075) @@ -56,7 +56,7 @@ SKLineWellDisplayStyleOval }; -@interface SKLineWell : NSControl <NSDraggingSource, NSDraggingDestination, NSAccessibilityButton> { +@interface SKLineWell : NSControl <NSDraggingSource, NSAccessibilityButton> { CGFloat lineWidth; PDFBorderStyle style; NSArray<NSNumber *> *dashPattern; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-04-03 14:56:05
|
Revision: 15074 http://sourceforge.net/p/skim-app/code/15074 Author: hofman Date: 2025-04-03 14:55:48 +0000 (Thu, 03 Apr 2025) Log Message: ----------- macro for NSPboardType to UTI Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2025-04-03 09:39:48 UTC (rev 15073) +++ trunk/SKFontWell.m 2025-04-03 14:55:48 UTC (rev 15074) @@ -44,6 +44,7 @@ #define SKNSFontPanelDescriptorsPboardType @"NSFontPanelDescriptorsPboardType" #define SKNSFontPanelFamiliesPboardType @"NSFontPanelFamiliesPboardType" +#define UTIForNSPboardType(type) CFBridgingRelease(UTTypeCreatePreferredIdentifierForTag(kUTTagClassNSPboardType, (__bridge CFStringRef)type, NULL)) #define SKNSFontCollectionFontDescriptors @"NSFontCollectionFontDescriptors" #define SKFontWellWillBecomeActiveNotification @"SKFontWellWillBecomeActiveNotification" @@ -294,7 +295,7 @@ @try { if ([type isEqualToString:SKNSFontPanelDescriptorsPboardType]) { - NSData *data = [pboard dataForType:type] ?: [pboard dataForType:CFBridgingRelease(UTTypeCreatePreferredIdentifierForTag(kUTTagClassNSPboardType, (__bridge CFStringRef)type, NULL))]; + NSData *data = [pboard dataForType:type] ?: [pboard dataForType:UTIForNSPboardType(type)]; NSDictionary *dict = [data isKindOfClass:[NSData class]] ? [NSKeyedUnarchiver unarchiveObjectWithData:data] : nil; if ([dict isKindOfClass:[NSDictionary class]]) { NSArray *fontDescriptors = [dict objectForKey:SKNSFontCollectionFontDescriptors]; @@ -306,7 +307,7 @@ } } } else if ([type isEqualToString:SKNSFontPanelFamiliesPboardType]) { - NSArray *families = [pboard propertyListForType:type] ?: [pboard propertyListForType:CFBridgingRelease(UTTypeCreatePreferredIdentifierForTag(kUTTagClassNSPboardType, (__bridge CFStringRef)type, NULL))]; + NSArray *families = [pboard propertyListForType:type] ?: [pboard propertyListForType:UTIForNSPboardType(type)]; NSString *family = ([families isKindOfClass:[NSArray class]] && [families count]) ? [families objectAtIndex:0] : nil; if ([family isKindOfClass:[NSString class]]) droppedFont = [[NSFontManager sharedFontManager] convertFont:[self font] toFamily:family]; @@ -431,7 +432,7 @@ NSDictionary *dict = @{SKNSFontCollectionFontDescriptors: @[[[self font] fontDescriptor]], NSFontSizeAttribute: [NSNumber numberWithDouble:[[self font] pointSize]]}; NSData *data = [NSKeyedArchiver archivedDataWithRootObject:dict]; NSPasteboardItem *item = [[NSPasteboardItem alloc] init]; - [item setData:data forType:CFBridgingRelease(UTTypeCreatePreferredIdentifierForTag(kUTTagClassNSPboardType, (__bridge CFStringRef)SKNSFontPanelDescriptorsPboardType, NULL))]; + [item setData:data forType:UTIForNSPboardType(SKNSFontPanelDescriptorsPboardType)]; NSDraggingItem *dragItem = [[NSDraggingItem alloc] initWithPasteboardWriter:item]; [dragItem setDraggingFrame:bounds contents:dragImage]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |