Commit Graph
65 Commits
Author SHA1 Message Date
daboe01 980cd520cd fix travis failure 2016-05-15 11:58:22 +02:00
daboe01 bacb78e9e8 move background color fallbacks to +themeAttributes 2016-05-15 11:51:44 +02:00
daboe01 0ca65c6d61 fix travis 2016-05-14 13:10:37 +02:00
daboe01 2320a56a63 revert travis test 2016-05-13 20:51:25 +02:00
daboe01 07bd91b456 travis test 2016-05-13 20:34:24 +02:00
daboe01 b3306d50eb move selection color to the themes 2016-05-12 20:17:14 +02:00
Alexandre Wilhelm c85355986b Fixed: manual merged with master 2016-03-06 18:47:58 -08:00
Alexandre Wilhelm 860decdac5 Fixed: CPColor and CPView implemented the category CPTheme 2015-10-02 10:12:50 -07:00
Alexandre Wilhelm 525747dc53 New: possibility to create a theme for every object of the Appkit
The purpose of this feature is to create theme for every object of the AppKit. Previously, we could not theme object like CPColor, however CPColor could be very interesting to theme, value like alternateSelectedControlColor were hard coded in the framework. With this PR, we can now theme a CPColor and take some values from the current theme of the application. Then, this PR offers the possibility to refactor the themeDescriptors, some classes contains theme attributes for other class (CPTabView and  CPTabViewItem for instance).

How doe it work ? A new category _CPObject+Theme.j has been added to the AppKit. This category contains every theme methods needed to theme an object (previously this category was in CPView). We add utils method like _encodeThemeObjectsWithCoder: and _decodeThemeObjectsWithCoder: in this category to be able to code and decode easily a coder for every object (this is generic).

This PR did not refactor the themeDescriptors, it only add this new mechanism for the methods alternateSelectedControlColor and secondarySelectedControlColor of CPColor. We will need to refactor that gradually
2015-08-21 15:54:00 -07:00
Alexandre Wilhelm 776f68c9dd Fixed style in CPTextView 2014-07-19 18:46:25 -07:00
Alexandre Wilhelmanddaboe01 39eeaea7e7 Fixed: circular import with CPText
Previously CPText was in CPTextView.j, now it is in CPText.j.
It fixes some other circular import as well, fixes some global var to import.
Fixed some code style.
2014-07-12 14:03:32 +02:00
Alexander Ljungberg 1b351ad5bb New: + CPColor checkerBoardColor for debug use.
This color has a standard 'transparency' checkerboard pattern which is especially useful for our scrolling tests where it makes scrolling easy to visualise.

Refs #2078, #2079.
2014-04-03 11:38:11 +01:00
Alexander Ljungberg 70b5105daa Fixed: CPColor colorWithHue:saturation:brightness: returning undefined.
A hue of 1.0 would cause the CPColor colorWithHue:saturation:brightness: method to return `undefined` instead of a CPColor instance.
2013-04-21 14:22:34 +01:00
Alexander Ljungberg d00846aae7 Fixed: CPColor colorWithHue:saturation:brightness: parameters not clamped.
Previously, the parameters to CPColor colorWithHue:saturation:brightness: could be specified below 0 or above 1.0.

Now the values are clamped so that values below 0 are taken as 0 and values above 1.0 and taken as 1.0.
2013-04-21 14:21:47 +01:00
Alexander Ljungberg 95d4bef3ea New: - CPColor hueComponent, saturationComponent and brightnessComponent. 2013-04-20 13:42:05 +01:00
Alexander Ljungberg 4e1a1415f6 Fixed: - CPColor hsbComponents range.
Previously, - CPColor hsbComponents returned degrees and percents. With the latest change to - CPColor colorWithHue:saturation:brightness: this was inconsistent.

Now - CPColor hsbComponents returns its components as factors in the 0-1.0 range.
2013-04-20 13:41:16 +01:00
Alexander Ljungberg 40579b5d56 Fixed: parameter range of CPColor colorWithHue:saturation:brightness:.
Previously, + CPColor colorWithHue:saturation:brightness: took its parameters as degrees and percent (e.g. hue between 0º and 360º, saturation and brightness between 0% and 100%). However, in Cocoa the components are given as factors (0.0-1.0) like other colour methods.

