Previously, minimum and maximum were not supported in CPNumberFormatter.
This commit adds support for these in IB and via code. Updated unit tests included.
Fixes#1829
This is a second attempt to fix the problems addressed by 69bbe627a9.
Because table cell classes needed to use the same initialization code as the NS_initWithCoder methods, it was necessary to refactor the initialization code into separate NS_initWithCell methods and call them separately from NS_initWithCoder.
Previously, table view cells (non-view-based) were not being decoded with all of the available cell attributes in IB, and many attributes were hard-coded. In addition, there was a bunch of initialization code that has been made redundant by theming.
With this commit, decoding of all control classes has been refactored so that table view cells can use the same code, thus ensuring they decode all available cell attributes. In addition, the redundant code has been eliminated.
It is now possible to apply most table cell attributes such as font, color, alignment, sendsActionOnEndEditing, and so on, directly in IB.
Closes#1803
BREAKING CHANGE:
Changes have been made to table cell decoding in nib2cib. All xibs should be re-converted with `find . -name '*.xib' -exec nib2cib {} \;`.
This is an improved fix to the corrupted tab view state bug partially addressed by 0f347be.
Without either fix, NSTabView is converted to a CPTabView where tab view item views are subviews of the NSTabView, while in Cappuccino the selected view item is supposed to be a subview of a CPBox.
Without this fix, CPTabView decoding called addSubview: in initWithCoder: which can cause the superview of a view to become set, only to later be overwritten when the superview ivar is decoded.
This fix removes the tab item view as a subview from the tab view before encoding it in nib2cib, and then makes sure not to call addSubview: while still in the initWithCoder stage, but rather later in awakeFromCib.
Without this fix, a regular custom NSBox such as a simple box with a 1px border would become several pixels smaller in Cappuccino.
This fix makes sure we only try to adjust the size for primary and secondary type NSBoxes.
- Get the scroller orientation from the xib.
- Fix the nonsensical calculation of _isVertical when given bounds.
- Since orientation comes from the xib, had to re-nib2cib everything to be safe.
- CPView and subclasses support multiple-value hidden bindings.
- CPControl and subclasses support multiple-value enabled bindings.
- CPWindow and CPBox support multiple-value title with pattern bindings.
- CPButton supports multiple argument + target bindings.
- CPImageView and CPTextField support multiple-value editable bindings.
- CPMenuItem supports multiple-value enabled bindings.
- Fixed bugs in CPObjectController with simple collection operators.
- CPColorWell uses black as the placeholder color.
- Runtime object attributes from a cib are applied as they are read, not deferred.
- NSNumberFormatter now reads the number style from the xib.
- Normalized some parameter names.
- Formatting.
- Test app for all binding types.
- Make height 20px, same as in Xcode, so we can actually lay them out correctly without guessing. And they were just too tall at 25px anyway.
- In case the height does change in the future, calculate the correct height from the theme in NSProgressIndicator.
- Updated the theme descriptor to include the default height.
- Updated Aristo 2 PSD progress indicator artwork.
- Moved init of CPProgressIndicatorSpinningStyleColors out of layoutSubviews, it is file global and only needs to get done once.
Without this fix, setting a corner radius of 0 on a CPBoxCustom resulted in there being a corner radius anyhow.
This fix makes sure to preserve the corner radius, border width and margins for non-primary style boxes.