mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-04 11:54:59 +00:00
Merge branch 'master' of github.com:280north/cappuccino into integration
This commit is contained in:
commit
58494c5c2a
3 files changed
+24
-7
No files matched your search
@@ -341,7 +341,8 @@ CPDeleteForwardKeyCode = 46;
|
||||
|
||||
@end
|
||||
|
||||
var CPResponderNextResponderKey = @"CPResponderNextResponderKey";
|
||||
var CPResponderNextResponderKey = @"CPResponderNextResponderKey",
|
||||
CPResponderMenuKey = @"CPResponderMenuKey";
|
||||
|
||||
@implementation CPResponder (CPCoding)
|
||||
|
||||
@@ -355,7 +356,10 @@ var CPResponderNextResponderKey = @"CPResponderNextResponderKey";
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
{
|
||||
_nextResponder = [aCoder decodeObjectForKey:CPResponderNextResponderKey];
|
||||
_menu = [aCoder decodeObjectForKey:CPResponderMenuKey];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
@@ -369,6 +373,8 @@ var CPResponderNextResponderKey = @"CPResponderNextResponderKey";
|
||||
// This will come out nil on the other side with decodeObjectForKey:
|
||||
if (_nextResponder !== nil)
|
||||
[aCoder encodeConditionalObject:_nextResponder forKey:CPResponderNextResponderKey];
|
||||
|
||||
[aCoder encodeObject:_menu forKey:CPResponderMenuKey];
|
||||
}
|
||||
|
||||
@end
|
||||
+13
-6
@@ -22,12 +22,13 @@
|
||||
|
||||
@import <Foundation/CPCharacterSet.j>
|
||||
@import <Foundation/CPIndexSet.j>
|
||||
@import <Foundation/CPTimer.j>
|
||||
|
||||
@import <AppKit/CPButton.j>
|
||||
@import <AppKit/_CPMenuWindow.j>
|
||||
@import <AppKit/CPScrollView.j>
|
||||
@import <AppKit/CPTextField.j>
|
||||
@import <AppKit/CPWindow.j>
|
||||
@import "CPButton.j"
|
||||
@import "CPScrollView.j"
|
||||
@import "CPTextField.j"
|
||||
@import "CPWindow.j"
|
||||
@import "_CPMenuWindow.j"
|
||||
|
||||
#include "Platform/Platform.h"
|
||||
|
||||
@@ -974,9 +975,15 @@ var CPThemeStateAutoCompleting = @"CPThemeStateAutoCompleting",
|
||||
[super sizeToFit];
|
||||
|
||||
var size = [self bounds].size,
|
||||
minSize = [self currentValueForThemeAttribute:@"min-size"];
|
||||
minSize = [self currentValueForThemeAttribute:@"min-size"],
|
||||
contentInset = [self currentValueForThemeAttribute:@"content-inset"];
|
||||
|
||||
size.height = minSize.height;
|
||||
|
||||
// this is necessary to recalculate the width of the token due to new CPTextField sizeToFit
|
||||
// behaviour that doesn't resize width on bezeled textfield
|
||||
size.width = [([self stringValue] || @" ") sizeWithFont:[self font]].width + contentInset.left + contentInset.right;
|
||||
|
||||
[self setFrameSize:size];
|
||||
}
|
||||
|
||||
|
||||
@@ -263,6 +263,8 @@ var _CPTimerBridgeTimer = function(codeOrFunction, aDelay, shouldRepeat, functio
|
||||
return timeoutID;
|
||||
}
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
|
||||
window.setTimeout = function(codeOrFunction, aDelay)
|
||||
{
|
||||
return _CPTimerBridgeTimer(codeOrFunction, aDelay, NO, Array.prototype.slice.apply(arguments, [2]));
|
||||
@@ -287,3 +289,5 @@ window.clearInterval = function(aTimeoutID)
|
||||
{
|
||||
window.clearTimeout(aTimeoutID);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user