Commit Graph
3041 Commits
Author SHA1 Message Date
Alexander Ljungberg b038b6baf6 Fixed: browser propagation control when not in browser.
This would lead to a `[CPPlatformWindow _willPropagateCurrentDOMEvent] unrecognized selector sent to instance` error if an event was sent in a non DOM environment.
2012-07-13 12:41:26 +01:00
Alexander Ljungberg 9abb79d191 Merge pull request #1612 from slevenbits/cpgeometry-improvements
Cpgeometry improvements
2012-07-13 11:37:02 +01:00
aparajita 629f12a851 Merge pull request #1543 from cacaodev/CPTableView-content-binding
Added support for using bindings with CPTableView content (as opposed to CPTableColumn value bindings)
2012-07-12 19:58:12 -07:00
aparajita e4de525a09 Merge pull request #1552 from mrcarlberg/outlineview_disclosure_width
Width of disclosure button determined by current disclosure control
2012-07-12 19:38:52 -07:00
aparajita 1a4e5a345d Merge pull request #1576 from ggsato/fixForOpeningExistingDocument
fixed needsUntitled evaluation

An untitled window will only open if ALL documents fail to load.
2012-07-12 19:29:07 -07:00
Alexander Ljungberg a4ae36929b Fix CPGeometry.j import.
CPGeometry.j is now in Foundation.
2012-07-13 01:29:01 +01:00
Alexander Ljungberg b9b98a39bb Avoid Foundation depending on AppKit.
CPGeometry.j and CGGeometry.j now share their implementation in two private API classes in the lower layer Foundation.
2012-07-13 01:28:38 +01:00
Alexander Ljungberg ae4b7cb58e Sort imports. 2012-07-13 01:26:14 +01:00
Aparajita Fishman 86b83338c0 CPRuleEditor fixes
- Fixed case where no format strings are specified in xib (which ends up being an empty string).

- Fixed case where malformed strings file would not match regex.

- General cleanup.
2012-07-12 10:16:49 -07:00
aparajita 7586af8f91 Merge pull request #1606 from slevenbits/system-font
Overhaul of system font handling

- System fonts now track the currently configured system font at runtime.
- You can specify CPFontCurrentSystemSize as a system font size to track the currently configured system font size at runtime.
- Theme fonts and nib2cib now determine face and size at runtime, there is no need to recompile if the system font is changed in Info.plist.
- All hard-coded references to 12.0 as a system font size have been replaced by the current system font size.
- Documented the font substitution algorithm and how to use custom fonts in the CPFont class docs.
- See Tests/Manual/FontEnhancementTest for a demo.
2012-07-12 07:01:30 -07:00
aparajita 7a6009f2e3 Merge pull request #1610 from slevenbits/text-clip-fix
Text clip fix


Currently when controls and text fields size to fit text, they use a to determine the correct height/width. Some browsers do not account for fractional pixels that arise from antialiasing. Cappuccino views must clip their contents, so the fractional pixels get clipped, and depending on the font this can be quite noticeable.

This patch adds 1 pixel when necessary to ensure no clipping occurs.
2012-07-11 09:19:46 -07:00
Vladimir Shevchenko a6d6fb1a1e CPGeometry moved to Foundation 2012-07-11 16:29:30 +07:00
Aparajita Fishman 4af061516c CPTableColumn -setHidden documentation was backwards. 2012-07-10 21:53:51 -07:00
Aparajita Fishman df9611cc2c Cleanup 2012-07-10 18:53:41 -07:00
Aparajita Fishman 99cd246ed8 Fix clipping of text due to fractional pixels 2012-07-10 18:08:33 -07:00
Aparajita Fishman ec4bfa00ee Per Cocoa, 0 size means create a static font in the current system font size. Added tests. 2012-07-10 16:40:44 -07:00
Aparajita Fishman 68c001e0c0 Don't attempt show CPScrollView, CPScroller or tooltips in the showcase, it doesn't work 2012-07-10 15:36:33 -07:00
Aparajita Fishman a3d4dc2f9a Wrap _DOMElement access in #if PLATFORM(DOM), cleanup 2012-07-09 22:19:26 -07:00
Aparajita Fishman 73fea44aa2 CPControl now archives/unarchives its formatter
This allows you to use a formatter with a table column's data view.
2012-07-09 21:30:09 -07:00
Aparajita Fishman 309463f15d Fixed parameter name 2012-07-09 16:50:31 -07:00
Aparajita Fishman 6b6f5d98e4 Overhaul of system font handling
- System fonts now track the currently configured system font at runtime.
- You can specify CPFontCurrentSystemSize as a system font size to track the currently configured system font size at runtime.
- Theme fonts and nib2cib now determine face and size at runtime, there is no need to recompile if the system font is changed in Info.plist.
- All hard-coded references to 12.0 as a system font size have been replaced by the current system font size.
2012-07-09 15:29:56 -07:00
Antoine Mercadal 2712a4d45c removed debug console.log 2012-07-09 15:05:03 -07:00
Antoine Mercadal d93fa98d1e Merge branch 'master' of https://github.com/cappuccino/cappuccino 2012-07-09 15:04:17 -07:00
Antoine Mercadal 63616cc50a fix enter key not working to select items in CPComboBox. With the help of @aparajita 2012-07-09 15:03:59 -07:00
Alexander Ljungberg eb643a2df8 Simplify code. 2012-07-09 20:31:29 +01:00
Alexander Ljungberg 81f958eee1 Merge pull request #1605 from slevenbits/colorwell-styling
`CPColorWell` and `CPColorPanel` updates.
2012-07-09 20:17:49 +01:00
Alexander Ljungberg 77a009c9a6 Highlighted and disabled looks for bordered CPColorWell. 2012-07-09 19:53:57 +01:00
Alexander Ljungberg b09908e6af Themable CPColorWell with Aristo look when bordered. 2012-07-09 19:18:46 +01:00
Antoine Mercadal ad74e93ea2 use CPPopUpMenuWindowLevel for _CPPopUpList's window level 2012-07-09 10:20:18 -07:00
Alexander Ljungberg 754311d2e2 More colour panel clean up. 2012-07-09 16:06:09 +01:00
Alexander Ljungberg f6514f3c64 Fix CPColorPanel errors and code style. 2012-07-09 15:57:24 +01:00
Alexander Ljungberg f398185aad CGRectInsetByInset geometry function.
This operation appears again and again in Cappuccino.
2012-07-09 15:44:13 +01:00
Alexander Ljungberg 4390bea31f Simplify CPColorWell drawing and mouse handling.
Use standard CPControl mouse handling and highlighting.

