mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-21 09:50:41 +00:00
fix missing font panel in manual test of CPTextView
This commit is contained in:
@@ -506,4 +506,4 @@ var _CPFontDetectPickTwoDifferentFonts = function(candidates)
|
||||
return [candidates[0]];
|
||||
};
|
||||
|
||||
[CPFontManager setFontManagerFactory:[CPFontManager class]];
|
||||
[CPFontManager setFontManagerFactory:[CPFontManager class]];
|
||||
@@ -499,4 +499,4 @@ var _availableTraits= [@"Normal", @"Italic", @"Bold", @"Bold Italic"],
|
||||
|
||||
@end
|
||||
|
||||
[CPFontManager setFontPanelFactory:CPFontPanel];
|
||||
[CPFontManager setFontPanelFactory:[CPFontPanel class]];
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
@import <Foundation/Foundation.j>
|
||||
@import <AppKit/CPTextView.j>
|
||||
@import <AppKit/CPFontPanel.j>
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
@@ -14,6 +15,12 @@
|
||||
CPTextView _textView2;
|
||||
}
|
||||
|
||||
- (void)orderFrontFontPanel:(id)sender
|
||||
{
|
||||
[CPFontManager setFontPanelFactory:[CPFontPanel class]];
|
||||
[[CPFontManager sharedFontManager] orderFrontFontPanel:self];
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
|
||||
{
|
||||
// CPLogRegister(CPLogConsole);
|
||||
@@ -24,6 +31,8 @@
|
||||
[contentView setBackgroundColor:[CPColor colorWithWhite:0.95 alpha:1.0]];
|
||||
|
||||
_textView = [[CPTextView alloc] initWithFrame:CGRectMake(0,0,500,500)];
|
||||
[_textView setRichText:YES];
|
||||
|
||||
// _textView2 = [[CPTextView alloc] initWithFrame:CGRectMake(0,0,500,500)];
|
||||
// _textView2._isRichText = NO;
|
||||
// [_textView setBackgroundColor:[CPColor whiteColor]];
|
||||
@@ -61,9 +70,7 @@
|
||||
|
||||
item = [mainMenu insertItemWithTitle:@"Format" action:nil keyEquivalent:nil atIndex:0];
|
||||
var formatMenu = [[CPMenu alloc] initWithTitle:@"Format Menu"];
|
||||
|
||||
[formatMenu addItemWithTitle:@"Font panel" action:@selector(orderFrontFontPanel:) keyEquivalent:@"f"];
|
||||
|
||||
[mainMenu setSubmenu:formatMenu forItem:item];
|
||||
|
||||
//
|
||||
@@ -85,11 +92,6 @@
|
||||
[CPMenu setMenuBarVisible:YES];
|
||||
}
|
||||
|
||||
// //-> CPApplication (?)
|
||||
// - (void)orderFrontFontPanel:sender
|
||||
// {
|
||||
// [[CPFontManager sharedFontManager] orderFrontFontPanel:self];
|
||||
// }
|
||||
//
|
||||
// - (void) makeRTF:sender
|
||||
// {
|
||||
|
||||
Reference in New Issue
Block a user