[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Can't set fonts in panels
From:
Adam Fedor
Subject:
Can't set fonts in panels
Date:
2001年10月10日 14:22:08 -0600
User-agent:
Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:0.9.4) Gecko/20010915
Whenever you try to set a font using the NSFontPanel, it sends a
changeFont: message to the main and key windows. However, the
changeFont: message will never be sent to another Panel, since panels
cannot become main, and the NSFontPanel takes key status as soon as you
click a button in it (removing the desired Panel from key status).
This can easily be fixed by the patching NSFontPanel's initialization:
diff -c -r1.29 NSFontPanel.m
*** NSFontPanel.m 2001年08月01日 22:48:17 1.29
--- NSFontPanel.m 2001年10月10日 20:17:27
***************
*** 598,603 ****
--- 598,604 ----
[self setMinSize: [self frame].size];
[self setInitialFirstResponder: setButton];
+ [self setBecomesKeyOnlyIfNeeded: YES];
return self;
}
But I wonder if this causes some other unintended consequences?
--
Adam Fedor, Digital Optics | Fudd's law of opposition: Push
fedor@doc.com http://www.doc.com | something hard enough, and it
fedor@gnu.org http://www.gnustep.org | will fall over.
- Can't set fonts in panels,
Adam Fedor <=