Compare commits

..
76 Commits
Author SHA1 Message Date
Alexander Ljungberg ad11967893 Fixed: documentation version number lagging behind. 2013-01-29 23:28:35 +00:00
Alexander Ljungberg c0b5ed6b3f New demos repository. 2013-01-19 02:21:12 +00:00
Alexander Ljungberg dfad18e047 New website location. 2013-01-19 02:11:37 +00:00
Alexander Ljungberg 7f93173b33 This will be the final v0.9.6. 2013-01-19 01:00:05 +00:00
Alexander Ljungberg 821961fc26 Argument check CPIndexSet indexSetWithIndex:.
Without this check, an index set could be initialised with NaN which would later lead to an infinite loop when enumerating the index set.

This error makes the error early and explicit.
2013-01-15 16:08:17 +00:00
Alexander Ljungberg 4021eae002 Fixed: CPApplicationTest.
A recent commit broke it.
2013-01-15 16:06:44 +00:00
Aparajita Fishman 0e82504daf Formatting 2013-01-12 16:57:59 +07:00
Aparajita Fishman 7fdc3abd30 Missing semicolon 2013-01-12 16:24:26 +07:00
Aparajita Fishman e464900f8b Merge branch 'key-view-loop'
Conflicts:
	AppKit/CPWindow/CPWindow.j
2013-01-12 09:38:07 +07:00
Aparajita Fishman 95511b5311 Window resize tweak...
- If a window is fixed width or fixed height, then no resize cursor is shown and no resize area is active on the edges that cannot be resized.
- Optimized CG calls in CPWindow.
- Added fixed height window to test app.
2013-01-11 21:56:04 +07:00
Alexander Ljungberg 23817a04e1 Unit test HTTP response header parsing. 2013-01-11 12:28:14 +00:00
Alexander Ljungberg 2b90d6244f Merge branch 'master' of github.com:cappuccino/cappuccino 2013-01-11 11:02:12 +00:00
Alexander Ljungberg 7485c4eb7a New: -CPHTTPURLResponse allHeaderFields.
When a CPURLConnection response is of the CPHTTPURLResponse type, the raw HTTP headers can now be retrieved through the allHeaderFields message.
2013-01-11 10:53:42 +00:00
Antoine Mercadal 71f502a8e8 Fix some ivar masking in tests 2013-01-10 23:04:12 -08:00
Antoine Mercadal 341eb26c62 Merge branch 'master' of https://github.com/cappuccino/cappuccino 2013-01-10 22:41:31 -08:00
Antoine Mercadal 18f8294fa9 Update order of variable to tets in assert 2013-01-10 22:40:15 -08:00
Alexander Ljungberg 1a54aadff0 Merge branch 'master' of github.com:cappuccino/cappuccino 2013-01-11 00:48:28 +00:00
Alexander Ljungberg 6e3f82299f Add missing source header. 2013-01-11 00:48:18 +00:00
aparajita 64915f18ff Merge pull request #1711 from slevenbits/new-window-resize
This commit provides resizing of windows from all sides. The legacy style, which displays a resize thumb in the lower right, can be restored with [CPWindow setGlobalResizeStyle:CPWindowResizeStyleLegacy].
2013-01-10 09:53:07 -08:00
Aparajita Fishman 1f8306d2b3 Hooked up the edit menu 2013-01-11 00:38:43 +07:00
Aparajita Fishman cdc88dbe18 Key view...
- Factored out blur handler from CPTokenField into CPTextField.
- CPTextField will no longer lose focus unnecessarily.
- Changed switch style in CPWindow -sendEvent.
- Added menu bar to KeyViewLoop test app.
2013-01-11 00:18:38 +07:00
Aparajita Fishman b59f96d238 Key view loop enhancements...
- Nested views are now handled recursively as they are in Cocoa.
- Added a nested view test in the test app.
2013-01-10 21:49:54 +07:00
Alexander Ljungberg 110bd20600 Fix return value type. 2013-01-10 11:48:52 +00:00
Aparajita Fishman af2e0348c1 More key view loop madness
- It turns out Cocoa DOES recalculate the loop when calling recalculateKeyViewLoop. It does not wait until selectNext/PreviousKeyView is called.
- Cocoa calculates the key view loop for nibs that do not have one, but does not call recalculateKeyViewLoop.
- If there is no first responder and no initial first responder when a window first becomes key, use the first valid key view, not the first geometric key view.
- Made allViews function a method, not sure why it was a function.
- Unit tests now pass.
2013-01-10 09:11:58 +07:00
Antoine Mercadal 295eedc0b9 Add missing import in NSMenuItem.j 2013-01-09 11:58:42 -08:00
Antoine Mercadal 29fe631ce6 small style fix 2013-01-09 09:54:43 -08:00
Andrew Hankinson 40ab25d2a6 Minor formatting changes 2013-01-09 11:30:20 -05:00
Andrew Hankinson 0f9a2dc9d3 Fixed: XCodeCapp reads the user's shell environment
Before this fix, XCodeCapp always ran under /bin/bash, causing problems when trying to source the files from other shells, like /bin/zsh

This fix reads the shell information directly from the user's environment and XCC to run using that shell.
2013-01-09 11:27:47 -05:00
Aparajita Fishman 782f47a30b Key view loop fixes/improvements
- Removed unnecessary code at beginning of CPTextField -becomeFirstResponder that might have been a hack to get around a bug I fixed.
- Fixed race condition in setTimeout closure in CPTextField -becomeFirstResponder.
- CPWindow -setInitialFirstResponder now works reliably and follows Cocoa behavior in that if -makeFirstResponder is called with something other than the window before the window is first shown, it will override the initial first responder.
- Like Cocoa, until the first responder is set during window load, the first responder is the window by default, not the content view.
- Optimized search for any view that has a previous/next key view set.
- Sheets can become key windows again.
- CPWindow -recalculateKeyViewLoop now just marks the loop as dirty, per Cocoa docs.
- CPWindow -autorecalculatesKeyViewLoop now behaves per Cocoa, it only has an effect when views are added or removed.
- If the first responder does not have a valid previous/next key view, it does not resign to nil, per Cocoa behavior.
- Code optimization and cleanup.
- Test app (KeyViewLoopTest) that demonstrates various scenarios.
2013-01-09 18:02:07 +07:00
Antoine Mercadal 6284f29a96 Fix regexp in XcodeCapp parser. Thanks to Andrew Hankinson 2013-01-08 18:43:09 -08:00
Antoine Mercadal 19f668f4f6 use the [CPPlatformWindow primaryPlatformWindow] to position the tooltips. 2013-01-08 18:09:07 -08:00
Antoine Mercadal 7816510fdf Merge branch 'master' of https://github.com/cappuccino/cappuccino 2013-01-08 16:29:33 -08:00
Antoine Mercadal 50031dbc89 Remove wrong import string 2013-01-08 16:29:06 -08:00
Alexander Ljungberg 32eafb7708 Fix import. 2013-01-08 18:21:29 +00:00
Alexander Ljungberg c81b8fb3c3 Formatting. 2013-01-08 18:07:15 +00:00
Antoine Mercadal a9be167146 Add missing import 2013-01-08 10:05:25 -08:00
Antoine Mercadal 8e16e6266e Fix a bug where CPURL was not encoding self._baseURL and self._string 2013-01-07 16:04:08 -08:00
Aparajita Fishman 45ad5375a2 Full platform windows and popovers can become main 2013-01-07 07:07:27 +08:00
Alexander Ljungberg 259adda77d Merge pull request #1713 from milestinsley/CPBrowserStyleProperty-fix
Improved support for converting CSS properties to their JS equivalent in CPBrowserStyleProperty
2013-01-06 17:31:08 +00:00
Miles Tinsley 964f3fe06d Improved the reliability of CPBrowserCSSProperty by checking for the browser prefix *before* hyphenating the camel-cased string.
This has the added benefit of ignoring unknown/unsupported prefixes, providing the property itself is camel-cased.

For example:

"LinearBackground" -> "linear-background"
"Linear-Background" -> "linear-background"
"linear-background" -> "linear-background"
"fooLinearBackground" -> "linear-background"

and

"WebkitLinearBackground" -> "-webkit-linear-background"
"MozLinearBackground" -> "-moz-linear-background"
etc..
2013-01-06 17:20:37 +00:00
Miles Tinsley 002c49b32f Updated CPBrowserCSSProperty to support camel cased style property names and convert them into valid browser-aware CSS properties. 2013-01-06 16:57:31 +00:00
Alexander Ljungberg d4313be406 Merge pull request #1713 from milestinsley/CPBrowserStyleProperty-fix
Improved support for converting CSS properties to their JS equivalent in CPBrowserStyleProperty
2013-01-06 15:48:49 +00:00
Miles Tinsley 76a4ded128 Improved support for converting CSS properties to their JS equivalent in CPBrowserStyleProperty
For example, the following CSS property names all resolve to the same correct JS equivalent for the current browser:

 * CPBrowserStyleProperty('TransformOrigin') -> 'WebkitTransformOrigin'
 * CPBrowserStyleProperty('transform-origin') -> 'WebkitTransformOrigin'
2013-01-06 13:26:01 +00:00
Aparajita Fishman 8d68e805f4 Fix CPWindow -canBecomeKeyWindow and -canBecomeMainWindow to match Cocoa behavior (and misleading documentation)
Minor code formatting cleanup as well
2013-01-06 16:21:10 +08:00
Aparajita Fishman f1a171a94c Window resize fixes
- Track mouse exit from window resize rect instead of unconditionally setting arrow cursor.
- Don't show the resize cursors for full platform windows.
- Show the resize down cursor if the top of a window is being resized and it has reached the bottom of the menubar.
- Make windows in CPToolbarTest resizable to test resizing behavior with toolbars.
- Added a full platform window and menubar to the test app.
2013-01-05 11:13:53 +08:00
Antoine Mercadal 3e6517849e Add manual test for CPSegmentedControl 2013-01-04 12:15:09 -08:00
Antoine Mercadal deacdde521 Fix bug in CPSegmentedControl not reducing his size when removing segments 2013-01-04 12:14:22 -08:00
Alexander Ljungberg d072f17896 Optimisation. 2013-01-04 11:28:09 +00:00
Alexander Ljungberg 0d31f79f53 Constrain window resize to usable area of platform window. 2013-01-04 11:28:09 +00:00
Aparajita Fishman b869312e4f Finished full window resize support
- The main run loop resets the cursor if it falls outside of all windows during a mouse move.
- Added cursors supported by CSS that are not in NSCursor.
- Code cleanup in CPCursor.
- Cursors now indicate available resize directions if there is a window min/max size.
- Reduced slop to 3, what it is in Cocoa.
- Added a second non-min/max window to the demo.
2013-01-04 15:19:00 +08:00
Aparajita Fishman deb6224cf8 Support for resizing windows on all sides 2013-01-04 15:17:29 +08:00
Alexander Ljungberg dcdcd8e41a Fixed: CPPanel could not always become the key window.
Without this fix, `CPPanel` followed the same rules as `CPWindow` with regards to becoming the key window. But `CPPanel` is supposed to always be willing to become the key window, as stated in its documentation.

