Previously, the text shadow offset on a control that was active (e.g., a button that was set to default, or the active segment of a segmented control) would have a text shadow applied to it if the button was also disabled.
This commit negates the text-shadow offset so that the text appears correctly.
This commit defines file-level variables for the disabled text colour, the disabled text shadow colour, and the placeholder text colour. It also adds or replaces these values in the controls where appropriate.
Previously, setting a CPComboBox to disabled would not dim the text. This commit fixes the theme state to include a setting for the text colour and text shadow colour.
Previously some disabled controls would be set with an opacity of 0.35, which resulted in controls that were visually too light.
This commit changes the default disabled opacity to 0.5.
Refs #1788
Previously the Aristo2 checkboxes used dedicated images for disabled controls.
This commit removes the disabled controls and allows the disabled state to be set via CSS opacity on the "regular" checkbox controls.
Previously, when
- Dragging a row in the rule editor
would eventually try to generate a dictionary with key 'indexes' and a
nil value in the method __postRowCountChangedNotificationOfType:indexes:.
Generating an empty dictionary instead when there is no indexes solves
this issue.
Previously, if properties were bound to table columns in a cell-based table, and an object was added/inserted using CPArrayController, a warning was generated about a missing observer.
This commit is a temporary fix, the real fix is to implement more granular notifications during didChangeValueForKey:, which will eliminate the source of this problem.
Fixes#1781.
Previously, when a view-based table:
- Had no delegate.
- Used bindings for its data source, thus obviating the need for makeViewWithIdentifier:owner:.
it would eventually call CPCib -instantiateCibWithOwner:topLevelObjects: with a nil owner (the nil table delegate). This method would try to construct a dictionary with the nil owner, which would generate a deprecation warning, and will in the future fail altogether.
In Cocoa, this is exactly what happens, the owner is nil. And the documentation for -instantiateNibWithOwner:topLevelObjects: clearly states that the owner may be nil.
This commit only adds the owner to the name table dictionary if the owner is non-nil. Since objectForKey: with a non-existent key returns nil, this is the same as storing nil for that key.
For example, in CPTableView before this change, dragged rows could not move up if the table view was near the top of the platform window.
Fixes#1877
Test TableTest/ViewBasedCib/ and drag up the third row.
This bug appears only if a table view have been added to the window.
CPTableView observes first responder changes and moves up in the view
hierarchy to determine the edited data view. If for some reason, a
superview in the hierarchy was nil, we entered an infinite loop.
This commit adds guards to the recursive method that searches the data
view. Also added an early return when the fr changes to a view outside
the table.
Fixes#1875
In this commit I've added the currentDocument method to the document controller
Also removed the firstEligibleExistingWindowController method from CPDocument
It did nothing but add confusion as it was not used anywhere else in the frameworks.
And it is not in cocoa.
Previously, passing nil to the first or last argument of getLineDash:count:phase: would cause a crash.
With this change, these references are simply not written to if nil.
Previously, setLineDash:count:phase: took references for its arguments to match getLineDash:count:phase:. This was however wrong and is not what is done in Cocoa.
This fix makes the setLineDash:count:phase: calling convention the same as in Cocoa.
This fix should in theory make the phase argument work in Firefox, although in Firefox 19.0.2 it doesn't seem to work. Hopefully it'll kick in in a future version of Firefox.
Previously CPTableView -_init was trying to reference a theme value, but that doesn't work because the theme creates a CPTableView and during that _init the theme value is not yet defined.
This commit uses lazy instantiation to avoid this problem.
Also, column selection was added to the CPDictionaryControllerTest to better visualize unfocused selection highlight colors.
Previously, the colors used for unfocused selection highlighting were hard coded. In Cocoa, they seem to be desaturations of the focused selection highlight colors.
This commit calculates the unfocused highlight colors from the focused colors.
It also removes some dangling commas.
Previously, CPTableView was unconditionally setting the selected theme state for selected data views. When the selection highlight style is CPTableViewSelectionHighlightStyleNone, there is no row selection highlighting done. Since the default theme specifies white text for selected data views, we ended up with white text on a non-highlighted background, which was invisible on non-alternate rows and almost invisible on alternate rows.
This commit unsets the selected theme state flag for any redrawn data views when the selection highlight style is CPTableViewSelectionHighlightStyleNone, thus the text color does change at all when selected.
Fixes#1847
Previously, when a table cell was edited, the table thought it had lost focus and displayed the cell's row highlight in an unfocused state.
This fix updates the _isFocused test to include tests for cell editing in both cell-based and view-based tables.
Previously the gradient in an unfocused selection highlight in CPTableViewSelectionHighlightStyleSourceList style was darker at the top and brighter at the bottom, which is the opposite direction of the gradient when focused.
This commit makes all of the unfocused highlight colors a strict 5% desaturation of the focused colors.
Refs #1839
In CPTableViewSelectionHighlightStyleSourceList selection style, a table view draws the highlight on each row with a top line, linear gradient, and bottom line. Previously, the top and bottom lines were quite dark in relation to the gradient.
This commit makes the top and bottom line brighter, to make the transition to the gradient more subtle.
Refs #1839
CPTableView has no focus ring, and currently gives no visual feedback of its firstResponder status. In Cocoa when the table view resigns firstResponder or its window loses key status, the selection color turns gray.
This commit sets the selection color to gray when a table view resign firstResponder or its window loses key status. A second window and a couple of textfields were added to the CPDictionaryControllerTest to demonstrate the changes.
Fixes#1839
Previously the selection highlight update loop created two selectors and called an extra method for every row being updated.
The selectors are now calculated beforehand, and the method call has been eliminated.