Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1cb388827 | ||
|
|
2e1a0da0e4 | ||
|
|
47d0537ae4 | ||
|
|
7de4fe7afa | ||
|
|
fb155dec58 | ||
|
|
90d27133b0 | ||
|
|
0f5d459ed8 | ||
|
|
f4dc08f1f8 | ||
|
|
4bedd52e16 | ||
|
|
391701fdc7 | ||
|
|
a973be2566 | ||
|
|
298fd49c55 | ||
|
|
23adbd4407 | ||
|
|
eba3e95b81 | ||
|
|
8819fd5fd7 | ||
|
|
9c2cb393c2 | ||
|
|
ca4e034a3b | ||
|
|
fd138cfae7 | ||
|
|
e530831b81 | ||
|
|
7c56ea47dd | ||
|
|
adb6404a0f | ||
|
|
084e0a315f | ||
|
|
c2f9b91fe2 | ||
|
|
b629b882b4 | ||
|
|
da91ab9879 | ||
|
|
a70bc7d953 | ||
|
|
7614c18fea | ||
|
|
c37783c895 | ||
|
|
905d23d159 | ||
|
|
7bf46cb40b | ||
|
|
385de88e2f | ||
|
|
c2da96e311 | ||
|
|
8bbb3d30b2 | ||
|
|
1edcc511d6 | ||
|
|
9b22b33616 | ||
|
|
3fd8d3e5be | ||
|
|
ce167cf92d | ||
|
|
3ccaa4de50 | ||
|
|
5cd137b745 | ||
|
|
95246d73c1 | ||
|
|
8ff2a32b47 | ||
|
|
90d52a8bb4 | ||
|
|
a337bc28f9 | ||
|
|
8a5923527f | ||
|
|
59ad8499df | ||
|
|
566cd6c6e8 | ||
|
|
02a885eb09 | ||
|
|
632fba9dd5 | ||
|
|
eb2bb24c19 | ||
|
|
c8a37b4f99 | ||
|
|
117d946ed3 | ||
|
|
d4b0e2a124 | ||
|
|
4acda0c447 | ||
|
|
a7b40a5cdd | ||
|
|
ad5b9b658e | ||
|
|
df28a4696e | ||
|
|
c30a6fb843 | ||
|
|
2e7afc3ca1 | ||
|
|
2f428fa389 | ||
|
|
0a189906cd | ||
|
|
e4a6d8520c | ||
|
|
fe138be7ae | ||
|
|
ff51263671 | ||
|
|
04f650dde7 | ||
|
|
48e797a80d | ||
|
|
bf3a152946 | ||
|
|
7264692a0a | ||
|
|
b5776445ec | ||
|
|
ee1c5478b1 | ||
|
|
63bad1dae0 | ||
|
|
d0fa16b96b | ||
|
|
3dacb4a5ef | ||
|
|
ce80ee1739 | ||
|
|
4e6b9978ce | ||
|
|
31d5ddb20a | ||
|
|
2355b7a38b | ||
|
|
0e68729d7f | ||
|
|
81c2f219ee | ||
|
|
b33763caeb | ||
|
|
5b19c967f4 | ||
|
|
acd98b5c88 | ||
|
|
ff93262873 | ||
|
|
f535a6a242 | ||
|
|
d1c978669b | ||
|
|
b28673d23d | ||
|
|
46848562d0 | ||
|
|
5e53a2326c | ||
|
|
0394731fdf | ||
|
|
a426aec2c9 | ||
|
|
dbad10f060 | ||
|
|
3985ef24e3 | ||
|
|
ff4a79d6cd | ||
|
|
9b017de39c |
@@ -165,6 +165,19 @@ var DefaultLineWidth = 1.0;
|
||||
CGPathAddCurveToPoint(_path, nil, controlPoint1.x, controlPoint1.y, controlPoint2.x, controlPoint2.y, endPoint.x, endPoint.y);
|
||||
}
|
||||
|
||||
- (CGRect)bounds
|
||||
{
|
||||
// TODO: this should return this. The controlPointBounds is not a tight fit.
|
||||
// return CGPathGetPathBoundingBox(_path);
|
||||
|
||||
return [self controlPointBounds];
|
||||
}
|
||||
|
||||
- (CGRect)controlPointBounds
|
||||
{
|
||||
return CGPathGetBoundingBox(_path);
|
||||
}
|
||||
|
||||
/*!
|
||||
Create a line segment between the first and last points in the subpath, closing it.
|
||||
*/
|
||||
@@ -272,6 +285,11 @@ var DefaultLineWidth = 1.0;
|
||||
CGPathAddPath(_path, nil, CGPathWithRoundedRectangleInRect(rect, xRadius, yRadius, YES, YES, YES, YES));
|
||||
}
|
||||
|
||||
- (void)appendBezierPathWithArcFromPoint:(CGPoint)fromPoint toPoint:(CGPoint)toPoint radius:(float)radius
|
||||
{
|
||||
CGPathAddArcToPoint(_path, null, fromPoint.x, fromPoint.y, toPoint.x, toPoint.y, radius);
|
||||
}
|
||||
|
||||
/*!
|
||||
Append the contents of a CPBezierPath object.
|
||||
*/
|
||||
@@ -288,4 +306,21 @@ var DefaultLineWidth = 1.0;
|
||||
_path = CGPathCreateMutable();
|
||||
}
|
||||
|
||||
- (void)addClip
|
||||
{
|
||||
var ctx = [[CPGraphicsContext currentContext] graphicsPort];
|
||||
|
||||
CGContextAddPath(ctx, _path);
|
||||
CGContextClip(ctx);
|
||||
}
|
||||
|
||||
- (void)setClip
|
||||
{
|
||||
var ctx = [[CPGraphicsContext currentContext] graphicsPort];
|
||||
|
||||
CGContextBeginPath(ctx);
|
||||
CGContextAddPath(ctx, _path);
|
||||
CGContextClip(ctx);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -322,6 +322,16 @@ CPBelowBottom = 6;
|
||||
[self _manageTitlePositioning];
|
||||
}
|
||||
|
||||
- (CPFont)titleFont
|
||||
{
|
||||
return [_titleView font];
|
||||
}
|
||||
|
||||
- (void)setTitleFont:(CPFont)aFont
|
||||
{
|
||||
[_titleView setFont:aFont];
|
||||
}
|
||||
|
||||
- (void)_manageTitlePositioning
|
||||
{
|
||||
if (_titlePosition == CPNoTitle)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
@import "CPView.j"
|
||||
@import "CPCollectionViewItem.j"
|
||||
|
||||
@import "CPCompatibility.j"
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@@ -647,9 +647,9 @@
|
||||
|
||||
if (index >= 0 && index < _items.length)
|
||||
{
|
||||
if (_allowsMultipleSelection && ([anEvent modifierFlags] & CPCommandKeyMask || [anEvent modifierFlags] & CPShiftKeyMask))
|
||||
if (_allowsMultipleSelection && ([anEvent modifierFlags] & CPPlatformActionKeyMask || [anEvent modifierFlags] & CPShiftKeyMask))
|
||||
{
|
||||
if ([anEvent modifierFlags] & CPCommandKeyMask)
|
||||
if ([anEvent modifierFlags] & CPPlatformActionKeyMask)
|
||||
{
|
||||
var indexes = [_selectionIndexes copy];
|
||||
|
||||
@@ -690,6 +690,10 @@
|
||||
|
||||
- (void)mouseDragged:(CPEvent)anEvent
|
||||
{
|
||||
// Don't crash if we never registered the intial click.
|
||||
if (!_mouseDownEvent)
|
||||
return;
|
||||
|
||||
var locationInWindow = [anEvent locationInWindow],
|
||||
mouseDownLocationInWindow = [_mouseDownEvent locationInWindow];
|
||||
|
||||
|
||||
@@ -611,6 +611,14 @@ function CPColorWithImages()
|
||||
return [[[self class] alloc] _initWithRGBA:components];
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the receiver. This method is a placeholder that does nothing but may be implemented in the future.
|
||||
*/
|
||||
- (CPColor)colorUsingColorSpaceName:(id)aColorSpaceName
|
||||
{
|
||||
return self;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns an array with the HSB values for this color.
|
||||
The index values are ordered as:
|
||||
|
||||
@@ -74,9 +74,16 @@ CPInputSetFontOutsideOfDOM = 1 << 28;
|
||||
CPInput1PxLeftPadding = 1 << 29;
|
||||
CPInputOnInputEventFeature = 1 << 30;
|
||||
|
||||
// When an absolutely positioned div (CPView) with an absolutely positioned canvas in it (CPView with drawRect:) moves things on top of the canvas
|
||||
// (subviews) don't redraw correctly. E.g. if you have a bunch of text fields in a CPBox in a sheet which animates in, some of the text fields might
|
||||
// not be visible because the CPBox has a canvas at the bottom and the box moved form offscreen to onscreen.
|
||||
// This bug is probably very related: https://bugs.webkit.org/show_bug.cgi?id=67203
|
||||
CPCanvasParentDrawErrorsOnMovementBug = 1 << 0;
|
||||
|
||||
var USER_AGENT = "",
|
||||
PLATFORM_ENGINE = CPUnknownBrowserEngine,
|
||||
PLATFORM_FEATURES = 0;
|
||||
PLATFORM_FEATURES = 0,
|
||||
PLATFORM_BUGS = 0;
|
||||
|
||||
// default these features to true
|
||||
|
||||
@@ -152,6 +159,10 @@ else if (USER_AGENT.indexOf("AppleWebKit/") != -1)
|
||||
|
||||
if (USER_AGENT.indexOf("Chrome") === CPNotFound)
|
||||
PLATFORM_FEATURES |= CPSOPDisabledFromFileURLs;
|
||||
|
||||
// Assume this bug was introduced around Safari 5.1/Chrome 16. This could probably be tighter.
|
||||
if (majorVersion > 533)
|
||||
PLATFORM_BUGS |= CPCanvasParentDrawErrorsOnMovementBug;
|
||||
}
|
||||
|
||||
// KHTML
|
||||
@@ -220,6 +231,11 @@ function CPFeatureIsCompatible(aFeature)
|
||||
return PLATFORM_FEATURES & aFeature;
|
||||
}
|
||||
|
||||
function CPPlatformHasBug(aBug)
|
||||
{
|
||||
return PLATFORM_BUGS & aBug;
|
||||
}
|
||||
|
||||
function CPBrowserIsEngine(anEngine)
|
||||
{
|
||||
return PLATFORM_ENGINE === anEngine;
|
||||
|
||||
@@ -174,6 +174,21 @@ following:
|
||||
return _CPFontSystemFontSize;
|
||||
}
|
||||
|
||||
+ (float)systemFontSizeForControlSize:(CPControlSize)aSize
|
||||
{
|
||||
// TODO These sizes should be themable or made less arbitrary in some other way.
|
||||
switch (aSize)
|
||||
{
|
||||
case CPSmallControlSize:
|
||||
return _CPFontSystemFontSize - 1;
|
||||
case CPMiniControlSize:
|
||||
return _CPFontSystemFontSize - 2;
|
||||
case CPRegularControlSize:
|
||||
default:
|
||||
return _CPFontSystemFontSize;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Sets the default system font size.
|
||||
*/
|
||||
|
||||
@@ -23,6 +23,16 @@
|
||||
@import "CPColor.j"
|
||||
@import "CPGraphicsContext.j"
|
||||
|
||||
CPCalibratedWhiteColorSpace = @"CalibratedWhiteColorSpace";
|
||||
CPCalibratedBlackColorSpace = @"CalibratedBlackColorSpace";
|
||||
CPCalibratedRGBColorSpace = @"CalibratedRGBColorSpace";
|
||||
CPDeviceWhiteColorSpace = @"DeviceWhiteColorSpace";
|
||||
CPDeviceBlackColorSpace = @"DeviceBlackColorSpace";
|
||||
CPDeviceRGBColorSpace = @"DeviceRGBColorSpace";
|
||||
CPDeviceCMYKColorSpace = @"DeviceCMYKColorSpace";
|
||||
CPNamedColorSpace = @"NamedColorSpace";
|
||||
CPPatternColorSpace = @"PatternColorSpace";
|
||||
CPCustomColorSpace = @"CustomColorSpace";
|
||||
|
||||
function CPDrawTiledRects(
|
||||
/* CGRect */ boundsRect,
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
@import "CGContext.j"
|
||||
|
||||
|
||||
var CPGraphicsContextCurrent = nil;
|
||||
var CPGraphicsContextCurrent = nil,
|
||||
CPGraphicsContextThreadStack = nil;
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@@ -52,6 +53,28 @@ var CPGraphicsContextCurrent = nil;
|
||||
CPGraphicsContextCurrent = aGraphicsContext;
|
||||
}
|
||||
|
||||
+ (void)saveGraphicsState
|
||||
{
|
||||
if (!CPGraphicsContextCurrent)
|
||||
return;
|
||||
|
||||
if (!CPGraphicsContextThreadStack)
|
||||
CPGraphicsContextThreadStack = [CPMutableArray array];
|
||||
|
||||
[CPGraphicsContextThreadStack addObject:CPGraphicsContextCurrent];
|
||||
[CPGraphicsContextCurrent saveGraphicsState];
|
||||
}
|
||||
|
||||
+ (void)restoreGraphicsState
|
||||
{
|
||||
var lastContext = [CPGraphicsContextThreadStack lastObject];
|
||||
if (lastContext)
|
||||
{
|
||||
[lastContext restoreGraphicsState];
|
||||
[CPGraphicsContextThreadStack removeLastObject];
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Creates a graphics context with a provided port.
|
||||
@param aContext the context to initialize with
|
||||
@@ -99,4 +122,14 @@ var CPGraphicsContextCurrent = nil;
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)saveGraphicsState
|
||||
{
|
||||
CGContextSaveGState(_graphicsPort);
|
||||
}
|
||||
|
||||
- (void)restoreGraphicsState
|
||||
{
|
||||
CGContextRestoreGState(_graphicsPort);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -976,8 +976,7 @@ var _CPMenuBarVisible = NO,
|
||||
|
||||
for (; index < count; ++index)
|
||||
{
|
||||
var item = _items[index],
|
||||
modifierMask = [item keyEquivalentModifierMask];
|
||||
var item = _items[index];
|
||||
|
||||
if ([anEvent _triggersKeyEquivalent:[item keyEquivalent] withModifierMask:[item keyEquivalentModifierMask]])
|
||||
{
|
||||
|
||||
@@ -376,9 +376,8 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
var previousRowCount = [self numberOfRows];
|
||||
|
||||
itemInfo.isExpanded = YES;
|
||||
// XXX Shouldn't the items reload before the notification is sent?
|
||||
[self _noteItemDidExpand:anItem];
|
||||
[self reloadItem:anItem reloadChildren:YES];
|
||||
[self _noteItemDidExpand:anItem];
|
||||
|
||||
// Shift selection indexes below so that the same items remain selected.
|
||||
var rowCountDelta = [self numberOfRows] - previousRowCount;
|
||||
@@ -469,9 +468,8 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
}
|
||||
itemInfo.isExpanded = NO;
|
||||
|
||||
// XXX Shouldn't the items reload before the notification is sent?
|
||||
[self _noteItemDidCollapse:anItem];
|
||||
[self reloadItem:anItem reloadChildren:YES];
|
||||
[self _noteItemDidCollapse:anItem];
|
||||
|
||||
// Send selection notifications only after the items have loaded so that
|
||||
// the new selection is consistent with the actual rows for any observers.
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
{
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort],
|
||||
bounds = [self bounds],
|
||||
maxX = CGRectGetWidth(bounds) - 2,
|
||||
maxX = CGRectGetWidth(bounds),
|
||||
maxY = CGRectGetHeight(bounds);
|
||||
|
||||
// Draw background
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
// Draw Top Border
|
||||
CGContextBeginPath(context);
|
||||
CGContextMoveToPoint(context, 1, 0);
|
||||
CGContextMoveToPoint(context, 0, 0);
|
||||
CGContextAddLineToPoint(context, maxX, 0);
|
||||
CGContextClosePath(context);
|
||||
CGContextSetStrokeColor(context, [_ruleEditor _sliceTopBorderColor]);
|
||||
@@ -71,8 +71,8 @@
|
||||
|
||||
// Draw Bottom Border
|
||||
CGContextBeginPath(context);
|
||||
CGContextMoveToPoint(context, 1, maxY - 0.5);
|
||||
CGContextAddLineToPoint(context, maxX, maxY - 0.5);
|
||||
CGContextMoveToPoint(context, 0, maxY);
|
||||
CGContextAddLineToPoint(context, maxX, maxY);
|
||||
CGContextClosePath(context);
|
||||
var bottomColor = (_rowIndex == [_ruleEditor _lastRow]) ? [_ruleEditor _sliceLastBottomBorderColor] : [_ruleEditor _sliceBottomBorderColor];
|
||||
CGContextSetStrokeColor(context, bottomColor);
|
||||
@@ -106,4 +106,4 @@
|
||||
return [CPString stringWithFormat:@"<%@ %p index:%d indentation:%d>",[self className],self,[self rowIndex],[self indentation]];
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
|
||||
@@ -121,7 +121,7 @@ var CONTROL_HEIGHT = 16.,
|
||||
return [CPMenuItem separatorItem];
|
||||
}
|
||||
|
||||
- (_CPRuleEditorTextField)_createStaticTextFieldWithStringValue:(CPString )text
|
||||
- (_CPRuleEditorTextField)_createStaticTextFieldWithStringValue:(CPString)text
|
||||
{
|
||||
var textField = [[_CPRuleEditorTextField alloc] initWithFrame:CPMakeRect(0, 0, 200, CONTROL_HEIGHT)],
|
||||
refont = [_ruleEditor font],
|
||||
@@ -352,6 +352,15 @@ var CONTROL_HEIGHT = 16.,
|
||||
optionFrame = _ruleOptionFrames[i];
|
||||
|
||||
optionFrame.origin.y = (rowHeight - CGRectGetHeight(optionFrame)) / 2 - 2;
|
||||
|
||||
// small positioning fix
|
||||
if ([ruleOptionView isKindOfClass:CPTextField])
|
||||
{
|
||||
optionFrame.origin.y += 2;
|
||||
[_ruleOptionViews[i] setValue:CGInsetMake(7, 7, 7, 8) forThemeAttribute:@"content-inset"];
|
||||
}
|
||||
|
||||
|
||||
if (widthChanged)
|
||||
{
|
||||
optionFrame.origin.x = optionViewOriginX;
|
||||
|
||||
@@ -172,10 +172,10 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay,
|
||||
scrollerWidth = [CPScroller scrollerWidth];
|
||||
|
||||
if (hFlag)
|
||||
frameSize.height -= scrollerWidth;
|
||||
frameSize.height += scrollerWidth;
|
||||
|
||||
if (vFlag)
|
||||
frameSize.width -= scrollerWidth;
|
||||
frameSize.width += scrollerWidth;
|
||||
|
||||
return frameSize;
|
||||
}
|
||||
|
||||
@@ -501,7 +501,12 @@ var RECENT_SEARCH_PREFIX = @" ";
|
||||
if (_CGRectContainsPoint([self searchButtonRectForBounds:[self bounds]], point))
|
||||
{
|
||||
if (_searchMenuTemplate == nil)
|
||||
[self _sendAction:self];
|
||||
{
|
||||
if ([_searchButton target] && [_searchButton action])
|
||||
[_searchButton mouseDown:anEvent];
|
||||
else
|
||||
[self _sendAction:self];
|
||||
}
|
||||
else
|
||||
[self _showMenu];
|
||||
}
|
||||
|
||||
@@ -366,11 +366,14 @@ CPSegmentSwitchTrackingMomentary = 2;
|
||||
@param aSegment the segment to enable/disable
|
||||
@throws CPRangeException if \c aSegment is out of bounds
|
||||
*/
|
||||
- (void)setEnabled:(BOOL)isEnabled forSegment:(unsigned)aSegment
|
||||
- (void)setEnabled:(BOOL)shouldBeEnabled forSegment:(unsigned)aSegment
|
||||
{
|
||||
[_segments[aSegment] setEnabled:isEnabled];
|
||||
if ([_segments[aSegment] enabled] === shouldBeEnabled)
|
||||
return;
|
||||
|
||||
if (isEnabled)
|
||||
[_segments[aSegment] setEnabled:shouldBeEnabled];
|
||||
|
||||
if (shouldBeEnabled)
|
||||
_themeStates[aSegment] &= ~CPThemeStateDisabled;
|
||||
else
|
||||
_themeStates[aSegment] |= CPThemeStateDisabled;
|
||||
|
||||
@@ -79,11 +79,11 @@ var CPTabViewDidSelectTabViewItemSelector = 1,
|
||||
{
|
||||
_selectedIndex = CPNotFound;
|
||||
|
||||
_tabs = [[CPSegmentedControl alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
|
||||
_tabs = [[CPSegmentedControl alloc] initWithFrame:_CGRectMake(0, 0, 0, 0)];
|
||||
[_tabs setHitTests:NO];
|
||||
|
||||
var height = [_tabs valueForThemeAttribute:@"default-height"];
|
||||
[_tabs setFrameSize:CGSizeMake(0, height)];
|
||||
[_tabs setFrameSize:_CGSizeMake(0, height)];
|
||||
|
||||
_box = [[CPBox alloc] initWithFrame:[self bounds]];
|
||||
[self setBackgroundColor:[CPColor colorWithCalibratedWhite:0.95 alpha:1.0]];
|
||||
@@ -350,11 +350,11 @@ var CPTabViewDidSelectTabViewItemSelector = 1,
|
||||
else
|
||||
{
|
||||
var aFrame = [self frame],
|
||||
segmentedHeight = CGRectGetHeight([_tabs frame]),
|
||||
segmentedHeight = _CGRectGetHeight([_tabs frame]),
|
||||
origin = _type === CPTopTabsBezelBorder ? segmentedHeight / 2 : 0;
|
||||
|
||||
[_box setFrame:CGRectMake(0, origin, CGRectGetWidth(aFrame),
|
||||
CGRectGetHeight(aFrame) - segmentedHeight / 2)];
|
||||
[_box setFrame:_CGRectMake(0, origin, _CGRectGetWidth(aFrame),
|
||||
_CGRectGetHeight(aFrame) - segmentedHeight / 2)];
|
||||
|
||||
[self addSubview:_tabs];
|
||||
}
|
||||
@@ -439,22 +439,22 @@ var CPTabViewDidSelectTabViewItemSelector = 1,
|
||||
|
||||
- (void)_repositionTabs
|
||||
{
|
||||
var horizontalCenterOfSelf = CGRectGetWidth([self bounds]) / 2,
|
||||
verticalCenterOfTabs = CGRectGetHeight([_tabs bounds]) / 2;
|
||||
var horizontalCenterOfSelf = _CGRectGetWidth([self bounds]) / 2,
|
||||
verticalCenterOfTabs = _CGRectGetHeight([_tabs bounds]) / 2;
|
||||
|
||||
if (_type === CPBottomTabsBezelBorder)
|
||||
[_tabs setCenter:CGPointMake(horizontalCenterOfSelf, CGRectGetHeight([self bounds]) - verticalCenterOfTabs)];
|
||||
[_tabs setCenter:_CGPointMake(horizontalCenterOfSelf, _CGRectGetHeight([self bounds]) - verticalCenterOfTabs)];
|
||||
else
|
||||
[_tabs setCenter:CGPointMake(horizontalCenterOfSelf, verticalCenterOfTabs)];
|
||||
[_tabs setCenter:_CGPointMake(horizontalCenterOfSelf, verticalCenterOfTabs)];
|
||||
}
|
||||
|
||||
- (void)_setSelectedIndex:(CPNumber)index
|
||||
{
|
||||
_selectedIndex = index;
|
||||
[self _setContentViewForItem:[_items objectAtIndex:_selectedIndex]];
|
||||
[self _setContentViewFromItem:[_items objectAtIndex:_selectedIndex]];
|
||||
}
|
||||
|
||||
- (void)_setContentViewForItem:(CPTabViewItem)anItem
|
||||
- (void)_setContentViewFromItem:(CPTabViewItem)anItem
|
||||
{
|
||||
[_box setContentView:[anItem view]];
|
||||
}
|
||||
@@ -471,9 +471,7 @@ var CPTabViewDidSelectTabViewItemSelector = 1,
|
||||
}
|
||||
|
||||
if (_selectedIndex === CPNotFound)
|
||||
{
|
||||
[self selectFirstTabViewItem:self];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -494,7 +494,13 @@ CPTableColumnUserResizingMask = 1 << 1;
|
||||
*/
|
||||
- (CPSortDescriptor)sortDescriptorPrototype
|
||||
{
|
||||
return _sortDescriptorPrototype;
|
||||
if (_sortDescriptorPrototype)
|
||||
return _sortDescriptorPrototype;
|
||||
|
||||
var binderClass = [[self class] _binderClassForBinding:CPValueBinding],
|
||||
binding = [binderClass getBinding:CPValueBinding forObject:self];
|
||||
|
||||
return [binding _defaultSortDescriptorPrototype];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -570,6 +576,30 @@ CPTableColumnUserResizingMask = 1 << 1;
|
||||
[tableView reloadDataForRowIndexes:rowIndexes columnIndexes:columnIndexes];
|
||||
}
|
||||
|
||||
- (CPSortDescriptor)_defaultSortDescriptorPrototype
|
||||
{
|
||||
if (![self createsSortDescriptor])
|
||||
return nil;
|
||||
|
||||
var keyPath = [_info objectForKey:CPObservedKeyPathKey],
|
||||
dotIndex = keyPath.indexOf(".");
|
||||
|
||||
if (dotIndex === CPNotFound)
|
||||
return nil;
|
||||
|
||||
var firstPart = keyPath.substring(0, dotIndex),
|
||||
key = keyPath.substring(dotIndex + 1);
|
||||
|
||||
return [CPSortDescriptor sortDescriptorWithKey:key ascending:YES];
|
||||
}
|
||||
|
||||
- (BOOL)createsSortDescriptor
|
||||
{
|
||||
var options = [_info objectForKey:CPOptionsKey],
|
||||
optionValue = [options objectForKey:CPCreatesSortDescriptorBindingOption];
|
||||
return optionValue === nil ? YES : [optionValue boolValue];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation CPTableColumn (Bindings)
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
|
||||
+ (id)themeAttributes
|
||||
{
|
||||
return [CPDictionary dictionaryWithObjects:[[CPNull null], [CPNull null], CGInsetMakeZero(), [CPNull null], [CPNull null], [CPNull null], CGSizeMakeZero()]
|
||||
forKeys:[@"background-color", @"text-alignment", @"text-inset", @"text-color", @"font", @"text-shadow-color", @"text-shadow-offset"]];
|
||||
return [CPDictionary dictionaryWithObjects:[[CPNull null], CPLeftTextAlignment, CPLineBreakByTruncatingTail, CGInsetMakeZero(), [CPNull null], [CPNull null], [CPNull null], CGSizeMakeZero()]
|
||||
forKeys:[@"background-color", @"text-alignment", @"line-break-mode", @"text-inset", @"text-color", @"font", @"text-shadow-color", @"text-shadow-offset"]];
|
||||
}
|
||||
|
||||
- (void)initWithFrame:(CGRect)frame
|
||||
@@ -78,6 +78,7 @@
|
||||
[_textField setTextShadowColor:[self currentValueForThemeAttribute:@"text-shadow-color"]];
|
||||
[_textField setTextShadowOffset:[self currentValueForThemeAttribute:@"text-shadow-offset"]];
|
||||
[_textField setAlignment:[self currentValueForThemeAttribute:@"text-alignment"]];
|
||||
[_textField setLineBreakMode:[self currentValueForThemeAttribute:@"line-break-mode"]];
|
||||
}
|
||||
|
||||
- (void)setStringValue:(CPString)string
|
||||
@@ -102,7 +103,52 @@
|
||||
|
||||
- (void)setFont:(CPFont)aFont
|
||||
{
|
||||
[self setValue:aFont forThemeAttribute:"font"];
|
||||
[self setValue:aFont forThemeAttribute:@"font"];
|
||||
}
|
||||
|
||||
- (CPFont)font
|
||||
{
|
||||
return [self currentValueForThemeAttribute:@"font"]
|
||||
}
|
||||
|
||||
- (void)setAlignment:(CPTextAlignment)alignment
|
||||
{
|
||||
[self setValue:alignment forThemeAttribute:@"text-alignment"];
|
||||
}
|
||||
|
||||
- (CPTextAlignment)alignment
|
||||
{
|
||||
return [self currentValueForThemeAttribute:@"text-alignment"]
|
||||
}
|
||||
|
||||
- (void)setLineBreakMode:(CPLineBreakMode)mode
|
||||
{
|
||||
[self setValue:mode forThemeAttribute:@"line-break-mode"];
|
||||
}
|
||||
|
||||
- (CPLineBreakMode)lineBreakMode
|
||||
{
|
||||
return [self currentValueForThemeAttribute:@"line-break-mode"]
|
||||
}
|
||||
|
||||
- (void)setTextColor:(CPColor)aColor
|
||||
{
|
||||
[self setValue:aColor forThemeAttribute:@"text-color"];
|
||||
}
|
||||
|
||||
- (CPColor)textColor
|
||||
{
|
||||
return [self currentValueForThemeAttribute:@"text-color"]
|
||||
}
|
||||
|
||||
- (void)setTextShadowColor:(CPColor)aColor
|
||||
{
|
||||
[self setValue:aColor forThemeAttribute:@"text-shadow-color"];
|
||||
}
|
||||
|
||||
- (CPColor)textShadowColor
|
||||
{
|
||||
return [self currentValueForThemeAttribute:@"text-shadow-color"]
|
||||
}
|
||||
|
||||
- (void)_setIndicatorImage:(CPImage)anImage
|
||||
@@ -122,6 +168,10 @@
|
||||
|
||||
var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringValueKey",
|
||||
_CPTableColumnHeaderViewFontKey = @"_CPTableColumnHeaderViewFontKey",
|
||||
_CPTableColumnHeaderViewTextColorKey = @"_CPTableColumnHeaderViewTextColorKey",
|
||||
_CPTableColumnHeaderViewTextShadowColorKey = @"_CPTableColumnHeaderViewTextShadowColorKey",
|
||||
_CPTableColumnHeaderViewAlignmentKey = @"_CPTableColumnHeaderViewAlignmentKey",
|
||||
_CPTableColumnHeaderViewLineBreakModeKey = @"_CPTableColumnHeaderViewLineBreakModeKey",
|
||||
_CPTableColumnHeaderViewImageKey = @"_CPTableColumnHeaderViewImageKey";
|
||||
|
||||
@implementation _CPTableColumnHeaderView (CPCoding)
|
||||
@@ -134,6 +184,10 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
[self _setIndicatorImage:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewImageKey]];
|
||||
[self setStringValue:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewStringValueKey]];
|
||||
[self setFont:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewFontKey]];
|
||||
[self setTextColor:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewTextColorKey]];
|
||||
[self setTextShadowColor:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewTextShadowColorKey]];
|
||||
[self setAlignment:[aCoder decodeIntForKey:_CPTableColumnHeaderViewAlignmentKey]];
|
||||
[self setLineBreakMode:[aCoder decodeIntForKey:_CPTableColumnHeaderViewLineBreakModeKey]];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -145,7 +199,11 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
|
||||
[aCoder encodeObject:[_textField text] forKey:_CPTableColumnHeaderViewStringValueKey];
|
||||
[aCoder encodeObject:[_textField image] forKey:_CPTableColumnHeaderViewImageKey];
|
||||
[aCoder encodeObject:[_textField font] forKey:_CPTableColumnHeaderViewFontKey];
|
||||
[aCoder encodeObject:[self font] forKey:_CPTableColumnHeaderViewFontKey];
|
||||
[aCoder encodeObject:[self textColor] forKey:_CPTableColumnHeaderViewTextColorKey];
|
||||
[aCoder encodeObject:[self textShadowColor] forKey:_CPTableColumnHeaderViewTextShadowColorKey];
|
||||
[aCoder encodeInt:[self alignment] forKey:_CPTableColumnHeaderViewAlignmentKey];
|
||||
[aCoder encodeInt:[self lineBreakMode] forKey:_CPTableColumnHeaderViewLineBreakModeKey];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
@import "CPTableColumn.j"
|
||||
@import "_CPCornerView.j"
|
||||
@import "CPScroller.j"
|
||||
@import "CPCompatibility.j"
|
||||
|
||||
|
||||
CPTableViewColumnDidMoveNotification = @"CPTableViewColumnDidMoveNotification";
|
||||
@@ -221,6 +222,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
|
||||
SEL _doubleAction;
|
||||
CPInteger _clickedRow;
|
||||
CPInteger _clickedColumn;
|
||||
unsigned _columnAutoResizingStyle;
|
||||
|
||||
int _lastTrackedRowIndex;
|
||||
@@ -323,7 +325,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
*/
|
||||
- (void)_init
|
||||
{
|
||||
_lastSelectedRow = -1;
|
||||
_lastSelectedRow = _clickedColumn = _clickedRow = -1;
|
||||
|
||||
_selectedColumnIndexes = [CPIndexSet indexSet];
|
||||
_selectedRowIndexes = [CPIndexSet indexSet];
|
||||
@@ -541,8 +543,12 @@ NOT YET IMPLEMENTED
|
||||
}
|
||||
|
||||
/*
|
||||
* - clickedColumn
|
||||
Returns the index of the the column the user clicked to trigger an action, or -1 if no column was clicked.
|
||||
*/
|
||||
- (CPInteger)clickedColumn
|
||||
{
|
||||
return _clickedColumn;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the index of the the row the user clicked to trigger an action, or -1 if no row was clicked.
|
||||
@@ -2644,7 +2650,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
if (_allowsColumnSelection)
|
||||
{
|
||||
[self _noteSelectionIsChanging];
|
||||
if (modifierFlags & CPCommandKeyMask)
|
||||
if (modifierFlags & CPPlatformActionKeyMask)
|
||||
{
|
||||
if ([self isColumnSelected:clickedColumn])
|
||||
[self deselectColumn:clickedColumn];
|
||||
@@ -2881,13 +2887,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
row = [_exposedRows indexGreaterThanIndex:row];
|
||||
}
|
||||
|
||||
// Add the column header view
|
||||
var headerFrame = [headerView frame];
|
||||
headerFrame.origin = _CGPointMakeZero();
|
||||
|
||||
var columnHeaderView = [[_CPTableColumnHeaderView alloc] initWithFrame:headerFrame];
|
||||
[columnHeaderView setStringValue:[headerView stringValue]];
|
||||
[columnHeaderView setThemeState:[headerView themeState]];
|
||||
// Add a copy of the header view.
|
||||
var columnHeaderView = [CPKeyedUnarchiver unarchiveObjectWithData:[CPKeyedArchiver archivedDataWithRootObject:headerView]];
|
||||
[dragView addSubview:columnHeaderView];
|
||||
|
||||
[dragView setBackgroundColor:[CPColor whiteColor]];
|
||||
@@ -3380,12 +3381,15 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
rowIndex = 0,
|
||||
rowsCount = rowArray.length;
|
||||
|
||||
for (; rowIndex < rowsCount; ++rowIndex)
|
||||
if (dataViewsForTableColumn)
|
||||
{
|
||||
var row = rowArray[rowIndex],
|
||||
dataView = dataViewsForTableColumn[row];
|
||||
for (; rowIndex < rowsCount; ++rowIndex)
|
||||
{
|
||||
var row = rowArray[rowIndex],
|
||||
dataView = dataViewsForTableColumn[row];
|
||||
|
||||
[dataView setFrame:[self frameOfDataViewAtColumn:column row:row]];
|
||||
[dataView setFrame:[self frameOfDataViewAtColumn:column row:row]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4192,7 +4196,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
_isSelectingSession = NO;
|
||||
|
||||
var CLICK_TIME_DELTA = 1000,
|
||||
columnIndex,
|
||||
columnIndex = -1,
|
||||
column,
|
||||
rowIndex,
|
||||
shouldEdit = YES;
|
||||
@@ -4200,6 +4204,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_)
|
||||
{
|
||||
rowIndex = [self rowAtPoint:aPoint];
|
||||
|
||||
if (rowIndex !== -1)
|
||||
{
|
||||
if ([_draggedRowIndexes count] > 0)
|
||||
@@ -4221,12 +4226,15 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
|| [self infoForBinding:@"content"]))
|
||||
{
|
||||
columnIndex = [self columnAtPoint:lastPoint];
|
||||
|
||||
if (columnIndex !== -1)
|
||||
{
|
||||
column = _tableColumns[columnIndex];
|
||||
|
||||
if ([column isEditable])
|
||||
{
|
||||
rowIndex = [self rowAtPoint:aPoint];
|
||||
|
||||
if (rowIndex !== -1)
|
||||
{
|
||||
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldEditTableColumn_row_)
|
||||
@@ -4246,6 +4254,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
if ([[CPApp currentEvent] clickCount] === 2 && _doubleAction)
|
||||
{
|
||||
_clickedRow = [self rowAtPoint:aPoint];
|
||||
_clickedColumn = [self columnAtPoint:lastPoint];
|
||||
[self sendAction:_doubleAction to:_target];
|
||||
}
|
||||
}
|
||||
@@ -4785,10 +4794,15 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
_contentBindingExpicitelySet = NO;
|
||||
}
|
||||
|
||||
if ([[self infoForBinding:@"selectionIndexes"] objectForKey:CPObservedObjectKey] !== destination)
|
||||
[self bind:@"selectionIndexes" toObject:destination withKeyPath:@"selectionIndexes" options:nil];
|
||||
// If the content binding was set manually assume the user is taking manual control of establishing bindings.
|
||||
if (!_contentBindingExpicitelySet)
|
||||
{
|
||||
if ([[self infoForBinding:@"selectionIndexes"] objectForKey:CPObservedObjectKey] !== destination)
|
||||
[self bind:@"selectionIndexes" toObject:destination withKeyPath:@"selectionIndexes" options:nil];
|
||||
|
||||
//[self bind:@"sortDescriptors" toObject:destination withKeyPath:@"sortDescriptors" options:nil];
|
||||
if ([[self infoForBinding:@"sortDescriptors"] objectForKey:CPObservedObjectKey] !== destination)
|
||||
[self bind:@"sortDescriptors" toObject:destination withKeyPath:@"sortDescriptors" options:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)bind:(CPString)aBinding toObject:(id)anObject withKeyPath:(CPString)aKeyPath options:(CPDictionary)options
|
||||
|
||||
@@ -1076,15 +1076,8 @@ var CPScrollDestinationNone = 0,
|
||||
if (isEditing && _selectedRange.length)
|
||||
{
|
||||
_inputFrame = nil;
|
||||
var inputElement = [self _inputElement];
|
||||
inputElement.style.display = "none";
|
||||
}
|
||||
else if (isEditing)
|
||||
{
|
||||
var inputElement = [self _inputElement];
|
||||
inputElement.style.display = "block";
|
||||
if (document.activeElement !== inputElement)
|
||||
inputElement.focus();
|
||||
[self _inputElement].style.left = "-10000px";
|
||||
[self _inputElement].focus();
|
||||
}
|
||||
|
||||
// Trim off any excess height downwards (in case we shrank).
|
||||
|
||||
@@ -1174,6 +1174,10 @@ var LABEL_MARGIN = 2.0;
|
||||
|
||||
- (void)setEnabled:(BOOL)shouldBeEnabled
|
||||
{
|
||||
// Tiling is very expensive so try to avoid it. The CPToolbarItem should already be careful to not notifying about its enabled state needlessly.
|
||||
if ([self isEnabled] === shouldBeEnabled)
|
||||
return;
|
||||
|
||||
[super setEnabled:shouldBeEnabled];
|
||||
|
||||
if (shouldBeEnabled)
|
||||
|
||||
@@ -275,6 +275,9 @@ CPToolbarPrintItemIdentifier = @"CPToolbarPrintItem";
|
||||
*/
|
||||
- (void)setEnabled:(BOOL)shouldBeEnabled
|
||||
{
|
||||
if (_isEnabled === shouldBeEnabled)
|
||||
return;
|
||||
|
||||
if ([_view respondsToSelector:@selector(setEnabled:)])
|
||||
[_view setEnabled:shouldBeEnabled];
|
||||
|
||||
@@ -457,26 +460,49 @@ CPToolbarItemVisibilityPriorityUser
|
||||
if (_view)
|
||||
{
|
||||
if ([target respondsToSelector:@selector(validateToolbarItem:)])
|
||||
[self setEnabled:[target validateToolbarItem:self]];
|
||||
{
|
||||
var shouldBeEnabled = [target validateToolbarItem:self];
|
||||
if (_isEnabled !== shouldBeEnabled)
|
||||
[self setEnabled:shouldBeEnabled];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!action)
|
||||
return [self setEnabled:NO];
|
||||
{
|
||||
if (_isEnabled)
|
||||
return [self setEnabled:NO];
|
||||
return;
|
||||
}
|
||||
|
||||
if (target && ![target respondsToSelector:action])
|
||||
return [self setEnabled:NO];
|
||||
{
|
||||
if (_isEnabled)
|
||||
return [self setEnabled:NO];
|
||||
return;
|
||||
}
|
||||
|
||||
target = [CPApp targetForAction:action to:target from:self];
|
||||
|
||||
if (!target)
|
||||
return [self setEnabled:NO];
|
||||
{
|
||||
if (_isEnabled)
|
||||
return [self setEnabled:NO];
|
||||
return;
|
||||
}
|
||||
|
||||
if ([target respondsToSelector:@selector(validateToolbarItem:)])
|
||||
[self setEnabled:[target validateToolbarItem:self]];
|
||||
{
|
||||
var shouldBeEnabled = [target validateToolbarItem:self];
|
||||
if (_isEnabled !== shouldBeEnabled)
|
||||
[self setEnabled:shouldBeEnabled];
|
||||
}
|
||||
else
|
||||
[self setEnabled:YES];
|
||||
{
|
||||
if (!_isEnabled)
|
||||
[self setEnabled:YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)autovalidates
|
||||
|
||||
@@ -98,9 +98,6 @@ var CPViewFlags = { },
|
||||
CPViewHasCustomDrawRect = 1 << 0,
|
||||
CPViewHasCustomLayoutSubviews = 1 << 1;
|
||||
|
||||
var CPCurrentToolTip,
|
||||
CPCurrentToolTipTimer,
|
||||
CPToolTipDelay = 1.0;
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@@ -246,8 +243,8 @@ var CPCurrentToolTip,
|
||||
- (void)_setupToolTipHandlers
|
||||
{
|
||||
_toolTipInstalled = NO;
|
||||
_toolTipFunctionIn = function(e) { [self _fireToolTip]; }
|
||||
_toolTipFunctionOut = function(e) { [self _invalidateToolTip]; };
|
||||
_toolTipFunctionIn = function(e) { [_CPToolTip scheduleToolTipForView:self]; }
|
||||
_toolTipFunctionOut = function(e) { [_CPToolTip invalidateCurrentToolTipIfNeeded]; };
|
||||
}
|
||||
|
||||
+ (CPSet)keyPathsForValuesAffectingFrame
|
||||
@@ -336,6 +333,9 @@ var CPCurrentToolTip,
|
||||
if (_toolTip == aToolTip)
|
||||
return;
|
||||
|
||||
if (aToolTip && ![aToolTip isKindOfClass:CPString])
|
||||
aToolTip = [aToolTip description];
|
||||
|
||||
_toolTip = aToolTip;
|
||||
|
||||
if (_toolTip)
|
||||
@@ -398,54 +398,6 @@ var CPCurrentToolTip,
|
||||
_toolTipInstalled = NO;
|
||||
}
|
||||
|
||||
/*! @ignore
|
||||
Starts the tooltip timer.
|
||||
*/
|
||||
- (void)_fireToolTip
|
||||
{
|
||||
if (CPCurrentToolTipTimer)
|
||||
{
|
||||
[CPCurrentToolTipTimer invalidate];
|
||||
|
||||
if (CPCurrentToolTip)
|
||||
[CPCurrentToolTip close];
|
||||
|
||||
CPCurrentToolTip = nil;
|
||||
}
|
||||
|
||||
if (_toolTip)
|
||||
CPCurrentToolTipTimer = [CPTimer scheduledTimerWithTimeInterval:CPToolTipDelay target:self selector:@selector(_showToolTip:) userInfo:nil repeats:NO];
|
||||
}
|
||||
|
||||
/*! @ignore
|
||||
Stop the tooltip timer if any
|
||||
*/
|
||||
- (void)_invalidateToolTip
|
||||
{
|
||||
if (CPCurrentToolTipTimer)
|
||||
{
|
||||
[CPCurrentToolTipTimer invalidate];
|
||||
CPCurrentToolTipTimer = nil;
|
||||
}
|
||||
|
||||
if (CPCurrentToolTip)
|
||||
{
|
||||
[CPCurrentToolTip close];
|
||||
CPCurrentToolTip = nil;
|
||||
}
|
||||
}
|
||||
|
||||
/*! @ignore
|
||||
Actually shows the tooltip if any
|
||||
*/
|
||||
- (void)_showToolTip:(CPTimer)aTimer
|
||||
{
|
||||
if (CPCurrentToolTip)
|
||||
[CPCurrentToolTip close];
|
||||
|
||||
CPCurrentToolTip = [_CPToolTip toolTipWithString:_toolTip];
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the container view of the receiver
|
||||
@return the receiver's containing view
|
||||
@@ -614,7 +566,7 @@ var CPCurrentToolTip,
|
||||
*/
|
||||
- (void)replaceSubview:(CPView)aSubview with:(CPView)aView
|
||||
{
|
||||
if (aSubview._superview != self)
|
||||
if (aSubview._superview !== self)
|
||||
return;
|
||||
|
||||
var index = [_subviews indexOfObjectIdenticalTo:aSubview];
|
||||
@@ -987,32 +939,90 @@ var CPCurrentToolTip,
|
||||
}
|
||||
else
|
||||
{
|
||||
var images = [[_backgroundColor patternImage] imageSlices];
|
||||
var images = [[_backgroundColor patternImage] imageSlices],
|
||||
partIndex = 0;
|
||||
|
||||
if (_backgroundType === BackgroundVerticalThreePartImage)
|
||||
{
|
||||
var top = _DOMImageSizes[0] ? _DOMImageSizes[0].height : 0,
|
||||
bottom = _DOMImageSizes[2] ? _DOMImageSizes[2].height : 0;
|
||||
|
||||
// Make sure to repeat the top and bottom pieces horizontally if they're not the exact width needed.
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[0], size.width, _DOMImageSizes[0].height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[1], size.width, size.height - _DOMImageSizes[0].height - _DOMImageSizes[2].height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[2], size.width, _DOMImageSizes[2].height);
|
||||
if (top)
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], size.width, top);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[1])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], size.width, size.height - top - bottom);
|
||||
partIndex++;
|
||||
}
|
||||
if (bottom)
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], size.width, bottom);
|
||||
}
|
||||
}
|
||||
else if (_backgroundType === BackgroundHorizontalThreePartImage)
|
||||
{
|
||||
var left = _DOMImageSizes[0] ? _DOMImageSizes[0].width : 0,
|
||||
right = _DOMImageSizes[2] ? _DOMImageSizes[2].width : 0;
|
||||
|
||||
// Make sure to repeat the left and right pieces vertically if they're not the exact height needed.
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[0], _DOMImageSizes[0].width, size.height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[1], size.width - _DOMImageSizes[0].width - _DOMImageSizes[2].width, size.height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[2], _DOMImageSizes[2].width, size.height);
|
||||
if (left)
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], left, size.height);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[1])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], size.width - left - right, size.height);
|
||||
partIndex++;
|
||||
}
|
||||
if (right)
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], right, size.height);
|
||||
}
|
||||
}
|
||||
else if (_backgroundType === BackgroundNinePartImage)
|
||||
{
|
||||
var width = size.width - _DOMImageSizes[0].width - _DOMImageSizes[2].width,
|
||||
height = size.height - _DOMImageSizes[0].height - _DOMImageSizes[6].height;
|
||||
var left = _DOMImageSizes[0] ? _DOMImageSizes[0].width : 0,
|
||||
right = _DOMImageSizes[2] ? _DOMImageSizes[2].width : 0,
|
||||
top = _DOMImageSizes[0] ? _DOMImageSizes[0].height : 0,
|
||||
bottom = _DOMImageSizes[6] ? _DOMImageSizes[6].height : 0,
|
||||
width = size.width - left - right,
|
||||
height = size.height - top - bottom;
|
||||
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[1], width, _DOMImageSizes[0].height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[3], _DOMImageSizes[3].width, height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[4], width, height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[5], _DOMImageSizes[5].width, height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[7], width, _DOMImageSizes[7].height);
|
||||
if (_DOMImageSizes[0])
|
||||
partIndex++;
|
||||
if (_DOMImageSizes[1])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], width, top);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[2])
|
||||
partIndex++;
|
||||
if (_DOMImageSizes[3])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], _DOMImageSizes[3].width, height);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[4])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], width, height);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[5])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], _DOMImageSizes[5].width, height);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[6])
|
||||
partIndex++;
|
||||
if (_DOMImageSizes[7])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], width, _DOMImageSizes[7].height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1508,7 +1518,7 @@ var CPCurrentToolTip,
|
||||
*/
|
||||
- (CPView)hitTest:(CPPoint)aPoint
|
||||
{
|
||||
if (_isHidden || !_hitTests || !CPRectContainsPoint(_frame, aPoint))
|
||||
if (_isHidden || !_hitTests || !_CGRectContainsPoint(_frame, aPoint))
|
||||
return nil;
|
||||
|
||||
var view = nil,
|
||||
@@ -1584,17 +1594,18 @@ var CPCurrentToolTip,
|
||||
colorHasAlpha = colorExists && [_backgroundColor alphaComponent] < 1.0,
|
||||
supportsRGBA = CPFeatureIsCompatible(CPCSSRGBAFeature),
|
||||
colorNeedsDOMElement = colorHasAlpha && !supportsRGBA,
|
||||
amount = 0;
|
||||
amount = 0,
|
||||
slices;
|
||||
|
||||
if ([patternImage isThreePartImage])
|
||||
{
|
||||
_backgroundType = [patternImage isVertical] ? BackgroundVerticalThreePartImage : BackgroundHorizontalThreePartImage;
|
||||
amount = 3 - _DOMImageParts.length;
|
||||
amount = 3;
|
||||
}
|
||||
else if ([patternImage isNinePartImage])
|
||||
{
|
||||
_backgroundType = BackgroundNinePartImage;
|
||||
amount = 9 - _DOMImageParts.length;
|
||||
amount = 9;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1602,6 +1613,34 @@ var CPCurrentToolTip,
|
||||
amount = (colorNeedsDOMElement ? 1 : 0) - _DOMImageParts.length;
|
||||
}
|
||||
|
||||
// Prepare multipart image data and reduce number of required DOM parts by number of empty slices in the multipart image to save needless DOM elements.
|
||||
if (_backgroundType === BackgroundVerticalThreePartImage || _backgroundType === BackgroundHorizontalThreePartImage || _backgroundType === BackgroundNinePartImage)
|
||||
{
|
||||
slices = [patternImage imageSlices];
|
||||
|
||||
// We won't need more divs than there are slices.
|
||||
amount = MIN(amount, slices.length);
|
||||
|
||||
for (var i = 0, count = slices.length; i < count; i++)
|
||||
{
|
||||
var image = slices[i],
|
||||
size = [image size];
|
||||
|
||||
if (!size || (size.width == 0 && size.height == 0))
|
||||
size = nil;
|
||||
|
||||
_DOMImageSizes[i] = size;
|
||||
|
||||
// If there's a nil slice or a slice with no size, it won't need a div.
|
||||
if (!size)
|
||||
amount--;
|
||||
}
|
||||
|
||||
// Now that we know how many divs we really need, compare that to number we actually have.
|
||||
amount -= _DOMImageParts.length;
|
||||
}
|
||||
|
||||
// Make sure the number of divs we have match our needs.
|
||||
if (amount > 0)
|
||||
{
|
||||
while (amount--)
|
||||
@@ -1643,70 +1682,148 @@ var CPCurrentToolTip,
|
||||
}
|
||||
else
|
||||
{
|
||||
var slices = [patternImage imageSlices],
|
||||
count = MIN(_DOMImageParts.length, slices.length),
|
||||
frameSize = _frame.size;
|
||||
var frameSize = _frame.size,
|
||||
partIndex = 0;
|
||||
|
||||
while (count--)
|
||||
for (var i = 0; i < slices.length; i++)
|
||||
{
|
||||
var image = slices[count],
|
||||
size = _DOMImageSizes[count] = image ? [image size] : _CGSizeMakeZero();
|
||||
var size = _DOMImageSizes[i];
|
||||
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[count], size.width, size.height);
|
||||
if (!size)
|
||||
continue;
|
||||
|
||||
_DOMImageParts[count].style.background = image ? "url(\"" + [image filename] + "\")" : "";
|
||||
var image = slices[i];
|
||||
|
||||
// // If image was nil, size should have been nil too.
|
||||
// assert(image != nil);
|
||||
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], size.width, size.height);
|
||||
|
||||
_DOMImageParts[partIndex].style.background = "url(\"" + [image filename] + "\")";
|
||||
|
||||
if (!supportsRGBA)
|
||||
{
|
||||
if (CPFeatureIsCompatible(CPOpacityRequiresFilterFeature))
|
||||
try { _DOMImageParts[count].style.removeAttribute("filter") } catch (anException) { }
|
||||
try { _DOMImageParts[partIndex].style.removeAttribute("filter") } catch (anException) { }
|
||||
else
|
||||
_DOMImageParts[count].style.opacity = 1.0;
|
||||
_DOMImageParts[partIndex].style.opacity = 1.0;
|
||||
}
|
||||
|
||||
partIndex++;
|
||||
}
|
||||
|
||||
if (_backgroundType == BackgroundNinePartImage)
|
||||
{
|
||||
var width = frameSize.width - _DOMImageSizes[0].width - _DOMImageSizes[2].width,
|
||||
height = frameSize.height - _DOMImageSizes[0].height - _DOMImageSizes[6].height;
|
||||
var left = _DOMImageSizes[0] ? _DOMImageSizes[0].width : 0,
|
||||
right = _DOMImageSizes[2] ? _DOMImageSizes[2].width : 0,
|
||||
top = _DOMImageSizes[0] ? _DOMImageSizes[0].height : 0,
|
||||
bottom = _DOMImageSizes[6] ? _DOMImageSizes[6].height : 0,
|
||||
width = frameSize.width - left - right,
|
||||
height = frameSize.height - top - bottom;
|
||||
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[1], width, _DOMImageSizes[0].height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[3], _DOMImageSizes[3].width, height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[4], width, height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[5], _DOMImageSizes[5].width, height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[7], width, _DOMImageSizes[7].height);
|
||||
partIndex = 0;
|
||||
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[0], NULL, 0.0, 0.0);
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[1], NULL, _DOMImageSizes[0].width, 0.0);
|
||||
CPDOMDisplayServerSetStyleRightTop(_DOMImageParts[2], NULL, 0.0, 0.0);
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[3], NULL, 0.0, _DOMImageSizes[1].height);
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[4], NULL, _DOMImageSizes[0].width, _DOMImageSizes[0].height);
|
||||
CPDOMDisplayServerSetStyleRightTop(_DOMImageParts[5], NULL, 0.0, _DOMImageSizes[1].height);
|
||||
CPDOMDisplayServerSetStyleLeftBottom(_DOMImageParts[6], NULL, 0.0, 0.0);
|
||||
CPDOMDisplayServerSetStyleLeftBottom(_DOMImageParts[7], NULL, _DOMImageSizes[6].width, 0.0);
|
||||
CPDOMDisplayServerSetStyleRightBottom(_DOMImageParts[8], NULL, 0.0, 0.0);
|
||||
if (_DOMImageSizes[0])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[1])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, left, 0.0);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], width, _DOMImageSizes[1].height);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[2])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleRightTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[3])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, top);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], _DOMImageSizes[3].width, height);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[4])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, left, top);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], width, height);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[5])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleRightTop(_DOMImageParts[partIndex], NULL, 0.0, top);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], _DOMImageSizes[5].width, height);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[6])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftBottom(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[7])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftBottom(_DOMImageParts[partIndex], NULL, left, 0.0);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], width, _DOMImageSizes[7].height);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[8])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleRightBottom(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
|
||||
}
|
||||
}
|
||||
else if (_backgroundType == BackgroundVerticalThreePartImage)
|
||||
{
|
||||
// Make sure to repeat the top and bottom pieces horizontally if they're not the exact width needed.
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[0], frameSize.width, _DOMImageSizes[0].height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[1], frameSize.width, frameSize.height - _DOMImageSizes[0].height - _DOMImageSizes[2].height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[2], frameSize.width, _DOMImageSizes[2].height);
|
||||
var top = _DOMImageSizes[0] ? _DOMImageSizes[0].height : 0,
|
||||
bottom = _DOMImageSizes[2] ? _DOMImageSizes[2].height : 0;
|
||||
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[0], NULL, 0.0, 0.0);
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[1], NULL, 0.0, _DOMImageSizes[0].height);
|
||||
CPDOMDisplayServerSetStyleLeftBottom(_DOMImageParts[2], NULL, 0.0, 0.0);
|
||||
partIndex = 0;
|
||||
|
||||
// Make sure to repeat the top and bottom pieces horizontally if they're not the exact width needed.
|
||||
if (top)
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width, top);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[1])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, top);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width, frameSize.height - top - bottom);
|
||||
partIndex++;
|
||||
}
|
||||
if (bottom)
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftBottom(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width, bottom);
|
||||
}
|
||||
}
|
||||
else if (_backgroundType == BackgroundHorizontalThreePartImage)
|
||||
{
|
||||
// Make sure to repeat the left and right pieces vertically if they're not the exact height needed.
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[0], _DOMImageSizes[0].width, frameSize.height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[1], frameSize.width - _DOMImageSizes[0].width - _DOMImageSizes[2].width, frameSize.height);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[2], _DOMImageSizes[2].width, frameSize.height);
|
||||
var left = _DOMImageSizes[0] ? _DOMImageSizes[0].width : 0,
|
||||
right = _DOMImageSizes[2] ? _DOMImageSizes[2].width : 0;
|
||||
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[0], NULL, 0.0, 0.0);
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[1], NULL, _DOMImageSizes[0].width, 0.0);
|
||||
CPDOMDisplayServerSetStyleRightTop(_DOMImageParts[2], NULL, 0.0, 0.0);
|
||||
partIndex = 0;
|
||||
|
||||
// Make sure to repeat the left and right pieces vertically if they're not the exact height needed.
|
||||
if (left)
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], left, frameSize.height);
|
||||
partIndex++;
|
||||
}
|
||||
if (_DOMImageSizes[1])
|
||||
{
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, left, 0.0);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width - left - right, frameSize.height);
|
||||
partIndex++;
|
||||
}
|
||||
if (right)
|
||||
{
|
||||
CPDOMDisplayServerSetStyleRightTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
|
||||
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], right, frameSize.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -2092,6 +2209,11 @@ setBoundsOrigin:
|
||||
_DOMContentsElement.style.height = ROUND(_CGRectGetHeight(_frame)) + "px";
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
// The performance implications of this aren't clear, but without this subviews might not be redrawn when this
|
||||
// view moves.
|
||||
if (CPPlatformHasBug(CPCanvasParentDrawErrorsOnMovementBug))
|
||||
_DOMElement.style.webkitTransform = 'translateX(0)';
|
||||
|
||||
CPDOMDisplayServerAppendChild(_DOMElement, _DOMContentsElement);
|
||||
#endif
|
||||
_graphicsContext = [CPGraphicsContext graphicsContextWithGraphicsPort:graphicsPort flipped:YES];
|
||||
@@ -2902,6 +3024,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
|
||||
|
||||
[self _setupToolTipHandlers];
|
||||
_toolTip = [aCoder decodeObjectForKey:CPViewToolTipKey];
|
||||
|
||||
if (_toolTip)
|
||||
[self _installToolTipEventHandlers];
|
||||
|
||||
@@ -3138,5 +3261,3 @@ var _CPViewGetTransform = function(/*CPView*/ fromView, /*CPView */ toView)
|
||||
|
||||
return transform;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1032,6 +1032,11 @@ CPWebViewAppKitScrollMaxPollCount = 3;
|
||||
var documentURL = [CPURL URLWithString:window.location.href];
|
||||
if ([documentURL isFileURL] && CPFeatureIsCompatible(CPSOPDisabledFromFileURLs))
|
||||
return YES;
|
||||
|
||||
// Relative URLs always pass the SOP.
|
||||
if (![self scheme] && ![self host] && ![self port])
|
||||
return YES;
|
||||
|
||||
return ([documentURL scheme] == [self scheme] && [documentURL host] == [self host] && [documentURL port] == [self port]);
|
||||
}
|
||||
|
||||
|
||||
@@ -287,6 +287,9 @@ var CPWindowActionMessageKeys = [
|
||||
unsigned _shadowStyle;
|
||||
BOOL _showsResizeIndicator;
|
||||
|
||||
int _positioningMask;
|
||||
CGRect _positioningScreenRect;
|
||||
|
||||
BOOL _isDocumentEdited;
|
||||
BOOL _isDocumentSaving;
|
||||
|
||||
@@ -535,6 +538,49 @@ CPTexturedBackgroundWindowMask
|
||||
// set up a default key view loop.
|
||||
if (_keyViewLoopIsDirty && ![self autorecalculatesKeyViewLoop])
|
||||
[self recalculateKeyViewLoop];
|
||||
|
||||
// At this time we know the final screen (or browser) size and can apply the positioning mask, if any, from the nib.
|
||||
if (_positioningScreenRect)
|
||||
{
|
||||
var actualScreenRect = [CPPlatform isBrowser] ? [_platformWindow contentBounds] : [[self screen] visibleFrame],
|
||||
frame = [self frame],
|
||||
origin = frame.origin;
|
||||
|
||||
if (actualScreenRect)
|
||||
{
|
||||
if ((_positioningMask & CPWindowPositionFlexibleLeft) && (_positioningMask & CPWindowPositionFlexibleRight))
|
||||
{
|
||||
// Proportional Horizontal.
|
||||
origin.x *= (actualScreenRect.size.width / _positioningScreenRect.size.width);
|
||||
}
|
||||
else if (_positioningMask & CPWindowPositionFlexibleLeft)
|
||||
{
|
||||
// Fixed from Right
|
||||
origin.x += actualScreenRect.size.width - _positioningScreenRect.size.width;
|
||||
}
|
||||
else if (_positioningMask & CPWindowPositionFlexibleRight)
|
||||
{
|
||||
// Fixed from Left
|
||||
}
|
||||
|
||||
if ((_positioningMask & CPWindowPositionFlexibleTop) && (_positioningMask & CPWindowPositionFlexibleBottom))
|
||||
{
|
||||
// Proportional Vertical.
|
||||
origin.y *= (actualScreenRect.size.height / _positioningScreenRect.size.height);
|
||||
}
|
||||
else if (_positioningMask & CPWindowPositionFlexibleTop)
|
||||
{
|
||||
// Fixed from Bottom
|
||||
origin.y += actualScreenRect.size.height - _positioningScreenRect.size.height;
|
||||
}
|
||||
else if (_positioningMask & CPWindowPositionFlexibleBottom)
|
||||
{
|
||||
// Fixed from Top
|
||||
}
|
||||
|
||||
[self setFrameOrigin:origin];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)_setWindowView:(CPView)aWindowView
|
||||
|
||||
@@ -4,29 +4,20 @@
|
||||
@import "CGGeometry.j"
|
||||
@import "CPWindow.j"
|
||||
|
||||
CPWindowPositionFlexibleRight = 1 << 19;
|
||||
CPWindowPositionFlexibleLeft = 1 << 20;
|
||||
CPWindowPositionFlexibleBottom = 1 << 21;
|
||||
CPWindowPositionFlexibleTop = 1 << 22;
|
||||
|
||||
var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemplateMinSizeKey",
|
||||
_CPCibWindowTemplateMaxSizeKey = @"_CPCibWindowTemplateMaxSizeKey",
|
||||
|
||||
_CPCibWindowTemplateViewClassKey = @"_CPCibWindowTemplateViewClassKey",
|
||||
_CPCibWindowTemplateWindowClassKey = @"_CPCibWindowTemplateWindowClassKey",
|
||||
|
||||
_CPCibWindowTemplateWindowRectKey = @"_CPCibWindowTemplateWindowRectKey",
|
||||
_CPCibWindowTemplateWindowStyleMaskKey = @"_CPCibWindowTempatStyleMaskKey",
|
||||
_CPCibWindowTemplateWindowTitleKey = @"_CPCibWindowTemplateWindowTitleKey",
|
||||
_CPCibWindowTemplateWindowViewKey = @"_CPCibWindowTemplateWindowViewKey",
|
||||
|
||||
_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop = @"_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop",
|
||||
_CPCibWindowTemplateWindowIsFullPlatformWindowKey = @"_CPCibWindowTemplateWindowIsFullPlatformWindowKey";
|
||||
|
||||
@implementation _CPCibWindowTemplate : CPObject
|
||||
{
|
||||
CGSize _minSize;
|
||||
CGSize _maxSize;
|
||||
//CGSize _screenRect;
|
||||
CGRect _screenRect;
|
||||
|
||||
id _viewClass;
|
||||
//unsigned _wtFlags;
|
||||
unsigned _wtFlags;
|
||||
CPString _windowClass;
|
||||
CGRect _windowRect;
|
||||
unsigned _windowStyleMask;
|
||||
@@ -52,67 +43,18 @@ var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemp
|
||||
_windowView = [[CPView alloc] initWithFrame:CGRectMake(0.0, 0.0, 400.0, 200.0)];
|
||||
|
||||
_windowIsFullPlatformWindow = NO;
|
||||
|
||||
_wtFlags = CPPositionProportionalHorizontal | CPPositionProportionalVertical;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
{
|
||||
if ([aCoder containsValueForKey:_CPCibWindowTemplateMinSizeKey])
|
||||
_minSize = [aCoder decodeSizeForKey:_CPCibWindowTemplateMinSizeKey];
|
||||
if ([aCoder containsValueForKey:_CPCibWindowTemplateMaxSizeKey])
|
||||
_maxSize = [aCoder decodeSizeForKey:_CPCibWindowTemplateMaxSizeKey];
|
||||
|
||||
_viewClass = [aCoder decodeObjectForKey:_CPCibWindowTemplateViewClassKey];
|
||||
|
||||
_windowClass = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowClassKey];
|
||||
_windowRect = [aCoder decodeRectForKey:_CPCibWindowTemplateWindowRectKey];
|
||||
_windowStyleMask = [aCoder decodeIntForKey:_CPCibWindowTemplateWindowStyleMaskKey];
|
||||
|
||||
_windowTitle = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowTitleKey];
|
||||
_windowView = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowViewKey];
|
||||
|
||||
_windowAutorecalculatesKeyViewLoop = [aCoder decodeBoolForKey:_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop];
|
||||
_windowIsFullPlatformWindow = [aCoder decodeBoolForKey:_CPCibWindowTemplateWindowIsFullPlatformWindowKey];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)encodeWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
if (_minSize)
|
||||
[aCoder encodeSize:_minSize forKey:_CPCibWindowTemplateMinSizeKey];
|
||||
if (_maxSize)
|
||||
[aCoder encodeSize:_maxSize forKey:_CPCibWindowTemplateMaxSizeKey];
|
||||
|
||||
[aCoder encodeObject:_viewClass forKey:_CPCibWindowTemplateViewClassKey];
|
||||
|
||||
[aCoder encodeObject:_windowClass forKey:_CPCibWindowTemplateWindowClassKey];
|
||||
[aCoder encodeRect:_windowRect forKey:_CPCibWindowTemplateWindowRectKey];
|
||||
[aCoder encodeInt:_windowStyleMask forKey:_CPCibWindowTemplateWindowStyleMaskKey];
|
||||
|
||||
[aCoder encodeObject:_windowTitle forKey:_CPCibWindowTemplateWindowTitleKey];
|
||||
[aCoder encodeObject:_windowView forKey:_CPCibWindowTemplateWindowViewKey];
|
||||
|
||||
if (_windowAutorecalculatesKeyViewLoop)
|
||||
[aCoder encodeObject:_windowAutorecalculatesKeyViewLoop forKey:_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop];
|
||||
|
||||
if (_windowIsFullPlatformWindow)
|
||||
[aCoder encodeObject:_windowIsFullPlatformWindow forKey:_CPCibWindowTemplateWindowIsFullPlatformWindowKey];
|
||||
}
|
||||
|
||||
- (CPString)customClassName
|
||||
{
|
||||
return _windowClass;
|
||||
}
|
||||
|
||||
|
||||
- (void)setCustomClassName:(CPString)aClassName
|
||||
{
|
||||
_windowClass = aClassName;
|
||||
@@ -155,7 +97,85 @@ var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemp
|
||||
[theWindow setAutorecalculatesKeyViewLoop:_windowAutorecalculatesKeyViewLoop];
|
||||
[theWindow setFullBridge:_windowIsFullPlatformWindow];
|
||||
|
||||
theWindow._positioningMask = _wtFlags;
|
||||
theWindow._positioningScreenRect = _screenRect;
|
||||
|
||||
return theWindow;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemplateMinSizeKey",
|
||||
_CPCibWindowTemplateMaxSizeKey = @"_CPCibWindowTemplateMaxSizeKey",
|
||||
|
||||
_CPCibWindowTemplateViewClassKey = @"_CPCibWindowTemplateViewClassKey",
|
||||
_CPCibWindowTemplateWTFlagsKey = @"_CPCibWindowTemplateWTFlagsKey",
|
||||
_CPCibWindowTemplateWindowClassKey = @"_CPCibWindowTemplateWindowClassKey",
|
||||
|
||||
_CPCibWindowTemplateWindowRectKey = @"_CPCibWindowTemplateWindowRectKey",
|
||||
_CPCibWindowTemplateScreenRectKey = @"_CPCibWindowTemplateScreenRectKey",
|
||||
_CPCibWindowTemplateWindowStyleMaskKey = @"_CPCibWindowTempatStyleMaskKey",
|
||||
_CPCibWindowTemplateWindowTitleKey = @"_CPCibWindowTemplateWindowTitleKey",
|
||||
_CPCibWindowTemplateWindowViewKey = @"_CPCibWindowTemplateWindowViewKey",
|
||||
|
||||
_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop = @"_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop",
|
||||
_CPCibWindowTemplateWindowIsFullPlatformWindowKey = @"_CPCibWindowTemplateWindowIsFullPlatformWindowKey";
|
||||
|
||||
@implementation _CPCibWindowTemplate (Coding)
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
{
|
||||
if ([aCoder containsValueForKey:_CPCibWindowTemplateMinSizeKey])
|
||||
_minSize = [aCoder decodeSizeForKey:_CPCibWindowTemplateMinSizeKey];
|
||||
if ([aCoder containsValueForKey:_CPCibWindowTemplateMaxSizeKey])
|
||||
_maxSize = [aCoder decodeSizeForKey:_CPCibWindowTemplateMaxSizeKey];
|
||||
|
||||
_viewClass = [aCoder decodeObjectForKey:_CPCibWindowTemplateViewClassKey];
|
||||
|
||||
_windowClass = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowClassKey];
|
||||
_wtFlags = [aCoder decodeIntForKey:_CPCibWindowTemplateWTFlagsKey];
|
||||
_windowRect = [aCoder decodeRectForKey:_CPCibWindowTemplateWindowRectKey];
|
||||
_screenRect = [aCoder decodeRectForKey:_CPCibWindowTemplateScreenRectKey];
|
||||
_windowStyleMask = [aCoder decodeIntForKey:_CPCibWindowTemplateWindowStyleMaskKey];
|
||||
|
||||
_windowTitle = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowTitleKey];
|
||||
_windowView = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowViewKey];
|
||||
|
||||
_windowAutorecalculatesKeyViewLoop = [aCoder decodeBoolForKey:_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop];
|
||||
_windowIsFullPlatformWindow = [aCoder decodeBoolForKey:_CPCibWindowTemplateWindowIsFullPlatformWindowKey];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)encodeWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
if (_minSize)
|
||||
[aCoder encodeSize:_minSize forKey:_CPCibWindowTemplateMinSizeKey];
|
||||
if (_maxSize)
|
||||
[aCoder encodeSize:_maxSize forKey:_CPCibWindowTemplateMaxSizeKey];
|
||||
|
||||
[aCoder encodeObject:_viewClass forKey:_CPCibWindowTemplateViewClassKey];
|
||||
|
||||
[aCoder encodeObject:_windowClass forKey:_CPCibWindowTemplateWindowClassKey];
|
||||
[aCoder encodeInt:_wtFlags forKey:_CPCibWindowTemplateWTFlagsKey];
|
||||
[aCoder encodeRect:_windowRect forKey:_CPCibWindowTemplateWindowRectKey];
|
||||
[aCoder encodeRect:_screenRect forKey:_CPCibWindowTemplateScreenRectKey];
|
||||
[aCoder encodeInt:_windowStyleMask forKey:_CPCibWindowTemplateWindowStyleMaskKey];
|
||||
|
||||
[aCoder encodeObject:_windowTitle forKey:_CPCibWindowTemplateWindowTitleKey];
|
||||
[aCoder encodeObject:_windowView forKey:_CPCibWindowTemplateWindowViewKey];
|
||||
|
||||
if (_windowAutorecalculatesKeyViewLoop)
|
||||
[aCoder encodeObject:_windowAutorecalculatesKeyViewLoop forKey:_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop];
|
||||
|
||||
if (_windowIsFullPlatformWindow)
|
||||
[aCoder encodeObject:_windowIsFullPlatformWindow forKey:_CPCibWindowTemplateWindowIsFullPlatformWindowKey];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -321,6 +321,16 @@ function CGContextClosePath(aContext)
|
||||
CGPathCloseSubpath(aContext.path);
|
||||
}
|
||||
|
||||
/*!
|
||||
Return YES if the current path in the given context is empty.
|
||||
@param aContext the CGContext to examine
|
||||
@return BOOL
|
||||
*/
|
||||
function CGContextIsPathEmpty(aContext)
|
||||
{
|
||||
return (!aContext.path || CGPathIsEmpty(aContext.path));
|
||||
}
|
||||
|
||||
/*!
|
||||
Moves the current location of aContext to the given x and y coordinates
|
||||
@param aContext the CGContext to move
|
||||
|
||||
@@ -129,7 +129,7 @@ function CGContextAddPath(aContext, aPath)
|
||||
break;
|
||||
case kCGPathElementAddArc: _CGContextAddArcCanvas(aContext, element.x, element.y, element.radius, element.startAngle, element.endAngle, element.clockwise);
|
||||
break;
|
||||
case kCGPathElementAddArcTo: //_CGContextAddArcToPointCanvas(aContext, element.cp1x, element.cp1.y, element.cp2.x, element.cp2y, element.radius);
|
||||
case kCGPathElementAddArcToPoint: _CGContextAddArcToPointCanvas(aContext, element.p1x, element.p1y, element.p2x, element.p2y, element.radius);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ function CGContextDrawPath(aContext, aMode)
|
||||
COORD(start.x), ',', COORD(start.y), " ",
|
||||
COORD(end.x), ',', COORD(end.y));
|
||||
break;
|
||||
case kCGPathElementAddArcTo: break;
|
||||
case kCGPathElementAddArcToPoint: break;
|
||||
}
|
||||
|
||||
// TODO: Following is broken for curves due to
|
||||
@@ -332,4 +332,4 @@ function CGContextDrawLinearGradient(aContext, aGradient, aStartPoint, anEndPoin
|
||||
// aContext.buffer += vml.join("");
|
||||
// else
|
||||
// aContext.DOMElement.innerHTML = vml.join("");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +118,17 @@ function CGPathAddArc(aPath, aTransform, x, y, aRadius, aStartAngle, anEndAngle,
|
||||
|
||||
function CGPathAddArcToPoint(aPath, aTransform, x1, y1, x2, y2, aRadius)
|
||||
{
|
||||
var p1 = _CGPointMake(x1, y1),
|
||||
p2 = _CGPointMake(x2, y2);
|
||||
|
||||
if (aTransform)
|
||||
{
|
||||
p1 = _CGPointApplyAffineTransform(p1, aTransform);
|
||||
p2 = _CGPointApplyAffineTransform(p2, aTransform);
|
||||
}
|
||||
|
||||
aPath.current = p2;
|
||||
aPath.elements[aPath.count++] = { type:kCGPathElementAddArcToPoint, p1x:p1.x, p1y:p1.y, p2x:p2.x, p2y:p2.y, radius:aRadius };
|
||||
}
|
||||
|
||||
function CGPathAddCurveToPoint(aPath, aTransform, cp1x, cp1y, cp2x, cp2y, x, y)
|
||||
@@ -186,6 +197,12 @@ function CGPathAddPath(aPath, aTransform, anotherPath)
|
||||
element.endAngle, element.isClockwise);
|
||||
break;
|
||||
|
||||
case kCGPathElementAddArcToPoint: CGPathAddArcToPoint(aPath, aTransform,
|
||||
element.p1x, element.p1y,
|
||||
element.p2x, element.p2y,
|
||||
element.radius);
|
||||
break;
|
||||
|
||||
case kCGPathElementAddQuadCurveToPoint: CGPathAddQuadCurveToPoint(aPath, aTransform,
|
||||
element.cpx, element.cpy,
|
||||
element.x, element.y);
|
||||
@@ -389,6 +406,108 @@ function CGPathIsEmpty(aPath)
|
||||
return !aPath || aPath.count == 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
Calculate the smallest rectangle to contain both the path of the receiver and all control points.
|
||||
*/
|
||||
function CGPathGetBoundingBox(aPath)
|
||||
{
|
||||
if (!aPath || !aPath.count)
|
||||
return _CGRectMakeZero();
|
||||
|
||||
var ox = 0,
|
||||
oy = 0,
|
||||
rx = 0,
|
||||
ry = 0,
|
||||
movePoint = nil;
|
||||
|
||||
function addPoint(x, y)
|
||||
{
|
||||
ox = MIN(ox, x);
|
||||
oy = MIN(oy, y);
|
||||
rx = MAX(rx, x);
|
||||
ry = MAX(ry, y);
|
||||
}
|
||||
|
||||
for (var i = 0, count = aPath.count; i < count; ++i)
|
||||
{
|
||||
var element = aPath.elements[i];
|
||||
|
||||
// Just enclose all the control points. The curves must be inside of the control points.
|
||||
// This won't work for CGPathGetPathBoundingBox.
|
||||
switch (element.type)
|
||||
{
|
||||
case kCGPathElementAddLineToPoint:
|
||||
if (movePoint)
|
||||
{
|
||||
addPoint(movePoint.x, movePoint.y);
|
||||
movePoint = nil;
|
||||
}
|
||||
|
||||
addPoint(element.x, element.y);
|
||||
break;
|
||||
|
||||
case kCGPathElementAddCurveToPoint:
|
||||
if (movePoint)
|
||||
{
|
||||
addPoint(movePoint.x, movePoint.y);
|
||||
movePoint = nil;
|
||||
}
|
||||
|
||||
addPoint(element.cp1x, element.cp1y);
|
||||
addPoint(element.cp2x, element.cp2y);
|
||||
addPoint(element.x, element.y);
|
||||
break;
|
||||
|
||||
case kCGPathElementAddArc:
|
||||
if (movePoint)
|
||||
{
|
||||
addPoint(movePoint.x, movePoint.y);
|
||||
movePoint = nil;
|
||||
}
|
||||
|
||||
addPoint(element.x, element.y);
|
||||
break;
|
||||
|
||||
case kCGPathElementAddArcToPoint:
|
||||
if (movePoint)
|
||||
{
|
||||
addPoint(movePoint.x, movePoint.y);
|
||||
movePoint = nil;
|
||||
}
|
||||
|
||||
addPoint(element.p1x, element.p1y);
|
||||
addPoint(element.p2x, element.p2y);
|
||||
break;
|
||||
|
||||
case kCGPathElementAddQuadCurveToPoint:
|
||||
if (movePoint)
|
||||
{
|
||||
addPoint(movePoint.x, movePoint.y);
|
||||
movePoint = nil;
|
||||
}
|
||||
|
||||
addPoint(element.cpx, element.cpy);
|
||||
addPoint(element.x, element.y);
|
||||
break;
|
||||
|
||||
case kCGPathElementMoveToPoint:
|
||||
movePoint = _CGPointMake(element.x, element.y);
|
||||
break;
|
||||
|
||||
case kCGPathElementCloseSubpath:
|
||||
if (movePoint)
|
||||
{
|
||||
addPoint(movePoint.x, movePoint.y);
|
||||
movePoint = nil;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return _CGRectMake(ox, oy, rx - ox, ry - oy);
|
||||
}
|
||||
|
||||
/*!
|
||||
@}
|
||||
*/
|
||||
|
||||
@@ -113,14 +113,12 @@
|
||||
@import "CPEvent.j"
|
||||
@import "CPText.j"
|
||||
@import "CPCompatibility.j"
|
||||
|
||||
@import "CPDOMWindowLayer.j"
|
||||
|
||||
@import "CPPlatform.j"
|
||||
@import "CPPlatformWindow.j"
|
||||
@import "CPPlatformWindow+DOMKeys.j"
|
||||
|
||||
|
||||
// List of all open native windows
|
||||
var PlatformWindows = [CPSet set];
|
||||
|
||||
@@ -1242,6 +1240,10 @@ var resizeTimer = nil;
|
||||
|
||||
else if (type === "mousedown")
|
||||
{
|
||||
// If we receive a click event, then we invalidate any scheduled
|
||||
// or visible tooltips
|
||||
[_CPToolTip invalidateCurrentToolTipIfNeeded];
|
||||
|
||||
var button = aDOMEvent.button;
|
||||
_mouseDownIsRightClick = button == 2 || (CPBrowserIsOperatingSystem(CPMacOperatingSystem) && button == 0 && modifierFlags & CPControlKeyMask);
|
||||
|
||||
@@ -1601,7 +1603,7 @@ var _CPEventFromNativeMouseEvent = function(aNativeEvent, anEventType, aPoint, m
|
||||
};
|
||||
|
||||
var CLICK_SPACE_DELTA = 5.0,
|
||||
CLICK_TIME_DELTA = (typeof document != "undefined" && document.addEventListener) ? 350.0 : 1000.0;
|
||||
CLICK_TIME_DELTA = (typeof document != "undefined" && document.addEventListener) ? 0.55 : 1.0;
|
||||
|
||||
var CPDOMEventGetClickCount = function(aComparisonEvent, aTimestamp, aLocation)
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 455 B |
|
Before Width: | Height: | Size: 486 B After Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 580 B |
|
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 541 B |
|
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 409 B |
|
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 402 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 144 B |
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 144 B |
|
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 84 B |
|
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 72 B |
|
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 72 B |
|
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 138 B |
|
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 77 B |
|
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 81 B |
|
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 106 B |
|
Before Width: | Height: | Size: 165 B After Width: | Height: | Size: 108 B |
|
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 143 B |
|
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 194 B |
|
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 108 B |
|
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 126 B |
|
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 173 B |
|
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 195 B |
|
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 147 B |
|
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 189 B |
|
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 114 B |
|
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 111 B |
|
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 218 B |
|
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 213 B |
|
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 205 B |
|
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 120 B |
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 205 B |
|
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 142 B |
|
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 88 B |
|
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 137 B |
|
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 140 B |
|
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 89 B |
|
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 140 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 956 B After Width: | Height: | Size: 256 B |
|
Before Width: | Height: | Size: 976 B After Width: | Height: | Size: 239 B |
|
Before Width: | Height: | Size: 958 B After Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 938 B After Width: | Height: | Size: 302 B |
|
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 228 B |
|
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 234 B |
|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 82 B |
|
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 80 B |
|
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 88 B |
|
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 206 B |
|
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 84 B |
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 144 B |
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 144 B |
|
Before Width: | Height: | Size: 118 B After Width: | Height: | Size: 74 B |
|
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 72 B |
|
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 79 B |
|
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 128 B |