Commit Graph
80 Commits
Author SHA1 Message Date
Didier KorthoudtandGitHub 35420732d1 Fixed: Modern Cocoa behavior and Aristo3 CSS theme ready for CPDatePicker (#2935)
Also, clock hands can be manipulated
2020-11-06 16:27:07 +01:00
Didier KorthoudtandGitHub 92598da06f New: themable-system-font (#2919) 2020-10-02 12:55:32 +02:00
Didier KorthoudtandGitHub e7d5afe90e New: Added dynamic attributes set for CSS based themes (#2701) 2020-04-06 13:10:34 +02:00
Didier KorthoudtandGitHub 9868519cc0 Fix: Before this PR, the method attributeBySettingValue ignored existing values #2888 2020-03-03 16:43:29 +01:00
Martin CarlbergandGitHub 7dc77ed609 Fixed: Make sure we handle undefined when testing for nil values (#2862) 2020-01-31 13:43:58 +01:00
Didier KorthoudtandMartin Carlberg 6077d3f4c3 FIXED: _CPThemeAttribute valueForState was, under some circumstances, ignoring theme settings (#2744) 2018-08-20 10:50:08 +02:00
Didier KorthoudtandMartin Carlberg 20be4a40ea NEW: Add CSS theming support (#2613) 2018-04-27 09:27:01 +02:00
Daniel fbaf87ec6c Formatting: add missing semi-colon in CPTheme.j 2018-04-07 17:03:33 -07:00
Frank Rehwinkel 54477b8b8f Make variable local: key
This line of code was introduced years ago with a variable that
javascript is happy to add to the global name space.  Clearly it
was meant as a local variable.  Probably a cut and paste error
because other places in the code use the same syntax but there the
value is a local because the var statement for it appeared elsewhere
in the function.

Once code like this is cleaned up to use the new 'let' construct,
as well as 'use strict', mistakes like this will be much less likely
to go uncaught.
2017-05-04 16:01:53 -04:00
Martin Carlberg 42c629ca45 Fixed: Use ’;’ instead of ’,’ 2015-10-27 09:03:55 +01:00
Martin Carlberg 68f45beb20 Fixed: Code formatting 2015-10-27 09:03:26 +01:00
Martin Carlberg ed12bae6aa Fixed: Removed unused global variable 2015-10-23 16:38:12 +02:00
Martin Carlberg 1520c1ebab Fixed: Linting 2015-10-23 15:40:45 +02:00
Martin Carlberg 790190e5c3 Fixed: Removed code collecting statistic of theme attribute creation and some logging 2015-10-23 10:39:52 +02:00
Martin Carlberg 8397685430 Fixed: Joined caches for theme attributes for better performance
Conflicts:
	AppKit/CPTheme.j
2015-10-23 10:19:02 +02:00
Martin Carlberg fc411c5c1c Fixed: Cache ThemeAttribute
Conflicts:
	AppKit/CPTheme.j
2015-10-23 10:18:03 +02:00
Martin Carlberg 3a91f43bbb Fixed: Test cases are working correctly 2015-10-21 12:26:39 +02:00
Martin Carlberg 9946987f69 Fixed: Cache ThemeState for better performance 2015-10-21 12:26:12 +02: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
Antoine Mercadal f9275a70af FIXED: New warnings reveleaded by ivar type checking
This patch fixes all new warnings
2014-11-06 10:17:05 -08:00
Christophe Serafin 12c427a9cf enable CPControl to use setControlSize. Created an example with CPStepper 2014-08-01 16:57:02 -07:00
Mathieu Monney 7bd27ebd52 Fixed: Crash of press tool due to theme attribute not set
When using the press tool, it can happen that one of the theme attribute is not set as not everything is instantiated. 

This fix makes sure that the attribute is set before accessing it to avoid any crash of the press tool.
2014-06-24 15:37:59 +02:00
Alexander Ljungberg 050fcf2ab8 New: CPThemeStateFirstResponder for CPView.
When a CPView becomes the first responder it now takes on the 'first responder' theme state, as does all its subviews. This allows it to naturally change appearance when it has the keyboard focus, such as with focus rings and brighter colour schemes.
2014-05-11 15:48:37 +01:00
Saikat Chakrabarti 45df8c0f74 Fix bug with unsetThemeState + more tests. 2014-03-09 15:15:11 -07:00
Alexander Ljungberg e6acc3c336 Fixed: missing var, minor tweaks.
Refs #2073.
2014-03-06 14:03:46 +00:00
Saikat Chakrabarti b6b4015a82 Introduce .and and .without syntax for ThemeStates. 2014-03-01 23:26:20 -08:00
Saikat Chakrabarti 2fd8940c02 Allow array arguments to various methods that take ThemeStates 2014-03-01 23:11:24 -08:00
Saikat Chakrabarti 7408710761 Move placement of CPThemeStates cache to above the cache method for clarity. 2014-02-28 11:14:46 -08:00
Saikat Chakrabarti 745ad7cc34 Clean up the interface a bit to consolidate ThemeState methods onto one object. Keep CPThemeState as just a helper function. 2014-02-26 13:11:43 -08:00
Saikat Chakrabarti df148e4946 Fix a small typo in CPTheme.j themestate caching 2014-02-21 14:29:31 -08:00
Saikat Chakrabarti cf99a7bf18 Fix bug that was turning dictionary keys into objects 2014-02-20 18:14:01 -08:00
Saikat Chakrabarti 727b519750 Remove unused method in CPTheme 2014-02-20 18:09:47 -08:00
Saikat Chakrabarti 861d093d80 All ThemeStates always have at least one state - the normal state 2014-02-20 17:52:16 -08:00
Saikat Chakrabarti c3d2decdec Fix bugs with CPThemeAttribute encoding and decoding 2014-02-20 17:30:28 -08:00
Saikat Chakrabarti d862d701f3 Add note to ThemeState object about it being private 2014-02-20 17:30:28 -08:00
Saikat Chakrabarti 7eb35ef33d Clarify documentation for CPThemeState() 2014-02-20 17:30:28 -08:00
Saikat Chakrabarti 1563b0bf55 Get all tests to pass 2014-02-20 17:30:28 -08:00
Saikat Chakrabarti bad731c86f Fix subtracting theme states 2014-02-20 17:30:28 -08:00
Saikat Chakrabarti 5309cc5916 Change CPTheme implementation to fix how searching for a matching theme works 2014-02-20 17:30:28 -08:00
Saikat Chakrabarti 9e61991ad2 Fix bug when setting themeStates in a themeAttribute 2014-02-20 17:30:27 -08:00
Saikat Chakrabarti c644e8a30f Change CPTheme to be hash-backed to make it a bit faster 2014-02-20 17:30:27 -08:00
Saikat Chakrabarti 45a237af16 Handle null inputs for subtracting CPThemes. 2014-02-20 17:30:27 -08:00
Saikat Chakrabarti 7d304fbd51 First round of changes to change theming system to use arrays and not bitmasks as their underlying datatype 2014-02-20 17:30:27 -08:00
Aparajita Fishman b198fee11a Fixed: default class theme value could be CPNull.
The class method +themeAttributes returns a dictionary, so CPNull has to be used instead of nil. Previously, if the class theme attribute was used, there was no attempt to convert CPNull to nil, which could have unintended consequences.
2013-03-15 10:02:31 -04:00
Aparajita Fishman d25ff21030 Fixed: _CPThemeAttribute _parentAttribute had confusing name
Previously _CPThemeAttribute had an ivar called _parentAttribute, which represented the attribute from the theme descriptor, as opposed to the attribute for a particular instance of a view.

This commit renames that ivar to _themeDefaultAttribute, so it is clearer where it gets its values.
2013-03-14 23:57:39 -04:00
Aparajita Fishman 6dc9aa815a Fixed: eliminated duplicate CPThemeStateSelectedTableDataView state
CPThemeStateSelectedTableDataView and CPThemeStateSelectedDataView were the same, and were not used in any consistent or meaningful way.

This commit eliminates CPThemeStateSelectedTableDataView, only CPThemeStateSelectedDataView is used now.
2013-03-14 17:06:23 -04:00
Alexander Ljungberg 5b05dc92a1 More dictionary literals. 2013-02-25 18:27:44 +00:00
Alexander Ljungberg 8bcbeb0aa9 Improve code readability with dictionary literals. 2013-02-25 17:02:36 +00:00
Alexander Ljungberg 9dbfa99284 Lint. 2013-01-20 17:14:44 +00: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