This change makes `CPPanel` always return `YES` for `canBecomeKeyWindow`.
2012-12-31 14:53:04 +00:00
Alexander Ljungberg 24443221f2 Merge pull request #1708 from imageoptimiser/optimised-images
Optimise images (94 KB reduction)
2012-12-27 16:12:46 +00:00
imageoptimiserandAdam Howard 787dd10c69 Optimised images 2012-12-24 12:10:02 +00:00
Alexander Ljungberg 9705f1fe28 Commit message guidelines. 2012-12-21 11:25:13 +00:00
Alexander Ljungberg 2a11bdb7ef Fixup: previous fix undid penultimate fix. 2012-12-18 00:34:14 +00:00
Alexander Ljungberg 3775c3fb2e Fixed: CPAlert was a CPView.
Before this fix, CPAlert subclassed CPView, causing an API mismatch with Cocoa and exposing unexpected methods in the public API which made no sense for a CPAlert such as autoresizing masks. It also lead to CPAlert mistakingly shadowing _window from its CPView superclass.

This fix makes CPAlert inherit from CPObject as it should. The theming, which needs to be applied to a view, was moved to an internal view.
2012-12-18 00:22:19 +00:00
Alexander Ljungberg cea120945c Fixed: CPAlert sheet crash.
Without this fix, CPAlert windows would not finish closing before sending the `alertDidEnd:returnCode:` delegate message. This would lead to a crash if the delegate method tried to open a new sheet.

This fix makes sure to fully order out the alert sheet before sending the delegate message.
2012-12-18 00:19:04 +00:00
Alexander Ljungberg a202cfbbe9 Skip check-missing-imports in standard jake test to make the load on travis-ci lighter.
"detect-missing-imports" takes a long, long time to run. Since it only emits warnings it can't affect the result of the continuous integration builds.

Until it can be made a little faster it's probably best to run it by hand with `jake check-missing-imports`.
2012-12-15 12:36:00 +00:00
Alexander Ljungberg 848c893b9e Fixed: CPApplicationTest setArguments.
Without this change, CPApplicationTest's manipulation of window.location.hash was ignored by CPApplication in recent versions, since CPApp in a unit test normally does not have access to the window object.

This change makes it so that CPApp does try to access the window object, even in a unit test scenario (non PLATFORM(DOM)).
2012-12-15 11:50:47 +00:00
Alexander Ljungberg 252b8f5ca5 Fixed: [CPApp windows] contained nil.
Before this fix, CPApp tried to add nil to its internal list of windows, even that nil should not be added to a CPArray. Second, that nil was actually returned by [CPApp windows] rather than an expected list of only CPWindow instances.

This fix makes [CPApp windows] return only actual windows, replaces the internal _windows[0] placeholder with CPNull, and ensures this CPNull is never actually exposed outside of the class.
2012-12-15 11:48:15 +00:00
Alexander Ljungberg d82da5d571 Fix 7070fe9b2e. 2012-12-15 01:36:05 +00:00
Alexander Ljungberg 1ebdd8ed8e Try to make travis output more to the point. 2012-12-15 01:32:06 +00:00
Alexander Ljungberg 7070fe9b2e --quiet and --verbose boostrap.sh options.
Without this change, bootstrap.sh outputs a great deal of often superfluous information, like precisely which files are unzipped.

Also, curl and wget display progress information by default.