Switch to setNeedsLayout based drawing and hook up first themed property.
2012-07-09 13:01:44 +01:00
Alexander Ljungberg 660c98d6e5 Use theme system for CPColorWell bordered state.
This is more consistent with the rest of Cappuccino and prepares for theming support.
2012-07-09 12:20:47 +01:00
Alexander Ljungberg 1a639afd99 Typos. 2012-07-08 14:13:21 +01:00
Antoine Mercadal 72cc494df4 fix bug showing the CPComboBox's list under popover 2012-07-06 16:02:40 -07:00
aparajita 98fbf3abc1 Merge pull request #1601 from slevenbits/CPComboBox
CPComboBox and CPTextField enhancements

- Full Cocoa-compliant implementation of CPComboBox and CPComboBoxDelegate.

- Better focus ring for CPTextField and all subclasses.

- CPTextField and its subclasses draw disabled contents differently, per Cocoa.
2012-07-06 13:24:01 -07:00
Ilya KulakovandAlexander Ljungberg f434717372 Fix style. 2012-07-06 16:03:29 +01:00
Ilya KulakovandAlexander Ljungberg 88f8581dcc Implement -[CPWindowController setViewControllerContainerView:], fix -[CPWindowController setViewControllerView:]
Container view is responsible for laying out its views.
Container view is a content view of the window.
If there is no container view, view controller's view is a content view of the window.
2012-07-06 16:03:29 +01:00
Aparajita Fishman 32737e0b72 CPComboBox and CPTextField enhancements
- Full Cocoa-compliant implementation of CPComboBox and CPComboBoxDelegate.

- Better focus ring for CPTextField and all subclasses.

- CPTextField and its subclasses draw disabled contents differently, per Cocoa.
2012-07-06 00:15:23 -07:00
Aparajita Fishman e9fb821721 Make the default grid color in IB show correctly in CPTableView
Currently #888888 is being used as the default, mainly because NSColor.j doesn't recognize the "gridColor" named color, and the cached color in the .xib is #888888 for some reason. Actually the default grid color is #CCCCCC.
2012-07-04 16:39:47 -04:00
Aparajita Fishman 1d29fda5fd Added missing @ 2012-07-04 16:25:59 -04:00
Alexander Ljungberg cde50cc8b4 Refs #1558. Better ivar name and type. 2012-07-03 13:57:11 +01:00
Alexander Ljungberg fcc11b8969 Fixes #1559. Nested split view autosave and better override support.
Nested split views now correctly restore their divider positions by restoring "top down". E.g. a nesting split view is restored before the nested split view so that the nested split view has the correct frame size for the position it is restoring.

This commit also makes it easier to override autosave restores in a subclass or a controller's `viewDidLoad`. Now if `setPosition:ofDividerAtIndex:` is called after the split view's `initWithCoder:` has finished, but before the final autosave restore has occurred, the autosave restore is cancelled. This preserves whatever the modification the programmer intended to make instead of overwriting it with the autosaved position.

This commit also fixes a bug where an autosaved position would not be restored, or would be restored at an unexpected time, if `setFrameSize:` was not sent to the split view shortly after its `initWithCoder:`. (Such a `setFrameSize:` message is often sent due to a window `setFullPlatformWindow:` call in `AppController.j`'s `awakeFromCib`, but it's not necessarily sent.)
2012-07-03 13:53:52 +01:00
Alexander Ljungberg c9b7d1e842 Refs #1559. Autosave split view positions for frame size changes.
This covers the case where the whole split view is resized and the divider moves as a consequence. For example if the split view was made much smaller the fixed position of the divider previously autosaved might not even be inside of the split view frame anymore, and on restore from autosave that side of the split view might unexpectedly become collapsed.

The new behaviour also more closely matches Cocoa's, although there is still a slight difference in implementation.
2012-07-03 13:44:59 +01:00
Aparajita Fishman 2f1e9d76ec Non-bordered buttons should retain their size, not shrink to fit. 2012-07-02 09:40:00 -04:00
Aparajita Fishman 6efa30c52a autosave of position should not happen until divider tracking is completely done.
Also renamed a local variable that looked like an ivar.
2012-06-30 16:19:06 -04:00
Aparajita Fishman 345a865cc8 Post OS X 10.5, Cocoa adds a userInfo with the divider index when the user drags the divider 2012-06-29 13:09:47 -07:00
Aparajita Fishman e9ceb1d0c6 Documentation tweak 2012-06-28 15:25:39 -07:00
Alexander Ljungberg 8d14bdd819 CPToolbar autovalidate. 2012-06-28 22:41:41 +01:00