Merge branch '0.7b' of git@github.com:280north/cappuccino into tlr0.7b

This commit is contained in:
tlrobinson committed 2009-05-11 16:14:45 -07:00
commit e249937457
5 files changed
+37 -24

No files matched your search

+5
View File
@@ -8,6 +8,11 @@
{
}
+ (CPString)themeClass
{
return @"button-bar";
}
+ (id)themeAttributes
{
return [CPDictionary dictionaryWithObjects:[nil]
+10 -4
View File
@@ -2199,7 +2199,6 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
_autoresizesSubviews = [aCoder decodeBoolForKey:CPViewAutoresizesSubviewsKey];
_hitTests = [aCoder decodeObjectForKey:CPViewHitTestsKey];
_isHidden = [aCoder decodeObjectForKey:CPViewIsHiddenKey];
_opacity = [aCoder decodeIntForKey:CPViewOpacityKey];
// DOM SETUP
@@ -2240,8 +2239,13 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
}
[self setNeedsDisplay:YES];
}
_isHidden = NO;
if ([aCoder containsValueForKey:CPViewIsHiddenKey])
[self setHidden:[aCoder decodeBoolForKey:CPViewIsHiddenKey]];
}
return self;
}
@@ -2269,9 +2273,11 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
[aCoder encodeObject:_backgroundColor forKey:CPViewBackgroundColorKey];
[aCoder encodeBool:_hitTests forKey:CPViewHitTestsKey];
[aCoder encodeBool:_isHidden forKey:CPViewIsHiddenKey];
[aCoder encodeFloat:_opacity forKey:CPViewOpacityKey];
if (_isHidden)
[aCoder encodeBool:_isHidden forKey:CPViewIsHiddenKey];
[aCoder encodeConditionalObject:[self nextKeyView] forKey:CPViewNextKeyViewKey];
[aCoder encodeConditionalObject:[self previousKeyView] forKey:CPViewPreviousKeyViewKey];
+5 -5
View File
@@ -180,7 +180,7 @@ CPWebViewScrollNative = 2;
// try to get the document size so we can correctly set the frame
var win = null;
try { win = [self window]; } catch (e) {}
try { win = [self DOMWindow]; } catch (e) {}
if (win && win.document)
{
@@ -290,7 +290,7 @@ CPWebViewScrollNative = 2;
// need to give the browser a chance to reset iframe, otherwise we'll be document.write()-ing the previous document
window.setTimeout(function() {
var win = [self window];
var win = [self DOMWindow];
win.document.write(_html);
@@ -385,14 +385,14 @@ CPWebViewScrollNative = 2;
_iframe.parentNode.removeChild(_iframe);
}
- (Window)window
- (DOMWindow)DOMWindow
{
return (_iframe.contentDocument && _iframe.contentDocument.defaultView) || _iframe.contentWindow;
}
- (CPWebScriptObject)windowScriptObject
{
var win = [self window];
var win = [self DOMWindow];
if (!_wso || win != [_wso window])
{
if (win)
@@ -470,7 +470,7 @@ CPWebViewScrollNative = 2;
{
try
{
[self window].print();
[self DOMWindow].print();
}
catch (e)
{
+9 -10
View File
@@ -446,23 +446,22 @@
return slider;
}
/*
var buttonBar = [[CPButtonBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 30.0)],
+ (CPButtonBar)themedButtonBar
{
var buttonBar = [[CPButtonBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 26.0)],
color = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:
[
[_CPCibCustomResource imageResourceWithName:"buttonbar-bezel.png" size:CGSizeMake(1.0, 30.0)],
[_CPCibCustomResource imageResourceWithName:"buttonbar-bezel.png" size:CGSizeMake(1.0, 30.0)],
[_CPCibCustomResource imageResourceWithName:"buttonbar-bezel-right.png" size:CGSizeMake(13.0, 30.0)]
[_CPCibCustomResource imageResourceWithName:"buttonbar-bezel.png" size:CGSizeMake(1.0, 26.0)],
[_CPCibCustomResource imageResourceWithName:"buttonbar-bezel.png" size:CGSizeMake(1.0, 26.0)],
[_CPCibCustomResource imageResourceWithName:"buttonbar-bezel-right.png" size:CGSizeMake(13.0, 26.0)]
]
isVertical:NO]];
[buttonBar setValue:color forThemeAttribute:@"bezel-color"];
[buttonBar setNeedsLayout];
views.push(buttonBar);
return views;
*/
return buttonBar;
}
@end
function PatternColor(anImage)
+8 -5
View File
@@ -31,14 +31,17 @@
{
var flags = [aCoder decodeIntForKey:"NSsFlags"];
_hasVerticalScroller = Boolean(flags & (1 << 4));
_hasHorizontalScroller = Boolean(flags & (1 << 5));
_autohidesScrollers = Boolean(flags & (1 << 9));
_verticalScroller = [aCoder decodeObjectForKey:"NSVScroller"];
_horizontalScroller = [aCoder decodeObjectForKey:"NSHScroller"];
_contentView = [aCoder decodeObjectForKey:"NSContentView"];
_hasVerticalScroller = !Boolean(flags & (1 << 4));
_hasHorizontalScroller = !Boolean(flags & (1 << 5));
_autohidesScrollers = Boolean(flags & (1 << 9));
[self setHasHorizontalScroller:!_hasHorizontalScroller];
[self setHasVerticalScroller:!_hasVerticalScroller];
//[aCoder decodeBytesForKey:"NSScrollAmts"];
_verticalLineScroll = 10.0;
_verticalPageScroll = 10.0;