With this change, by default unzipping is quiet, unless --verbose is specified. curl and wget still display progress information, but --quiet can be specified to prevent this.
2012-12-15 01:31:28 +00:00
Alexander Ljungberg 7b2464a740 Fix tab view test to work after 2758454.
Now that we use layoutSubviews in CPTabView we have to make sure it's called in a unit test scenario.
2012-12-15 01:12:29 +00:00
Alexander Ljungberg e2f19c30f1 Whitespace. 2012-12-15 01:03:52 +00:00
Alexander Ljungberg 5408df40f5 Merge pull request #1698 from ahankinson/travis-ci
Travis CI Integration
2012-12-15 00:46:49 +00:00
Alexander Ljungberg 79894781b1 Merge pull request #1707 from slevenbits/slevenbits-tokenfield-value-fix
Fixed: if any token field was being edited, the object value of all other token fields contained the partial value.
2012-12-15 00:40:07 +00:00
Alexander Ljungberg e798842dee Merge pull request #1706 from slevenbits/slevenbits-tokenfield-scroll-fix
Fixed: token field autocomplete scrollbars unresponsive to mouse.
2012-12-15 00:40:04 +00:00
Alexander Ljungberg 98ff6c1279 Merge pull request #1705 from slevenbits/slevenbits-popover-firefox-fix
Fixed: popoverDidShow in Firefox. New: popover animation support in Firefox, Opera and IE10.
2012-12-15 00:40:02 +00:00
Alexander Ljungberg 59fb04321d Merge pull request #1704 from slevenbits/slevenbits-key-popover-fix
Fixed: CPPopovers could not become key windows in recent versions.
2012-12-15 00:37:28 +00:00
Alexander Ljungberg 81d537fa24 Merge pull request #1703 from slevenbits/slevenbits-editable-tokenfield-fix
Fixed: tokens could be deleted in an non editable token field.
2012-12-15 00:37:23 +00:00
Alexander Ljungberg 6488ab2375 Merge pull request #1702 from slevenbits/slevenbits-settimeout-fix
Allow setTimeout(f) to support some JS libraries such as PDF.js.
2012-12-15 00:37:20 +00:00
Alexander Ljungberg a10f36e3a2 Merge pull request #1701 from slevenbits/slevenbits-tab-view-resize-fix
Fixed: tab views added in IB didn't resize properly.
2012-12-15 00:37:18 +00:00
Andrew Hankinson f5bb8abfe0 Updating paths for integration into mainline cappuccino 2012-12-03 19:24:14 -05:00
Andrew Hankinson a24f33ad93 Add .travis.yml for Travis-CI support 2012-12-03 19:11:35 -05:00
563 changed files with 15065 additions and 1092 deletions
+8
View File
@@ -0,0 +1,8 @@
language: node_js
node_js:
- 0.8
before_install:
- jdk_switcher use openjdk6
install: ./bootstrap.sh --quiet --noprompt --directory ./narwhal
script: jake test
env: PATH=/home/travis/builds/cappuccino/cappuccino/narwhal/bin:$PATH CAPP_BUILD=/home/travis/builds/cappuccino/cappuccino/Build NARWHAL_ENGINE=rhino
+138 -97
View File
@@ -75,32 +75,33 @@ CPCriticalAlertStyle = 2;
representing the first button added to the alert which appears on the
right, 1 representing the next button to the left and so on)
*/
@implementation CPAlert : CPView
@implementation CPAlert : CPObject
{
BOOL _showHelp @accessors(property=showsHelp);
BOOL _showSuppressionButton @accessors(property=showsSuppressionButton);
BOOL _showHelp @accessors(property=showsHelp);
BOOL _showSuppressionButton @accessors(property=showsSuppressionButton);
CPAlertStyle _alertStyle @accessors(property=alertStyle);
CPString _title @accessors(property=title);
CPView _accessoryView @accessors(property=accessoryView);
CPImage _icon @accessors(property=icon);
CPAlertStyle _alertStyle @accessors(property=alertStyle);
CPString _title @accessors(property=title);
CPView _accessoryView @accessors(property=accessoryView);
CPImage _icon @accessors(property=icon);
CPArray _buttons @accessors(property=buttons,readonly);
CPCheckBox _suppressionButton @accessors(property=suppressionButton,readonly);
CPArray _buttons @accessors(property=buttons,readonly);
CPCheckBox _suppressionButton @accessors(property=suppressionButton,readonly);
id _delegate @accessors(property=delegate);
id _modalDelegate;
SEL _didEndSelector;
id _delegate @accessors(property=delegate);
id _modalDelegate;
SEL _didEndSelector;
CPWindow _window @accessors(property=window,readonly);
int _defaultWindowStyle;
_CPAlertThemeView _themeView @accessors(property=themeView, readonly);
CPWindow _window @accessors(property=window,readonly);
int _defaultWindowStyle;
CPImageView _alertImageView;
CPTextField _informativeLabel;
CPTextField _messageLabel;
CPButton _alertHelpButton;
CPImageView _alertImageView;
CPTextField _informativeLabel;
CPTextField _messageLabel;
CPButton _alertHelpButton;
BOOL _needsLayout;
BOOL _needsLayout;
}
#pragma mark Creating Alerts
@@ -164,6 +165,7 @@ CPCriticalAlertStyle = 2;
_showHelp = NO;
_needsLayout = YES;
_defaultWindowStyle = CPTitledWindowMask;
_themeView = [_CPAlertThemeView new];
_messageLabel = [CPTextField labelWithTitle:@"Alert"];
_alertImageView = [[CPImageView alloc] init];
@@ -180,6 +182,11 @@ CPCriticalAlertStyle = 2;
#pragma mark Accessors
- (CPTheme)theme
{
return [_themeView theme];
}
/*!
set the theme to use
@@ -197,9 +204,20 @@ CPCriticalAlertStyle = 2;
_window = nil; // will be regenerated at next layout
_needsLayout = YES;
[super setTheme:aTheme];
[_themeView setTheme:aTheme];
}
- (void)setValue:(id)aValue forThemeAttribute:(CPString)aName
{
[_themeView setValue:aValue forThemeAttribute:aName];
}
- (void)setValue:(id)aValue forThemeAttribute:(CPString)aName inState:(CPThemeState)aState
{
[_themeView setValue:aValue forThemeAttribute:aName inState:aState];
}
/*! @deprecated
*/
- (void)setWindowStyle:(int)aStyle
@@ -334,16 +352,16 @@ CPCriticalAlertStyle = 2;
*/
- (void)_layoutMessageView
{
var inset = [self currentValueForThemeAttribute:@"content-inset"],
var inset = [_themeView currentValueForThemeAttribute:@"content-inset"],
sizeWithFontCorrection = 6.0,
messageLabelWidth,
messageLabelTextSize;
[_messageLabel setTextColor:[self currentValueForThemeAttribute:@"message-text-color"]];
[_messageLabel setFont:[self currentValueForThemeAttribute:@"message-text-font"]];
[_messageLabel setTextShadowColor:[self currentValueForThemeAttribute:@"message-text-shadow-color"]];
[_messageLabel setTextShadowOffset:[self currentValueForThemeAttribute:@"message-text-shadow-offset"]];
[_messageLabel setAlignment:[self currentValueForThemeAttribute:@"message-text-alignment"]];
[_messageLabel setTextColor:[_themeView currentValueForThemeAttribute:@"message-text-color"]];
[_messageLabel setFont:[_themeView currentValueForThemeAttribute:@"message-text-font"]];
[_messageLabel setTextShadowColor:[_themeView currentValueForThemeAttribute:@"message-text-shadow-color"]];
[_messageLabel setTextShadowOffset:[_themeView currentValueForThemeAttribute:@"message-text-shadow-offset"]];
[_messageLabel setAlignment:[_themeView currentValueForThemeAttribute:@"message-text-alignment"]];
[_messageLabel setLineBreakMode:CPLineBreakByWordWrapping];
messageLabelWidth = CGRectGetWidth([[_window contentView] frame]) - inset.left - inset.right;
@@ -357,18 +375,18 @@ CPCriticalAlertStyle = 2;
*/
- (void)_layoutInformativeView
{
var inset = [self currentValueForThemeAttribute:@"content-inset"],
defaultElementsMargin = [self currentValueForThemeAttribute:@"default-elements-margin"],
var inset = [_themeView currentValueForThemeAttribute:@"content-inset"],
defaultElementsMargin = [_themeView currentValueForThemeAttribute:@"default-elements-margin"],
sizeWithFontCorrection = 6.0,
informativeLabelWidth,
informativeLabelOriginY,
informativeLabelTextSize;
[_informativeLabel setTextColor:[self currentValueForThemeAttribute:@"informative-text-color"]];
[_informativeLabel setFont:[self currentValueForThemeAttribute:@"informative-text-font"]];
[_informativeLabel setTextShadowColor:[self currentValueForThemeAttribute:@"informative-text-shadow-color"]];
[_informativeLabel setTextShadowOffset:[self currentValueForThemeAttribute:@"informative-text-shadow-offset"]];
[_informativeLabel setAlignment:[self currentValueForThemeAttribute:@"informative-text-alignment"]];
[_informativeLabel setTextColor:[_themeView currentValueForThemeAttribute:@"informative-text-color"]];
[_informativeLabel setFont:[_themeView currentValueForThemeAttribute:@"informative-text-font"]];
[_informativeLabel setTextShadowColor:[_themeView currentValueForThemeAttribute:@"informative-text-shadow-color"]];
[_informativeLabel setTextShadowOffset:[_themeView currentValueForThemeAttribute:@"informative-text-shadow-offset"]];
[_informativeLabel setAlignment:[_themeView currentValueForThemeAttribute:@"informative-text-alignment"]];
[_informativeLabel setLineBreakMode:CPLineBreakByWordWrapping];
informativeLabelWidth = CGRectGetWidth([[_window contentView] frame]) - inset.left - inset.right;
@@ -386,8 +404,8 @@ CPCriticalAlertStyle = 2;
if (!_accessoryView)
return;
var inset = [self currentValueForThemeAttribute:@"content-inset"],
defaultElementsMargin = [self currentValueForThemeAttribute:@"default-elements-margin"],
var inset = [_themeView currentValueForThemeAttribute:@"content-inset"],
defaultElementsMargin = [_themeView currentValueForThemeAttribute:@"default-elements-margin"],
accessoryViewWidth = CGRectGetWidth([[_window contentView] frame]) - inset.left - inset.right,
accessoryViewOriginY = CGRectGetMaxY([_informativeLabel frame]) + defaultElementsMargin;
@@ -403,16 +421,16 @@ CPCriticalAlertStyle = 2;
if (!_showSuppressionButton)
return;
var inset = [self currentValueForThemeAttribute:@"content-inset"],
suppressionViewXOffset = [self currentValueForThemeAttribute:@"suppression-button-x-offset"],
suppressionViewYOffset = [self currentValueForThemeAttribute:@"suppression-button-y-offset"],
defaultElementsMargin = [self currentValueForThemeAttribute:@"default-elements-margin"],
var inset = [_themeView currentValueForThemeAttribute:@"content-inset"],
suppressionViewXOffset = [_themeView currentValueForThemeAttribute:@"suppression-button-x-offset"],
suppressionViewYOffset = [_themeView currentValueForThemeAttribute:@"suppression-button-y-offset"],
defaultElementsMargin = [_themeView currentValueForThemeAttribute:@"default-elements-margin"],
suppressionButtonViewOriginY = CGRectGetMaxY([(_accessoryView || _informativeLabel) frame]) + defaultElementsMargin + suppressionViewYOffset;
[_suppressionButton setTextColor:[self currentValueForThemeAttribute:@"suppression-button-text-color"]];
[_suppressionButton setFont:[self currentValueForThemeAttribute:@"suppression-button-text-font"]];
[_suppressionButton setTextShadowColor:[self currentValueForThemeAttribute:@"suppression-button-text-shadow-color"]];
[_suppressionButton setTextShadowOffset:[self currentValueForThemeAttribute:@"suppression-button-text-shadow-offset"]];
[_suppressionButton setTextColor:[_themeView currentValueForThemeAttribute:@"suppression-button-text-color"]];
[_suppressionButton setFont:[_themeView currentValueForThemeAttribute:@"suppression-button-text-font"]];
[_suppressionButton setTextShadowColor:[_themeView currentValueForThemeAttribute:@"suppression-button-text-shadow-color"]];
[_suppressionButton setTextShadowOffset:[_themeView currentValueForThemeAttribute:@"suppression-button-text-shadow-offset"]];
[_suppressionButton sizeToFit];
[_suppressionButton setFrameOrigin:CGPointMake(inset.left + suppressionViewXOffset, suppressionButtonViewOriginY)];
@@ -424,12 +442,12 @@ CPCriticalAlertStyle = 2;
*/
- (CGSize)_layoutButtonsFromView:(CPView)lastView
{
var inset = [self currentValueForThemeAttribute:@"content-inset"],
minimumSize = [self currentValueForThemeAttribute:@"size"],
buttonOffset = [self currentValueForThemeAttribute:@"button-offset"],
helpLeftOffset = [self currentValueForThemeAttribute:@"help-image-left-offset"],
var inset = [_themeView currentValueForThemeAttribute:@"content-inset"],
minimumSize = [_themeView currentValueForThemeAttribute:@"size"],
buttonOffset = [_themeView currentValueForThemeAttribute:@"button-offset"],
helpLeftOffset = [_themeView currentValueForThemeAttribute:@"help-image-left-offset"],
aRepresentativeButton = [_buttons objectAtIndex:0],
defaultElementsMargin = [self currentValueForThemeAttribute:@"default-elements-margin"],
defaultElementsMargin = [_themeView currentValueForThemeAttribute:@"default-elements-margin"],
panelSize = [[_window contentView] frame].size,
buttonsOriginY,
offsetX;
@@ -461,8 +479,8 @@ CPCriticalAlertStyle = 2;
if (_showHelp)
{
var helpImage = [self currentValueForThemeAttribute:@"help-image"],
helpImagePressed = [self currentValueForThemeAttribute:@"help-image-pressed"],
var helpImage = [_themeView currentValueForThemeAttribute:@"help-image"],
helpImagePressed = [_themeView currentValueForThemeAttribute:@"help-image-pressed"],
helpImageSize = helpImage ? [helpImage size] : CGSizeMakeZero(),
helpFrame = CGRectMake(helpLeftOffset, buttonsOriginY, helpImageSize.width, helpImageSize.height);
@@ -487,7 +505,7 @@ CPCriticalAlertStyle = 2;
if (!_window)
[self _createWindowWithStyle:nil];
var iconOffset = [self currentValueForThemeAttribute:@"image-offset"],
var iconOffset = [_themeView currentValueForThemeAttribute:@"image-offset"],
theImage = _icon,
finalSize;
@@ -495,13 +513,13 @@ CPCriticalAlertStyle = 2;
switch (_alertStyle)
{
case CPWarningAlertStyle:
theImage = [self currentValueForThemeAttribute:@"warning-image"];
theImage = [_themeView currentValueForThemeAttribute:@"warning-image"];
break;
case CPInformationalAlertStyle:
theImage = [self currentValueForThemeAttribute:@"information-image"];
theImage = [_themeView currentValueForThemeAttribute:@"information-image"];
break;
case CPCriticalAlertStyle:
theImage = [self currentValueForThemeAttribute:@"error-image"];
theImage = [_themeView currentValueForThemeAttribute:@"error-image"];
break;
}
@@ -519,7 +537,7 @@ CPCriticalAlertStyle = 2;
if (_showSuppressionButton)
lastView = _suppressionButton;
else if (_accessoryView)
lastView = _accessoryView
lastView = _accessoryView;
finalSize = [self _layoutButtonsFromView:lastView];
if ([_window styleMask] & CPDocModalWindowMask)
@@ -592,7 +610,7 @@ CPCriticalAlertStyle = 2;
- (void)_createWindowWithStyle:(int)forceStyle
{
var frame = CGRectMakeZero();
frame.size = [self currentValueForThemeAttribute:@"size"];
frame.size = [_themeView currentValueForThemeAttribute:@"size"];
_window = [[CPWindow alloc] initWithContentRect:frame styleMask:forceStyle || _defaultWindowStyle];
[_window setLevel:CPStatusWindowLevel];
@@ -633,8 +651,8 @@ CPCriticalAlertStyle = 2;
{
if ([_window isSheet])
{
[CPApp endSheet:_window returnCode:[aSender tag]];
[_window orderOut:nil];
[CPApp endSheet:_window returnCode:[aSender tag]];
}
else
{
@@ -650,17 +668,19 @@ CPCriticalAlertStyle = 2;
*/
- (void)_alertDidEnd:(CPWindow)aWindow returnCode:(int)returnCode contextInfo:(id)contextInfo
{
if ([_delegate respondsToSelector:@selector(alertDidEnd:returnCode:)])
[_delegate alertDidEnd:self returnCode:returnCode];
if (_didEndSelector)
objj_msgSend(_modalDelegate, _didEndSelector, self, returnCode, contextInfo);
_modalDelegate = nil;
_didEndSelector = nil;
if ([_delegate respondsToSelector:@selector(alertDidEnd:returnCode:)])
[_delegate alertDidEnd:self returnCode:returnCode];
}
#pragma mark Theme Attributes
@end
@implementation _CPAlertThemeView : CPView
+ (CPString)defaultThemeClass
{
@@ -669,42 +689,63 @@ CPCriticalAlertStyle = 2;
+ (id)themeAttributes
{
return [CPDictionary dictionaryWithObjects:[CGSizeMake(400.0, 110.0), CGInsetMake(15, 15, 15, 50), 6, 10,
CPJustifiedTextAlignment, [CPColor blackColor], [CPFont boldSystemFontOfSize:13.0], [CPNull null], CGSizeMakeZero(),
CPJustifiedTextAlignment, [CPColor blackColor], [CPFont systemFontOfSize:12.0], [CPNull null], CGSizeMakeZero(),
CGPointMake(15, 12),
[CPNull null],
[CPNull null],
[CPNull null],
[CPNull null],
[CPNull null],
[CPNull null],
0.0,
0.0,
3.0,
[CPColor blackColor],
[CPFont systemFontOfSize:12.0],
[CPNull null],
0.0
]
forKeys:[@"size", @"content-inset", @"informative-offset", @"button-offset",
@"message-text-alignment", @"message-text-color", @"message-text-font", @"message-text-shadow-color", @"message-text-shadow-offset",
@"informative-text-alignment", @"informative-text-color", @"informative-text-font", @"informative-text-shadow-color", @"informative-text-shadow-offset",
@"image-offset",
@"information-image",
@"warning-image",
@"error-image",
@"help-image",
@"help-image-left-offset",
@"help-image-pressed",
@"suppression-button-y-offset",
@"suppression-button-x-offset",
@"default-elements-margin",
@"suppression-button-text-color",
@"suppression-button-text-font",
@"suppression-button-text-shadow-color",
@"suppression-button-text-shadow-offset"
]];
return [CPDictionary dictionaryWithObjects:[
CGSizeMake(400.0, 110.0),
CGInsetMake(15, 15, 15, 50), 6, 10,
CPJustifiedTextAlignment,
[CPColor blackColor],
[CPFont boldSystemFontOfSize:13.0],
[CPNull null], CGSizeMakeZero(),
CPJustifiedTextAlignment,
[CPColor blackColor],
[CPFont systemFontOfSize:12.0],
[CPNull null], CGSizeMakeZero(),
CGPointMake(15, 12),
[CPNull null],
[CPNull null],
[CPNull null],
[CPNull null],
[CPNull null],
[CPNull null],
0.0,
0.0,
3.0,
[CPColor blackColor],
[CPFont systemFontOfSize:12.0],
[CPNull null],
0.0
]
forKeys:[
@"size",
@"content-inset",
@"informative-offset",
@"button-offset",
@"message-text-alignment",
@"message-text-color",
@"message-text-font",
@"message-text-shadow-color",
@"message-text-shadow-offset",
@"informative-text-alignment",
@"informative-text-color",
@"informative-text-font",
@"informative-text-shadow-color",
@"informative-text-shadow-offset",
@"image-offset",
@"information-image",
@"warning-image",
@"error-image",
@"help-image",
@"help-image-left-offset",
@"help-image-pressed",
@"suppression-button-y-offset",
@"suppression-button-x-offset",
@"default-elements-margin",
@"suppression-button-text-color",
@"suppression-button-text-font",
@"suppression-button-text-shadow-color",
@"suppression-button-text-shadow-offset"
]
];
}
@end
+33 -15
View File
@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#import "../Foundation/CPRange.h"
@import <Foundation/CPBundle.j>
@import "CPCompatibility.j"
@@ -84,6 +86,7 @@ CPRunContinuesResponse = -1002;
CPArray _eventListeners;
CPEvent _currentEvent;
CPWindow _lastMouseMoveWindow;
CPArray _windows;
CPWindow _keyWindow;
@@ -139,9 +142,7 @@ CPRunContinuesResponse = -1002;
{
_eventListeners = [];
_windows = [];
[_windows addObject:nil];
_windows = [[CPNull null]];
}
return self;
@@ -583,12 +584,14 @@ CPRunContinuesResponse = -1002;
_currentEvent = anEvent;
CPEventModifierFlags = [anEvent modifierFlags];
var theWindow = [anEvent window];
#if PLATFORM(DOM)
var willPropagate = [[[anEvent window] platformWindow] _willPropagateCurrentDOMEvent];
var willPropagate = [[theWindow platformWindow] _willPropagateCurrentDOMEvent];
// temporarily pretend we won't propagate the event. we'll restore the saved value later
// we do this outside the if so that changes user code might make in _handleKeyEquiv. are preserved
[[[anEvent window] platformWindow] _propagateCurrentDOMEvent:NO];
[[theWindow platformWindow] _propagateCurrentDOMEvent:NO];
#endif
// Check if this is a candidate for key equivalent...
@@ -600,7 +603,7 @@ CPRunContinuesResponse = -1002;
// Unconditionally propagate on these keys to solve browser copy paste bugs
if ((characters == "c" || characters == "x" || characters == "v") && (modifierFlags & CPPlatformActionKeyMask))
[[[anEvent window] platformWindow] _propagateCurrentDOMEvent:YES];
[[theWindow platformWindow] _propagateCurrentDOMEvent:YES];
#endif
return;
@@ -608,7 +611,7 @@ CPRunContinuesResponse = -1002;
#if PLATFORM(DOM)
// if we make it this far, then restore the original willPropagate value
[[[anEvent window] platformWindow] _propagateCurrentDOMEvent:willPropagate];
[[theWindow platformWindow] _propagateCurrentDOMEvent:willPropagate];
#endif
if (_eventListeners.length)
@@ -619,7 +622,16 @@ CPRunContinuesResponse = -1002;
return;
}
[[anEvent window] sendEvent:anEvent];
if ([anEvent type] == CPMouseMoved)
{
if (theWindow !== _lastMouseMoveWindow)
[_lastMouseMoveWindow _mouseExitedResizeRect];
_lastMouseMoveWindow = theWindow;
}
if (theWindow)
[theWindow sendEvent:anEvent];
}
/*!
@@ -655,6 +667,10 @@ CPRunContinuesResponse = -1002;
*/
- (CPWindow)windowWithWindowNumber:(int)aWindowNumber
{
// Never allow _windows[0] to be returned - it's an internal CPNull placeholder.
if (!aWindowNumber)
return nil;
return _windows[aWindowNumber];
}
@@ -663,7 +679,8 @@ CPRunContinuesResponse = -1002;
*/
- (CPArray)windows
{
return _windows;
// Return all windows, but not the CPNull placeholder in _windows[0].
return [_windows subarrayWithRange:_CPMakeRange(1, [_windows count] - 1)];
}
/*!
@@ -953,6 +970,7 @@ CPRunContinuesResponse = -1002;
[aWindow orderFront:self];
[aSheet setPlatformWindow:[aWindow platformWindow]];
}
[aWindow _attachSheet:aSheet modalDelegate:aModalDelegate didEndSelector:aDidEndSelector contextInfo:aContextInfo];
}
@@ -1042,9 +1060,9 @@ CPRunContinuesResponse = -1002;
if (!args || args.length == 0)
{
_args = [];
#if PLATFORM(DOM)
window.location.hash = @"#";
#endif
// Don't use if PLATFORM(DOM) here - the unit test fakes window.location so we should play along.
if (window && window.location)
window.location.hash = @"#";
return;
}
@@ -1059,9 +1077,9 @@ CPRunContinuesResponse = -1002;
var hash = [toEncode componentsJoinedByString:@"/"];
#if PLATFORM(DOM)
window.location.hash = @"#" + hash;
#endif
// Don't use if PLATFORM(DOM) here - the unit test fakes window.location so we should play along.
if (window && window.location)
window.location.hash = @"#" + hash;
}
- (void)_reloadArguments
+22 -3
View File
@@ -310,11 +310,18 @@ function CPBrowserStyleProperty(aProperty)
break;
default:
var prefixes = ["Webkit", "Moz", "O", "ms"],
capProperty = [aProperty capitalizedString];
strippedProperty = aProperty.split('-').join(' '),
capProperty = [strippedProperty capitalizedString].split(' ').join('');
for (var i = 0; i < prefixes.length; i++)
{
if (prefixes[i] + capProperty in testElement.style)
// First check if the property is already valid without being formatted, otherwise try the capitalized property
if (prefixes[i] + aProperty in testElement.style)
{
r = prefixes[i] + aProperty;
break;
}
else if (prefixes[i] + capProperty in testElement.style)
{
r = prefixes[i] + capProperty;
break;
@@ -352,9 +359,21 @@ function CPBrowserCSSProperty(aProperty)
{
if (browserProperty.substring(0, prefix.length) == prefix)
{
return prefixes[prefix] + browserProperty.substring(prefix.length).toLowerCase();
var browserPropertyWithoutPrefix = browserProperty.substring(prefix.length),
parts = browserPropertyWithoutPrefix.match(/[A-Z][a-z]+/g);
// If there were any capitalized words in the browserProperty, insert a "-" between each one
if (parts && parts.length > 0)
browserPropertyWithoutPrefix = parts.join("-");
return prefixes[prefix] + browserPropertyWithoutPrefix.toLowerCase();
}
}
var parts = browserProperty.match(/[A-Z][a-z]+/g);
if (parts && parts.length > 0)
browserProperty = parts.join("-");
return browserProperty.toLowerCase();
}
+1 -1
View File
@@ -94,7 +94,7 @@
domain = "";
#if PLATFORM(DOM)
document.cookie = _cookieName+"="+value+expires+"; path=/"+domain;
document.cookie = _cookieName + "=" + value + expires + "; path=/" + domain;
#else
_cookieValue = value;
_expires = expires;
+85 -10
View File
@@ -25,7 +25,8 @@ Cursor support by browser:
var currentCursor = nil,
cursorStack = [],
cursors = {};
cursors = {},
ieCursorMap = {};
@implementation CPCursor : CPObject
{
@@ -36,6 +37,20 @@ var currentCursor = nil,
BOOL _isSetOnMouseExited @accessors(readwrite, getter=isSetOnMouseExited, setter=setOnMouseExited:);
}
+ (void)initialize
{
if (self !== CPCursor)
return;
// IE < 9 does not support some CSS cursors, we map them to supported ones
ieCursorMap = {
"ew-resize": "e-resize",
"ns-resize": "n-resize",
"nesw-resize": "ne-resize",
"nwse-resize": "nw-resize"
};
}
- (id)initWithCSSString:(CPString)aString
{
if (self = [super init])
@@ -44,23 +59,30 @@ var currentCursor = nil,
return self;
}
// hotspot is supported in CSS3 (but not IE).
- (id)initWithImage:(CPImage)image hotSpot:(CPPoint)hotSpot
/*!
Init a cursor with the given image and hotspot.
hotspot is supported in CSS3 (but not IE).
*/
- (id)initWithImage:(CPImage)image hotSpot:(CGPoint)hotSpot
{
_hotSpot = hotSpot;
_image = image;
return [self initWithCSSString:"url(" + [_image filename] + ")" + hotSpot.x + " " + hotSpot.y + ", auto"];
}
// foregroundColor and backgroundColor are ignored in Cocoa as well. See http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSCursor_Class/Reference/Reference.html
- (id)initWithImage:(CPImage)image foregroundColorHint:(CPColor)foregroundColor backgroundColorHint:(CPColor)backgroundColor hotSpot:(CPPoint)aHotSpot
/*!
Init a cursor with the given image and hotspot. This is provided
for compliance with Cocoa. Note that foregroundColor and backgroundColor are ignored
(as they are in Cocoa). See http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSCursor_Class/Reference/Reference.html
*/
- (id)initWithImage:(CPImage)image foregroundColorHint:(CPColor)foregroundColor backgroundColorHint:(CPColor)backgroundColor hotSpot:(CGPoint)aHotSpot
{
return [self initWithImage:image hotSpot:hotSpot];
}
+ (void)hide
{
[self _setCursorCSS:"none"]; // Not supported in IE
[self _setCursorCSS:@"none"]; // Not supported in IE < 9
}
+ (void)unhide
@@ -121,6 +143,7 @@ var currentCursor = nil,
{
#if PLATFORM(DOM)
var platformWindows = [[CPPlatformWindow visiblePlatformWindows] allObjects];
for (var i = 0, count = [platformWindows count]; i < count; i++)
platformWindows[i]._DOMBodyElement.style.cursor = aString;
#endif
@@ -130,22 +153,34 @@ var currentCursor = nil,
+ (CPCursor)_systemCursorWithName:(CPString)cursorName cssString:(CPString)aString hasImage:(BOOL)doesHaveImage
{
var cursor = cursors[cursorName];
if (typeof cursor === 'undefined')
if (typeof cursor === "undefined")
{
var cssString;
if (doesHaveImage)
cssString = @"url(" + [[CPBundle bundleForClass:self] resourcePath] + @"/CPCursor/" + cursorName + ".cur), " + aString;
cssString = [CPString stringWithFormat:@"url(%@/CPCursor/%@.cur), %@", [[CPBundle bundleForClass:self] resourcePath], cursorName, aString];
else
cssString = aString
{
// IE <= 8 does not support some cursors, map them to supported cursors
var ieLessThan9 = CPBrowserIsEngine(CPInternetExplorerBrowserEngine) && !CPFeatureIsCompatible(CPHTMLCanvasFeature);
if (ieLessThan9)
cssString = ieCursorMap[aString] || aString;
else
cssString = aString;
}
cursor = [[CPCursor alloc] initWithCSSString:cssString];
cursors[cursorName] = cursor;
}
return cursor;
}
+ (CPCursor)arrowCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:"default" hasImage:NO];
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"default" hasImage:NO];
}
+ (CPCursor)crosshairCursor
@@ -163,6 +198,36 @@ var currentCursor = nil,
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"pointer" hasImage:NO];
}
+ (CPCursor)resizeNorthwestCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"nw-resize" hasImage:NO];
}
+ (CPCursor)resizeNorthwestSoutheastCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"nwse-resize" hasImage:NO];
}
+ (CPCursor)resizeNortheastCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"ne-resize" hasImage:NO];
}
+ (CPCursor)resizeNortheastSouthwestCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"nesw-resize" hasImage:NO];
}
+ (CPCursor)resizeSouthwestCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"sw-resize" hasImage:NO];
}
+ (CPCursor)resizeSoutheastCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"se-resize" hasImage:NO];
}
+ (CPCursor)resizeDownCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"s-resize" hasImage:NO];
@@ -188,11 +253,21 @@ var currentCursor = nil,
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"col-resize" hasImage:NO];
}
+ (CPCursor)resizeEastWestCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"ew-resize" hasImage:NO];
}
+ (CPCursor)resizeUpDownCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"row-resize" hasImage:NO];
}
+ (CPCursor)resizeNorthSouthCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"ns-resize" hasImage:NO];
}
+ (CPCursor)operationNotAllowedCursor
{
return [CPCursor _systemCursorWithName:CPStringFromSelector(_cmd) cssString:@"not-allowed" hasImage:NO];
+5
View File
@@ -114,4 +114,9 @@ CPDocModalWindowMask = 1 << 6;
return NO;
}
- (BOOL)canBecomeKeyWindow
{
return YES;
}
@end
@@ -3,6 +3,8 @@
* Copyright (c) 2011 Pear, Inc. All rights reserved.
*/
@import "CPPopUpButton.j"
var GRADIENT_START_COLOR = "#fcfcfc",
GRADIENT_END_COLOR = "#dfdfdf",
BORDER_COLOR = "#BDBDBD";
+7 -5
View File
@@ -115,13 +115,15 @@ CPSegmentSwitchTrackingMomentary = 2;
if (_selectedSegment >= _segments.length)
_selectedSegment = -1;
// Make space for/remove space used by dividers.
var thickness = [self currentValueForThemeAttribute:@"divider-thickness"],
delta = thickness * (dividersAfter - dividersBefore),
frame = [self frame];
frame = [self frame],
widthOfAllSegments = 0,
dividerExtraSpace = ([_segments count] - 1) * thickness;
if (delta)
[self setFrameSize:CGSizeMake(frame.size.width + delta, frame.size.height)];
for (var i = 0; i < [_segments count]; i++)
widthOfAllSegments += [_segments[i] width];
[self setFrameSize:CGSizeMake(widthOfAllSegments + dividerExtraSpace, frame.size.height)];
[self tileWithChangedSegment:0];
}
+84 -52
View File
@@ -46,13 +46,44 @@ var CPTextFieldDOMInputElement = nil,
CPTextFieldInputIsActive = NO,
CPTextFieldCachedSelectStartFunction = nil,
CPTextFieldCachedDragFunction = nil,
CPTextFieldBlurFunction = nil,
CPTextFieldBlurHandler = nil,
CPTextFieldInputFunction = nil;
#endif
var CPSecureTextFieldCharacter = "\u2022";
function CPTextFieldBlurFunction(anEvent, owner, domElement, inputElement, resigning, didBlurRef)
{
if (owner && domElement != inputElement.parentNode)
return;
if (!resigning && [[owner window] isKeyWindow])
{
/*
Browsers blur text fields when a click occurs anywhere outside the text field. That is normal for browsers, but in Cocoa the key view retains focus unless the click target accepts first responder. So if we lost focus but were not told to resign and our window is still key, restore focus.
*/
window.setTimeout(function()
{
inputElement.focus();
}, 0.0);
}
CPTextFieldHandleBlur(anEvent, AT_REF(owner));
AT_DEREF(didBlurRef, YES);
return true;
}
function CPTextFieldHandleBlur(anEvent, ownerRef)
{
AT_DEREF(ownerRef, nil);
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
}
@implementation CPString (CPTextFieldAdditions)
/*!
@@ -188,28 +219,15 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
CPTextFieldDOMInputElement.style.background = "transparent";
CPTextFieldDOMInputElement.style.outline = "none";
CPTextFieldBlurFunction = function(anEvent)
CPTextFieldBlurHandler = function(anEvent)
{
if (CPTextFieldInputOwner && CPTextFieldInputOwner._DOMElement != CPTextFieldDOMInputElement.parentNode)
return;
if (!CPTextFieldInputResigning)
{
[[CPTextFieldInputOwner window] makeFirstResponder:nil];
return;
}
CPTextFieldHandleBlur(anEvent, CPTextFieldDOMInputElement);
CPTextFieldInputDidBlur = YES;
return true;
};
CPTextFieldHandleBlur = function(anEvent)
{
CPTextFieldInputOwner = nil;
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
return CPTextFieldBlurFunction(
anEvent,
CPTextFieldInputOwner,
CPTextFieldInputOwner._DOMElement,
CPTextFieldDOMInputElement,
CPTextFieldInputResigning,
AT_REF(CPTextFieldInputDidBlur));
};
if (CPFeatureIsCompatible(CPInputOnInputEventFeature))
@@ -219,9 +237,16 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
if (!CPTextFieldInputOwner)
return;
var cappEvent = [CPEvent keyEventWithType:CPKeyUp location:_CGPointMakeZero() modifierFlags:0
timestamp:[CPEvent currentTimestamp] windowNumber:[[CPApp keyWindow] windowNumber] context:nil
characters:nil charactersIgnoringModifiers:nil isARepeat:NO keyCode:nil];
var cappEvent = [CPEvent keyEventWithType:CPKeyUp
location:_CGPointMakeZero()
modifierFlags:0
timestamp:[CPEvent currentTimestamp]
windowNumber:[[CPApp keyWindow] windowNumber]
context:nil
characters:nil
charactersIgnoringModifiers:nil
isARepeat:NO
keyCode:nil];
[CPTextFieldInputOwner keyUp:cappEvent];
@@ -231,8 +256,8 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
CPTextFieldDOMInputElement.oninput = CPTextFieldInputFunction;
}
//FIXME make this not onblur
CPTextFieldDOMInputElement.onblur = CPTextFieldBlurFunction;
// FIXME make this not onblur
CPTextFieldDOMInputElement.onblur = CPTextFieldBlurHandler;
CPTextFieldDOMStandardInputElement = CPTextFieldDOMInputElement;
}
@@ -261,7 +286,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
CPTextFieldDOMPasswordInputElement.style.outline = "none";
CPTextFieldDOMPasswordInputElement.type = "password";
CPTextFieldDOMPasswordInputElement.onblur = CPTextFieldBlurFunction;
CPTextFieldDOMPasswordInputElement.onblur = CPTextFieldBlurHandler;
}
CPTextFieldDOMInputElement = CPTextFieldDOMPasswordInputElement;
@@ -494,12 +519,6 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
/* @ignore */
- (BOOL)becomeFirstResponder
{
#if PLATFORM(DOM)
// FIXME Why do we care about who's the first responder in a different window?
if (CPTextFieldInputOwner && [CPTextFieldInputOwner window] !== [self window])
[[CPTextFieldInputOwner window] makeFirstResponder:nil];
#endif
// As long as we are the first responder we need to monitor the key status of our window.
[self _setObserveWindowKeyNotifications:YES];
@@ -512,7 +531,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
}
/*!
A text field can be the first responder without necessarily being the focus of keyboard input. For example, it might be the first responder of window A but window B is the main and key window. It's important we don't put a focused input field into a text field in a non key window, even if that field is the first responder, because the key window might also have a first responder text field which the user will expect to receive keyboard input.
A text field can be the first responder without necessarily being the focus of keyboard input. For example, it might be the first responder of window A but window B is the main and key window. It's important we don't put a focused input field into a text field in a non-key window, even if that field is the first responder, because the key window might also have a first responder text field which the user will expect to receive keyboard input.
Since a first responder but non-key window text field can't receive input it should not even look like an active text field (Cocoa has a "slightly active" text field look it uses when another window is the key window, but Cappuccino doesn't today.)
*/
@@ -534,8 +553,10 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
element.value = _stringValue;
element.style.color = [[self currentValueForThemeAttribute:@"text-color"] cssString];
if (CPFeatureIsCompatible(CPInputSetFontOutsideOfDOM))
element.style.font = [font cssString];
element.style.zIndex = 1000;
switch ([self alignment])
@@ -571,35 +592,24 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
element.style.top = topPoint;
var left = _CGRectGetMinX(contentRect);
// If the browser has a built in left padding, compensate for it. We need the input text to be exactly on top of the original text.
if (CPFeatureIsCompatible(CPInput1PxLeftPadding))
left -= 1;
element.style.left = left + "px";
element.style.width = _CGRectGetWidth(contentRect) + "px";
element.style.height = ROUND(lineHeight) + "px";
element.style.lineHeight = ROUND(lineHeight) + "px";
element.style.verticalAlign = @"top";
element.style.verticalAlign = "top";
element.style.cursor = "auto";
_DOMElement.appendChild(element);
// The font change above doesn't work for some browsers if the element isn't already .appendChild'ed.
// The font change above doesn't work for some browsers if the element isn't already appendChild'ed.
if (!CPFeatureIsCompatible(CPInputSetFontOutsideOfDOM))
element.style.font = [font cssString];
window.setTimeout(function()
{
element.focus();
// Select the text if the textfield became first responder through keyboard interaction
if (!_willBecomeFirstResponderByClick)
[self _selectText:self immediately:YES];
_willBecomeFirstResponderByClick = NO;
[self textDidFocus:[CPNotification notificationWithName:CPTextFieldDidFocusNotification object:self userInfo:nil]];
CPTextFieldInputOwner = self;
}, 0.0);
[[[self window] platformWindow] _propagateCurrentDOMEvent:YES];
CPTextFieldInputIsActive = YES;
@@ -612,6 +622,28 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
[[self window] platformWindow]._DOMBodyElement.ondrag = function () {};
[[self window] platformWindow]._DOMBodyElement.onselectstart = function () {};
}
CPTextFieldInputOwner = self;
window.setTimeout(function()
{
/*
setTimeout handlers are not guaranteed to fire in the order they were initiated. This can cause a race condition when several windows with text fields are opened quickly, resulting in several instances of this timeout function being fired, perhaps out of order. So we have to check that by the time this function is fired, CPTextFieldInputOwner has not been changed to another text field in the meantime.
*/
if (CPTextFieldInputOwner !== self)
return;
element.focus();
// Select the text if the textfield became first responder through keyboard interaction
if (!_willBecomeFirstResponderByClick)
[self _selectText:self immediately:YES];
_willBecomeFirstResponderByClick = NO;
[self textDidFocus:[CPNotification notificationWithName:CPTextFieldDidFocusNotification object:self userInfo:nil]];
}, 0.0);
#endif
}
@@ -677,7 +709,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
element.blur();
if (!CPTextFieldInputDidBlur)
CPTextFieldBlurFunction();
CPTextFieldBlurHandler();
CPTextFieldInputDidBlur = NO;
CPTextFieldInputResigning = NO;
+13 -40
View File
@@ -21,6 +21,7 @@
*/
#import "../Foundation/CPRange.h"
#import "../Foundation/Ref.h"
@import <Foundation/CPCharacterSet.j>
@import <Foundation/CPIndexSet.j>
@@ -47,7 +48,7 @@ var CPTokenFieldDOMInputElement = nil,
CPTokenFieldCachedDragFunction = nil,
CPTokenFieldFocusInput = NO,
CPTokenFieldBlurFunction = nil;
CPTokenFieldBlurHandler = nil;
#endif
@@ -71,7 +72,6 @@ var CPScrollDestinationNone = 0,
CPEvent _mouseDownEvent;
BOOL _preventResign;
BOOL _shouldNotifyTarget;
}
@@ -390,9 +390,6 @@ var CPScrollDestinationNone = 0,
- (BOOL)resignFirstResponder
{
if (_preventResign)
return NO;
[self _autocomplete];
// From CPTextField superclass.
@@ -427,7 +424,7 @@ var CPScrollDestinationNone = 0,
element.blur();
if (!CPTokenFieldInputDidBlur)
CPTokenFieldBlurFunction();
CPTokenFieldBlurHandler();
CPTokenFieldInputDidBlur = NO;
CPTokenFieldInputResigning = NO;
@@ -451,7 +448,6 @@ var CPScrollDestinationNone = 0,
- (void)mouseDown:(CPEvent)anEvent
{
_preventResign = YES;
_mouseDownEvent = anEvent;
[self _selectToken:nil byExtendingSelection:NO];
@@ -461,13 +457,11 @@ var CPScrollDestinationNone = 0,
- (void)mouseUp:(CPEvent)anEvent
{
_preventResign = NO;
_mouseDownEvent = nil;
}
- (void)_mouseDownOnToken:(_CPTokenFieldToken)aToken withEvent:(CPEvent)anEvent
{
_preventResign = YES;
_mouseDownEvent = anEvent;
}
@@ -480,8 +474,6 @@ var CPScrollDestinationNone = 0,
// Snap to the token if it's only half visible due to mouse wheel scrolling.
_shouldScrollTo = aToken;
}
_preventResign = NO;
}
// ===========
@@ -652,38 +644,19 @@ var CPScrollDestinationNone = 0,
CPTokenFieldDOMInputElement.style.background = "transparent";
CPTokenFieldDOMInputElement.style.outline = "none";
CPTokenFieldBlurFunction = function(anEvent)
CPTokenFieldBlurHandler = function(anEvent)
{
if (CPTokenFieldInputOwner && [CPTokenFieldInputOwner._tokenScrollView documentView]._DOMElement != CPTokenFieldDOMInputElement.parentNode)
return;
if (CPTokenFieldInputOwner && CPTokenFieldInputOwner._preventResign)
return false;
if (!CPTokenFieldInputResigning && [[CPTokenFieldInputOwner window] isKeyWindow])
{
// If we lost focus somehow but we're not resigning and we're still in the key window, we'll need to take it back.
window.setTimeout(function()
{
CPTokenFieldDOMInputElement.focus();
}, 0.0);
}
CPTokenFieldHandleBlur(anEvent, CPTokenFieldDOMInputElement);
CPTokenFieldInputDidBlur = YES;
return true;
return CPTextFieldBlurFunction(
anEvent,
CPTokenFieldInputOwner,
[CPTokenFieldInputOwner._tokenScrollView documentView]._DOMElement,
CPTokenFieldDOMInputElement,
CPTokenFieldInputResigning,
AT_REF(CPTokenFieldInputDidBlur));
};
CPTokenFieldHandleBlur = function(anEvent)
{
CPTokenFieldInputOwner = nil;
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
};
//FIXME make this not onblur
CPTokenFieldDOMInputElement.onblur = CPTokenFieldBlurFunction;
// FIXME make this not onblur
CPTokenFieldDOMInputElement.onblur = CPTokenFieldBlurHandler;
CPTokenFieldDOMStandardInputElement = CPTokenFieldDOMInputElement;
}
+21
View File
@@ -1,3 +1,24 @@
/*
* CPTreeNode.j
* AppKit
*
* Created by Francisco Tolmasky.
* Copyright 2009, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@import <Foundation/CPObject.j>
@import <Foundation/CPIndexPath.j>
+2 -2
View File
@@ -463,7 +463,7 @@ var CPViewFlags = { },
// We will have to adjust the z-index of all views starting at this index.
var count = _subviews.length;
// dirty the key view loop, in case the window wants to auto recalculate it
// Dirty the key view loop, in case the window wants to auto recalculate it
[[self window] _dirtyKeyViewLoop];
// If this is already one of our subviews, remove it.
@@ -544,7 +544,7 @@ var CPViewFlags = { },
if (!_superview)
return;
// dirty the key view loop, in case the window wants to auto recalculate it
// Dirty the key view loop, in case the window wants to auto recalculate it
[[self window] _dirtyKeyViewLoop];
[_superview willRemoveSubview:self];
+407 -258
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -334,13 +334,13 @@ var STANDARD_GRADIENT_HEIGHT = 41.0;
[self _updateCloseButton];
}
- (void)mouseDown:(CPEvent)anEvent
- (BOOL)couldBeMoveEvent:(CPEvent)anEvent
{
if (![_headView isHidden])
if (CGRectContainsPoint([_headView frame], [self convertPoint:[anEvent locationInWindow] fromView:nil]))
return [self trackMoveWithEvent:anEvent];
return YES;
[super mouseDown:anEvent];
return [super couldBeMoveEvent:anEvent];
}
- (void)_enableSheet:(BOOL)enable
+356 -36
View File
@@ -24,7 +24,18 @@
@import "CPView.j"
var _CPWindowViewResizeIndicatorImage = nil;
var _CPWindowViewResizeIndicatorImage = nil,
_CPWindowViewCornerResizeRectWidth = 10,
_CPWindowViewResizeRegionNone = -1,
_CPWindowViewResizeRegionTopLeft = 0,
_CPWindowViewResizeRegionTop = 1,
_CPWindowViewResizeRegionTopRight = 2,
_CPWindowViewResizeRegionRight = 3,
_CPWindowViewResizeRegionBottomRight = 4,
_CPWindowViewResizeRegionBottom = 5,
_CPWindowViewResizeRegionBottomLeft = 6,
_CPWindowViewResizeRegionLeft = 7;
@implementation _CPWindowView : CPView
{
@@ -38,6 +49,7 @@ var _CPWindowViewResizeIndicatorImage = nil;
// BOOL _isAnimatingToolbar;
CGRect _resizeFrame;
int _resizeRegion;
CGPoint _mouseDraggedPoint;
CGRect _cachedScreenFrame;
@@ -50,17 +62,17 @@ var _CPWindowViewResizeIndicatorImage = nil;
if (self !== [_CPWindowView class])
return;
_CPWindowViewResizeIndicatorImage = [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[CPWindow class]] pathForResource:@"_CPWindowView/_CPWindowViewResizeIndicator.png"] size:CGSizeMake(12.0, 12.0)];
_CPWindowViewResizeIndicatorImage = [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[CPWindow class]] pathForResource:@"_CPWindowView/_CPWindowViewResizeIndicator.png"] size:_CGSizeMake(12.0, 12.0)];
}
+ (CGRect)contentRectForFrameRect:(CGRect)aFrameRect
{
return CGRectMakeCopy(aFrameRect);
return _CGRectMakeCopy(aFrameRect);
}
+ (CGRect)frameRectForContentRect:(CGRect)aContentRect
{
return CGRectMakeCopy(aContentRect);
return _CGRectMakeCopy(aContentRect);
}
+ (CPString)defaultThemeClass
@@ -81,7 +93,7 @@ var _CPWindowViewResizeIndicatorImage = nil;
if ([theToolbar isVisible])
{
var toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]);
var toolbarHeight = _CGRectGetHeight([[theToolbar _toolbarView] frame]);
contentRect.origin.y += toolbarHeight;
contentRect.size.height -= toolbarHeight;
@@ -97,7 +109,7 @@ var _CPWindowViewResizeIndicatorImage = nil;
if ([theToolbar isVisible])
{
var toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]);
var toolbarHeight = _CGRectGetHeight([[theToolbar _toolbarView] frame]);
frameRect.origin.y -= toolbarHeight;
frameRect.size.height += toolbarHeight;
@@ -113,8 +125,8 @@ var _CPWindowViewResizeIndicatorImage = nil;
if (self)
{
_styleMask = aStyleMask;
_resizeIndicatorOffset = CGSizeMakeZero();
_toolbarOffset = CGSizeMakeZero();
_resizeIndicatorOffset = _CGSizeMakeZero();
_toolbarOffset = _CGSizeMakeZero();
}
return self;
@@ -135,48 +147,356 @@ var _CPWindowViewResizeIndicatorImage = nil;
- (void)mouseDown:(CPEvent)anEvent
{
var theWindow = [self window];
var theWindow = [self window],
couldResize = _styleMask & CPResizableWindowMask;
if ((_styleMask & CPResizableWindowMask) && _resizeIndicator)
couldResize = couldResize && (
(CPWindowResizeStyle === CPWindowResizeStyleModern) ||
((CPWindowResizeStyle === CPWindowResizeStyleLegacy) && _resizeIndicator));
if (couldResize)
{
// FIXME: This should be better
var frame = [_resizeIndicator frame];
var theWindow = [self window],
windowFrame = [theWindow frame],
shouldResize = NO;
if (CGRectContainsPoint(frame, [self convertPoint:[anEvent locationInWindow] fromView:nil]))
if (CPWindowResizeStyle === CPWindowResizeStyleModern)
{
var globalPoint = [theWindow convertBaseToGlobal:[anEvent locationInWindow]];
_resizeRegion = [self resizeRegionForPoint:globalPoint];
shouldResize = _resizeRegion !== _CPWindowViewResizeRegionNone;
}
else
{
// Extend the resize frame to the edge of the window frame
var resizeFrame = [_resizeIndicator frame];
resizeFrame.size.width = _CGRectGetWidth(windowFrame) - _CGRectGetMinX(resizeFrame);
resizeFrame.size.height = _CGRectGetHeight(windowFrame) - _CGRectGetMinY(resizeFrame);
var localPoint = [self convertPoint:[anEvent locationInWindow] fromView:nil];
shouldResize = CGRectContainsPoint(resizeFrame, localPoint);
// When in legacy mode, the only possible resize region is lower right
_resizeRegion = shouldResize ? _CPWindowViewResizeRegionBottomRight : _CPWindowViewResizeRegionNone;
}
if (shouldResize)
return [self trackResizeWithEvent:anEvent];
}
if ([theWindow isMovable] && [theWindow isMovableByWindowBackground])
if ([self couldBeMoveEvent:anEvent])
[self trackMoveWithEvent:anEvent];
else
[super mouseDown:anEvent];
}
- (BOOL)couldBeMoveEvent:(CPEvent)anEvent
{
var theWindow = [self window];
return [theWindow isMovable] && [theWindow isMovableByWindowBackground];
}
/*
aPoint should be in global coordinates
*/
- (int)resizeRegionForPoint:(CGPoint)aPoint
{
/*
If the window is fixed width (minSize.width === maxSize.width), there
are 2 possible resize rects: top and bottom.
If the window is fixed height (minSize.height === maxSize.height), there
are 2 possible resize rects: left and right.
Otherwise there are 8 possible resize rects, 1 for each side and 1 for each corner.
The four corner rects are the same size, and the top/bottom and left/right
rects are the same size. So to save calculations, we can just create
3 rects and move them around to do hit testing. Start with the corners
and then do left/right and top/bottom.
*/
var wind = [self window],
frame = [wind frame],
rect,
minSize = [wind minSize],
maxSize = [wind maxSize],
isFixedWidth = minSize.width === maxSize.width,
isFixedHeight = minSize.height === maxSize.height;
if (isFixedWidth)
{
rect = _CGRectMake(frame.origin.x - CPWindowResizeSlop,
frame.origin.y - CPWindowResizeSlop,
frame.size.width + (CPWindowResizeSlop * 2),
CPWindowResizeSlop * 2);
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionTop;
rect.origin.y = _CGRectGetMaxY(frame) - CPWindowResizeSlop;
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionBottom;
}
else if (isFixedHeight)
{
rect = _CGRectMake(frame.origin.x - CPWindowResizeSlop,
frame.origin.y - CPWindowResizeSlop,
CPWindowResizeSlop * 2,
frame.size.height + (CPWindowResizeSlop * 2));
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionLeft;
rect.origin.x = _CGRectGetMaxX(frame) - CPWindowResizeSlop;
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionRight;
}
else
{
rect = _CGRectMake(frame.origin.x - CPWindowResizeSlop,
frame.origin.y - CPWindowResizeSlop,
_CPWindowViewCornerResizeRectWidth + CPWindowResizeSlop,
_CPWindowViewCornerResizeRectWidth + CPWindowResizeSlop);
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionTopLeft;
rect.origin.x = _CGRectGetMaxX(frame) - _CPWindowViewCornerResizeRectWidth;
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionTopRight;
rect.origin.y = _CGRectGetMaxY(frame) - _CPWindowViewCornerResizeRectWidth;
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionBottomRight;
rect.origin.x = frame.origin.x - CPWindowResizeSlop;
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionBottomLeft;
rect = _CGRectMake(rect.origin.x,
frame.origin.y + _CPWindowViewCornerResizeRectWidth,
CPWindowResizeSlop * 2,
_CGRectGetHeight(frame) - (_CPWindowViewCornerResizeRectWidth * 2));
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionLeft;
rect.origin.x = _CGRectGetMaxX(frame) - CPWindowResizeSlop;
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionRight;
rect = _CGRectMake(frame.origin.x + _CPWindowViewCornerResizeRectWidth,
frame.origin.y - CPWindowResizeSlop,
_CGRectGetWidth(frame) - (_CPWindowViewCornerResizeRectWidth * 2),
CPWindowResizeSlop * 2);
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionTop;
rect.origin.y = _CGRectGetMaxY(frame) - CPWindowResizeSlop;
if (_CGRectContainsPoint(rect, aPoint))
return _CPWindowViewResizeRegionBottom;
}
return _CPWindowViewResizeRegionNone;
}
/*
aPoint is in window coordinates
*/
- (void)setCursorForLocation:(CGPoint)aPoint resizing:(BOOL)isResizing
{
var theWindow = [self window];
if ([theWindow isFullPlatformWindow] ||
!(_styleMask & CPResizableWindowMask) ||
(CPWindowResizeStyle !== CPWindowResizeStyleModern))
return;
var globalPoint = [theWindow convertBaseToGlobal:aPoint],
resizeRegion = isResizing ? _resizeRegion : [self resizeRegionForPoint:globalPoint],
minSize = nil,
maxSize = nil,
frameSize;
if (resizeRegion !== _CPWindowViewResizeRegionNone)
{
minSize = [theWindow minSize];
maxSize = [theWindow maxSize];
frameSize = [theWindow frame].size;
}
switch (resizeRegion)
{
case _CPWindowViewResizeRegionTopLeft:
if (minSize && _CGSizeEqualToSize(frameSize, minSize))
[[CPCursor resizeNorthwestCursor] set];
else if (maxSize && _CGSizeEqualToSize(frameSize, maxSize))
[[CPCursor resizeSoutheastCursor] set];
else
[[CPCursor resizeNorthwestSoutheastCursor] set];
break;
case _CPWindowViewResizeRegionTop:
if (minSize && (frameSize.height === minSize.height))
[[CPCursor resizeUpCursor] set];
else if (maxSize && (frameSize.height === maxSize.height))
[[CPCursor resizeDownCursor] set];
else if ([CPMenu menuBarVisible] && (_CGRectGetMinY([theWindow frame]) <= [CPMenu menuBarHeight]))
[[CPCursor resizeDownCursor] set];
else
[[CPCursor resizeNorthSouthCursor] set];
break;
case _CPWindowViewResizeRegionTopRight:
if (minSize && _CGSizeEqualToSize(frameSize, minSize))
[[CPCursor resizeNortheastCursor] set];
else if (maxSize && _CGSizeEqualToSize(frameSize, maxSize))
[[CPCursor resizeSouthwestCursor] set];
else
[[CPCursor resizeNortheastSouthwestCursor] set];
break;
case _CPWindowViewResizeRegionRight:
if (minSize && (frameSize.width === minSize.width))
[[CPCursor resizeRightCursor] set];
else if (maxSize && (frameSize.width === maxSize.width))
[[CPCursor resizeLeftCursor] set];
else
[[CPCursor resizeEastWestCursor] set];
break;
case _CPWindowViewResizeRegionBottomRight:
if (minSize && _CGSizeEqualToSize(frameSize, minSize))
[[CPCursor resizeSoutheastCursor] set];
else if (maxSize && _CGSizeEqualToSize(frameSize, maxSize))
[[CPCursor resizeNorthwestCursor] set];
else
[[CPCursor resizeNorthwestSoutheastCursor] set];
break;
case _CPWindowViewResizeRegionBottom:
if (minSize && (frameSize.height === minSize.height))
[[CPCursor resizeDownCursor] set];
else if (maxSize && (frameSize.height === maxSize.height))
[[CPCursor resizeUpCursor] set];
else
[[CPCursor resizeNorthSouthCursor] set];
break;
case _CPWindowViewResizeRegionBottomLeft:
if (minSize && _CGSizeEqualToSize(frameSize, minSize))
[[CPCursor resizeSouthwestCursor] set];
else if (maxSize && _CGSizeEqualToSize(frameSize, maxSize))
[[CPCursor resizeNortheastCursor] set];
else
[[CPCursor resizeNortheastSouthwestCursor] set];
break;
case _CPWindowViewResizeRegionLeft:
if (minSize && (frameSize.width === minSize.width))
[[CPCursor resizeLeftCursor] set];
else if (maxSize && (frameSize.width === maxSize.width))
[[CPCursor resizeRightCursor] set];
else
[[CPCursor resizeEastWestCursor] set];
break;
default:
[[CPCursor arrowCursor] set];
}
}
- (void)trackResizeWithEvent:(CPEvent)anEvent
{
var location = [anEvent locationInWindow],
type = [anEvent type];
var type = [anEvent type];
if (type === CPLeftMouseUp)
return;
var theWindow = [self window];
var location = [anEvent locationInWindow],
theWindow = [self window],
globalLocation = [theWindow convertBaseToGlobal:location],
frame = [theWindow frame];
if (type === CPLeftMouseDown)
{
var frame = [theWindow frame];
_resizeFrame = CGRectMake(location.x, location.y, CGRectGetWidth(frame), CGRectGetHeight(frame));
_mouseDraggedPoint = _CGPointMakeCopy(globalLocation);
_resizeFrame = _CGRectMakeCopy(frame);
}
else if (type === CPLeftMouseDragged)
{
var newSize = CGSizeMake(CGRectGetWidth(_resizeFrame) + location.x - CGRectGetMinX(_resizeFrame), CGRectGetHeight(_resizeFrame) + location.y - CGRectGetMinY(_resizeFrame));
var diffX = globalLocation.x - _mouseDraggedPoint.x,
diffY = globalLocation.y - _mouseDraggedPoint.y,
newX = _CGRectGetMinX(_resizeFrame),
newY = _CGRectGetMinY(_resizeFrame),
newWidth = _CGRectGetWidth(_resizeFrame),
newHeight = _CGRectGetHeight(_resizeFrame),
platformFrame = [[theWindow platformWindow] usableContentFrame],
minSize = [theWindow minSize],
maxSize = [theWindow maxSize];
if (theWindow._isSheet && theWindow._parentView && (theWindow._frame.size.width !== newSize.width))
// Calculate x and width first
switch (_resizeRegion)
{
case _CPWindowViewResizeRegionTopLeft:
case _CPWindowViewResizeRegionLeft:
case _CPWindowViewResizeRegionBottomLeft:
if (minSize && diffX > 0)
diffX = MIN(newWidth - minSize.width, diffX);
else if (maxSize && diffX < 0)
diffX = MAX(newWidth - maxSize.width, diffX);
newX += diffX,
newWidth -= diffX;
break;
case _CPWindowViewResizeRegionTopRight:
case _CPWindowViewResizeRegionRight:
case _CPWindowViewResizeRegionBottomRight:
newWidth += diffX;
break;
}
// Now calculate y and height
switch (_resizeRegion)
{
case _CPWindowViewResizeRegionTopLeft:
case _CPWindowViewResizeRegionTop:
case _CPWindowViewResizeRegionTopRight:
if (minSize && diffY > 0)
diffY = MIN(newHeight - minSize.height, diffY);
else if (maxSize && diffY < 0)
diffY = MAX(newHeight - maxSize.height, diffY);
newY += diffY,
newHeight -= diffY;
break;
case _CPWindowViewResizeRegionBottomLeft:
case _CPWindowViewResizeRegionBottom:
case _CPWindowViewResizeRegionBottomRight:
newHeight += diffY;
break;
}
if (theWindow._isSheet && theWindow._parentView && (frame.size.width !== newWidth))
[theWindow._parentView _setAttachedSheetFrameOrigin];
[theWindow setFrameSize:newSize];
// Constrain resize to fit within the platform window.
var newFrame = CGRectIntersection(_CGRectMake(newX, newY, newWidth, newHeight), platformFrame);
[theWindow setFrame:newFrame];
[self setCursorForLocation:location resizing:YES];
}
[CPApp setTarget:self selector:@selector(trackResizeWithEvent:) forNextEventMatchingMask:CPLeftMouseDraggedMask | CPLeftMouseUpMask untilDate:nil inMode:nil dequeue:YES];
@@ -198,10 +518,10 @@ var _CPWindowViewResizeIndicatorImage = nil;
if ([CPMenu menuBarVisible])
minPointY = [[CPApp mainMenu] menuBarHeight];
var restrictedPoint = CGPointMake(0, 0);
var restrictedPoint = _CGPointMake(0, 0);
restrictedPoint.x = MIN(MAX(aPoint.x, -_frame.size.width + 4.0), CGRectGetMaxX(visibleFrame) - 4.0);
restrictedPoint.y = MIN(MAX(aPoint.y, minPointY), CGRectGetMaxY(visibleFrame) - 8.0);
restrictedPoint.x = MIN(MAX(aPoint.x, -_frame.size.width + 4.0), _CGRectGetMaxX(visibleFrame) - 4.0);
restrictedPoint.y = MIN(MAX(aPoint.y, minPointY), _CGRectGetMaxY(visibleFrame) - 8.0);
return restrictedPoint;
}
@@ -228,8 +548,8 @@ var _CPWindowViewResizeIndicatorImage = nil;
var theWindow = [self window],
frame = [theWindow frame],
location = [theWindow convertBaseToGlobal:[anEvent locationInWindow]],
origin = [self _pointWithinScreenFrame:CGPointMake(_CGRectGetMinX(frame) + (location.x - _mouseDraggedPoint.x),
_CGRectGetMinY(frame) + (location.y - _mouseDraggedPoint.y))];
origin = [self _pointWithinScreenFrame:_CGPointMake(_CGRectGetMinX(frame) + (location.x - _mouseDraggedPoint.x),
_CGRectGetMinY(frame) + (location.y - _mouseDraggedPoint.y))];
[theWindow setFrameOrigin:origin];
_mouseDraggedPoint = [self _pointWithinScreenFrame:location];
@@ -251,12 +571,12 @@ var _CPWindowViewResizeIndicatorImage = nil;
- (void)setShowsResizeIndicator:(BOOL)shouldShowResizeIndicator
{
if (shouldShowResizeIndicator)
if (shouldShowResizeIndicator && CPWindowResizeStyle === CPWindowResizeStyleLegacy)
{
var size = [_CPWindowViewResizeIndicatorImage size],
boundsSize = [self frame].size;
_resizeIndicator = [[CPImageView alloc] initWithFrame:CGRectMake(boundsSize.width - size.width - _resizeIndicatorOffset.width, boundsSize.height - size.height - _resizeIndicatorOffset.height, size.width, size.height)];
_resizeIndicator = [[CPImageView alloc] initWithFrame:_CGRectMake(boundsSize.width - size.width - _resizeIndicatorOffset.width, boundsSize.height - size.height - _resizeIndicatorOffset.height, size.width, size.height)];
[_resizeIndicator setImage:_CPWindowViewResizeIndicatorImage];
[_resizeIndicator setAutoresizingMask:CPViewMinXMargin | CPViewMinYMargin];
@@ -278,7 +598,7 @@ var _CPWindowViewResizeIndicatorImage = nil;
- (void)setResizeIndicatorOffset:(CGSize)anOffset
{
if (CGSizeEqualToSize(_resizeIndicatorOffset, anOffset))
if (_CGSizeEqualToSize(_resizeIndicatorOffset, anOffset))
return;
_resizeIndicatorOffset = anOffset;
@@ -289,7 +609,7 @@ var _CPWindowViewResizeIndicatorImage = nil;
var size = [_resizeIndicator frame].size,
boundsSize = [self frame].size;
[_resizeIndicator setFrameOrigin:CGPointMake(boundsSize.width - size.width - anOffset.width, boundsSize.height - size.height - anOffset.height)];
[_resizeIndicator setFrameOrigin:_CGPointMake(boundsSize.width - size.width - anOffset.width, boundsSize.height - size.height - anOffset.height)];
}
- (CGSize)resizeIndicatorOffset
@@ -325,7 +645,7 @@ var _CPWindowViewResizeIndicatorImage = nil;
if (!_toolbarView || [_toolbarView isHidden])
return [self toolbarOffset].height;
return CGRectGetMaxY([_toolbarView frame]);
return _CGRectGetMaxY([_toolbarView frame]);
}
- (_CPToolbarView)toolbarView
@@ -337,14 +657,14 @@ var _CPWindowViewResizeIndicatorImage = nil;
{
var theWindow = [self window],
bounds = [self bounds],
width = CGRectGetWidth(bounds);
width = _CGRectGetWidth(bounds);
if ([[theWindow toolbar] isVisible])
{
var toolbarView = [self toolbarView],
toolbarOffset = [self toolbarOffset];
[toolbarView setFrame:CGRectMake(toolbarOffset.width, toolbarOffset.height, width, CGRectGetHeight([toolbarView frame]))];
[toolbarView setFrame:_CGRectMake(toolbarOffset.width, toolbarOffset.height, width, _CGRectGetHeight([toolbarView frame]))];
}
if ([self showsResizeIndicator])
@@ -352,7 +672,7 @@ var _CPWindowViewResizeIndicatorImage = nil;
var size = [_resizeIndicator frame].size,
boundsSize = [self bounds].size;
[_resizeIndicator setFrameOrigin:CGPointMake(boundsSize.width - size.width - _resizeIndicatorOffset.width, boundsSize.height - size.height - _resizeIndicatorOffset.height)];
[_resizeIndicator setFrameOrigin:_CGPointMake(boundsSize.width - size.width - _resizeIndicatorOffset.width, boundsSize.height - size.height - _resizeIndicatorOffset.height)];
}
}
+1
View File
@@ -76,6 +76,7 @@ CPWindowPositionFlexibleTop = 1 << 22;
if (_minSize)
[theWindow setMinSize:_minSize];
if (_maxSize)
[theWindow setMaxSize:_maxSize];
+14 -3
View File
@@ -1177,7 +1177,6 @@ var resizeTimer = nil;
{
var type = _overriddenEventType || aDOMEvent.type;
// IE's event order is down, up, up, dblclick, so we have create these events artificially.
if (type === @"dblclick")
{
@@ -1208,7 +1207,7 @@ var resizeTimer = nil;
windowNumber = [_mouseDownWindow windowNumber];
else
{
var theWindow = [self hitTest:location];
var theWindow = [self _mouseHitTest:location];
if ((aDOMEvent.type === CPDOMEventMouseDown) && theWindow)
_mouseDownWindow = theWindow;
@@ -1308,6 +1307,7 @@ var resizeTimer = nil;
// if there are any tracking event listeners then show the event guard so we don't lose events to iframes
// TODO Actually check for tracking event listeners, not just any listener but _CPRunModalLoop.
var hasTrackingEventListener = NO;
for (var i = 0; i < CPApp._eventListeners.length; i++)
{
if (CPApp._eventListeners[i]._callback !== _CPRunModalLoop)
@@ -1316,6 +1316,7 @@ var resizeTimer = nil;
break;
}
}
_lastMouseEventLocation = location;
_DOMEventGuard.style.display = hasTrackingEventListener ? "" : "none";
@@ -1486,7 +1487,17 @@ var resizeTimer = nil;
return StopContextMenuDOMEventPropagation;
}
- (CPWindow)_mouseHitTest:(CPPoint)location
{
return [self _hitTest:location withTest:@selector(_isValidMousePoint:)]
}
- (CPWindow)hitTest:(CPPoint)location
{
return [self _hitTest:location withTest:@selector(containsPoint:)]
}
- (CPWindow)_hitTest:(CPPoint)location withTest:(SEL)aTest
{
if (self._only)
return self._only;
@@ -1505,7 +1516,7 @@ var resizeTimer = nil;
{
var candidateWindow = windows[windowCount];
if (!candidateWindow._ignoresMouseEvents && [candidateWindow containsPoint:location])
if (!candidateWindow._ignoresMouseEvents && [candidateWindow performSelector:aTest withObject:location])
theWindow = candidateWindow;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 409 B

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 B

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 B

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 B

After

Width:  |  Height:  |  Size: 72 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 B

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 B

After

Width:  |  Height:  |  Size: 71 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

+1 -1
View File
@@ -7,7 +7,7 @@
<key>CPBundleName</key>
<string>Aristo</string>
<key>BKLearnMoreURL</key>
<string>http://cappuccino.org/aristo</string>
<string>http://cappuccino-project.org/aristo</string>
<key>BKLearnMoreButtonTitle</key>
<string>Aristo Home Page</string>
<key>CPPrincipalClass</key>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 B

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 B

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 B

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 B

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 B

After

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 B

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 B

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 B

After

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 B

After

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B

After

Width:  |  Height:  |  Size: 95 B

Some files were not shown because too many files have changed in this diff Show More