Previously, the style of the blueish view that shows up on CPTableView when user is about to drop something on it was hard coded.
This patch adds the following theme attributes in CPTableView
// theme of the drop view for CPDragOperationOn on a non selected row
dropview-on-background-color
dropview-on-border-color
dropview-on-border-width
dropview-on-border-radius
// theme of the drop view for CPDragOperationOn on a selected row
dropview-on-selected-background-color
dropview-on-selected-border-color
dropview-on-selected-border-width
dropview-on-selected-border-radius
// theme of the drop view for CPDragOperationAbove on a non selected row
dropview-above-border-color
dropview-above-border-width
// theme of the drop view for CPDragOperationAbove on a selected row
dropview-above-selected-border-color
dropview-above-selected-border-width
Aristo and Aristo2 have been updated, and use the same old hardcoded values.
- CPImageInBundle() can't be used from a ThemeDescriptor. Replaced with PatternImage().
- DRY! Put clock image sizes in variables so they can be maintained in one place.
- When displayed from the theme showcase, the hand images in HandLayer -setImage: were still _CPCibCustomResources, not sure why. This condition is now explicitly handled by converting to the referenced image.
- Fixed a bug in _CPDatePickerClock -setEnabled where the sublayers would not update unless the event loop was pumped.
- Check for unchanged value in setters.
- Various code optimizations.
- Removed unnecessary method comments.
- Fixed typo in demo app.
Previously the showcase of Aristo and Aristo2 didn't work because several bugs in the class CPDatePicker.
This PR fixes these problems :
- The first problem was when displaying a textual datePicker, the class tried to calculate different things for the calendar (good optimization as well).
- The second problem was about the calendar and the hands. It wasn't possible to display a PatternColor made with an image in a layer, now we use a PatternImage and the method CGContextDrawImage to draw the hands.
Previously it wasn't possible to display a toolbar in a sheet window.
Now, a toobar is displayed well in a window. This PR allows every sheet window to have a toolbar, with the PR #1918 just the CPTitleWindow/HUD sheet could have a toolbar as in cocoa.
Fixes#1863
Previously it wasn't possible to theme the main menu of the app. With this fix the user can either theme the main menu with the theming system or with the method +setMenuBarAttributes from CPMenu.
Previously, the themed text values for controls were set directly on the control, which made modifying the theme values for text consistently across the controls difficult.
This commit introduces several file-scoped variables that are used to set the text colour, the disabled text colour for both regular and default controls, as well as a consistent text shadow colour for each of these as well.
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 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, 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.
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
Previously the main menus were farther apart than the Aristo 2 PSD indicated, and too far apart visually.
This commit reduces the horizontal margin between menu items that have originated from Interface Builder. A value of 9.0 for horizontal margin (down from 12.0) reduces the margin on both sides of the menu by 3px, reducing the inter-menu spacing by a total of 6px.
Fixes#1809
It used to be part of the theme to make the text in selected table rows bold. I never quite understood that, it really isn't necessary visually. Cocoa doesn't do it, I don't know of any toolkit that does.
Also, fixed sizes were used for text field theme fonts, which did not allow them to track runtime changes to the system font size.
This commit makes selected table row text plain, so selecting a row does not change the metrics of the text, just changes the color, which is much more pleasing visually.
Also, the special CPFontCurrentSystemSize constant, which tracks the actual font size at runtime, is used for text field font sizes.