This fix makes + CPColor colorWithHue:saturation:brightness: work like in Cocoa.
2013-04-20 12:41:13 +01:00
Aparajita Fishman 7c677de10a Fixed bugs in CPColorWithImages and CPImageInBundle 2013-02-22 21:58:12 -05:00
Aparajita Fishman b28ff18918 Adding missing key 2013-02-08 07:48:41 +08:00
Aparajita Fishman 6a7e0ff921 Reworked PatternColor to be a lot smarter, supports much more concise expression of images.
- Removed unused images.
- Renamed slices to make more sense.
- Fixed typos in slice names.
2013-01-26 15:50:07 +08:00
Aparajita Fishman 95790d55d5 Object description formatting
- Made CPDescriptionOfObject smarter about detecting CG objects
- CPObject, CPArray, CPDictionary do a better (as in perfect) job of indenting nested objects
- CPDictionary is displayed using Cocoa-style key = value; notation
2013-01-25 19:19:01 +08:00
Martin Carlberg 458fa9d02e Fixed a lot of small bugs found by new warning message from compiler 2013-01-18 14:24:37 +01:00
Alexander Ljungberg 7c56ea47dd Skeleton CPColor colorUsingColorSpaceName:.
The method does nothing but is provided for API compatibility with `NSColor`.
2012-10-15 01:00:29 +01:00
Alexander Ljungberg eeca40c6f0 Implemented CPColor colorWithSRGBRed:green:blue:alpha:. 2012-03-10 11:52:49 +00:00
Alexander Ljungberg 2a031e82a4 Constrain CPColor components to [0.0, 1.0]. 2012-03-10 10:11:35 +00:00
Alexander Ljungberg 107103bcbb Fixes #1413: Internet Explorer colorWithCSSString crash.
Syntax such as [[CPColor colorWithCSSString:@"rgba(0,0,0,0.5)"] cssString] lead to a CSS string incompatible with browsers without the CSS rgba feature.
2011-12-06 22:45:26 +00:00
Alexander Ljungberg 3cee00323c Don't separate statements by commas. 2011-11-10 12:31:16 +00:00
Aparajita Fishman 860f0d5846 CPColor and CPImage enhancements
- Enhanced -description method of CPImage and CPColor to show the exact content, especially for pattern colors.

- Added CPColorWithImages() convenience function, analogous to PatternColor() function used in theme descriptors.

- Added @cond/@endcond in CPColor to ignore local variables.

- Sample app included.
2011-05-20 00:23:55 -07:00
Alexander Ljungberg 5a2e5a7de3 Fixed CPColor isEqual: for pattern images. 2011-05-09 21:38:32 -04:00
Alexander Ljungberg 3db05c94ab Closes #682. Fix CPColor isEqual:. 2011-05-09 20:59:38 -04:00
Alexander Ljungberg ff7f469f9f Fixed: CPColor colorWithCSSString did not properly handle the alpha component of the CSS rbga() syntax. Fixes #687. 2011-04-10 22:16:28 -04:00
Stephen Ierodiaconou 6a942630e4 Fixing spelling mistakes 2011-01-24 11:05:48 +02:00
Alexander Ljungberg 1ae31c9374 Style fixes. 2010-10-01 17:28:55 -04:00
Sami SamhuriandKlaas Pieter Annema 032639234e Use CPTextFields for RGB, HSB, and hex inputs in CPSliderColorPicker
The old DOM based fields only accepted a few characters. Backspace and
other expected functionality was broken. Switching to CPTextFields
makes them behave as expected.
2010-09-13 15:20:26 +02:00
Sami SamhuriandKlaas Pieter Annema c78b5e580a Reliably convert colors to hex strings
Converting a hex string to CPColor and back to a hex string now returns
the same initial hex string. (Fixed an off-by-one error)
2010-09-10 10:01:57 +02:00
Aparajita FishmanandRoss Boucher 0a26288d88 Fix for issue #804 (doxygen fails to generate class references), also did a bit of formatting cleanup in CPColor.j 2010-07-30 15:48:06 -07:00
Scott KyleandRandall Luecke 1899250a53 Semicolons are nice... 2010-06-10 16:42:28 -05:00
Ross Boucher af11b4e423 Fix for pattern images not being displayed correctly under the new background color system 2010-03-23 14:32:24 -07:00
Ross Boucher 0cf86318ce Make semi-transparent background colors work in browsers that don't support RGBA.
Closes #569.
2010-03-23 14:26:32 -07:00
Francisco Ryan Tolmasky I 78cb522874 Temporarily revert "Make semi-transparent background colors work in browsers that don't support RGBA."
This fix was making lots of resources not show up.

This reverts commit f8c13f1e30.
2010-03-23 01:22:59 -07:00
Ross Boucher f8c13f1e30 Make semi-transparent background colors work in browsers that don't support RGBA.
Closes #569.
2010-03-22 19:00:49 -07:00
Tom Robinson 0791fa0ad3 Eliminate a couple accidental globals. 2010-01-28 00:18:40 -08:00
Francisco Ryan Tolmasky I ddc9334af3 Merge branch 'master' into tableview
Conflicts:
	AppKit/CPTableColumn.j
	AppKit/CPTableView.j
2009-08-10 15:09:10 -07:00
lowell vizonandFrancisco Ryan Tolmasky I 377f331b47 Documentation Edits: Replaced <code> and <pre> tags with \c; this allows monospaced text to be displayed with formatted text without needing a new line. See AppKit/CPView after generating documentation for examples. Also added - and + signs to the above changes when referring to either an -instanceMethod or a +classMethod. --lowell@cocoastep
Signed-off-by: Francisco Ryan Tolmasky I <francisco@280north.com>
2009-08-08 03:50:50 +08:00
Francisco Ryan Tolmasky I cb81eeed15 Fix for selection in tableview.
Reviewed by me.
2009-07-07 18:42:44 -07:00
Nabil ElisaandRoss Boucher c7f81691bf Added more colors to satisfy issue #182 2009-06-20 14:32:57 -07:00
Ross Boucher cfa21b0c96 Add a randomColor method. Useful for debugging. 2009-05-23 17:28:21 -07:00
Ross Boucher 850125b8ab Add documentation groups 2009-05-18 15:43:36 -07:00
Ross Boucher e05816419e Some documentation enhancements. 2009-05-14 22:48:42 -07:00
Ross Boucher 9c7f07979b Add CPBezierPath, clean up some of CGPath and CGContext 2009-05-14 19:06:58 -07:00