Merge pull request #3170 from daboe01/fontpanel-fixes

fixed: fontpanel was crashing
This commit is contained in:
daboe01
2026-01-27 20:04:15 +01:00
committed by GitHub
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -115,3 +115,4 @@
@import "CPWindow.j"
@import "CPWindowController.j"
@import "CPWorkspace.j"
@import "CPFontPanel.j"
+3
View File
@@ -197,6 +197,9 @@ var _availableTraits= [@"Normal", @"Italic", @"Bold", @"Bold Italic"],
if (![self isVisible])
return;
if (![textView respondsToSelector:@selector(_attributesForFontPanel)])
return;
var attribs = [textView _attributesForFontPanel],
font = [attribs objectForKey:CPFontAttributeName] || [[textView textStorage] font] || [CPFont systemFontOfSize:12.0],
color = [attribs objectForKey:CPForegroundColorAttributeName];