Commit Graph
67 Commits
Author SHA1 Message Date
Didier KorthoudtandGitHub 6c7d8df565 Aristo3: CPButton (#2920) 2020-10-02 12:59:32 +02:00
Didier KorthoudtandMartin Carlberg 76dd5383ab Fixed: A «feature» of Xcode where IB sometimes stores NSFont values in the alternate image property. (#2844) 2019-06-13 16:04:59 +02:00
daboe01andcacaodev 6443575114 fixed: nib2cib was susceptible to IB button issue with alternateImage (#2721) 2018-05-28 21:10:40 +02:00
cacaodev 9fab52c044 NEW: nib2cib support for CPButton -imageScaling. With manual test CPButtonTest. Fixes #2425. 2016-03-12 22:18:46 +01:00
Martin Carlberg 03a6e6fc6a Fixed: Removed ivars that are already declared in superclass 2015-03-03 11:34:49 +01:00
Christophe Serafin 62e8d70d74 fix _adjustNib2CibSize calls 2014-08-18 13:08:09 -07:00
Christophe Serafin 4b639843ec fixed buttons positions and extended Nib2CibAlignment test 2014-08-14 18:18:08 -07:00
Christophe Serafin 464389a862 update nib2cib-adjustment-frame to match Nib2CibAlignment Test. Except for button in small and mini sizes 2014-08-14 14:17:57 -07:00
Christophe Serafin 3dc581efbb introduce nib2cib-adjustment-frame as theme attribute to enbable proper control alignment 2014-08-14 10:54:38 -07:00
Christophe Serafin 0b64758360 adjust CPPopUpButton alignment 2014-08-11 15:04:06 -07:00
Christophe Serafin 8412c1db21 enable autoresize theme images instead of creating small and mini images. Remove all existing small and mini images 2014-08-11 14:25:02 -07:00
Christophe Serafin c8a04b998b update origin Y according to control Size 2014-08-07 18:27:01 -07:00
Christophe Serafin 5feac3a7ff allow using regular, small and mini sizes from xCode and from code using setControlSize method. Available on CPTextField, CPStepper, CPDatePicker only for the moment 2014-08-05 17:34:58 -07:00
Aparajita Fishman d9117bd9a0 Fixed: Converter was copying too much state from Nib2Cib, framework resources could not be referenced in Xcode.
* State *
Previously the Converter class needlessly copied a whole bunch of state from the Nib2Cib class, which was not only poor factoring, but made for easy omissions of state when instantiating a new Converter, such as was done in NSNib.j.

This commit pushes all state not specific to Converter up to Nib2Cib. This allowed removal of redundant code in NSNib -NS_initWithCoder.

* Resources *
Previously it was not possible to use custom images that were located in a framework, because only the app's Resources directory was searched.

This commit automatically searches all frameworks for Resources directories. When a custom image is specified in Xcode, first the app's Resources directory is searched, then all framework Resource directories. Alternately, the specific framework to use can be specified in Xcode by using the form framework@image.

At runtime, the framework is loaded by its identifier (as specified in Info.plist), and if there is no identifier, by searching next to the current AppKit framework.

All of this renders the nib2cib -R option completely obsolete, so it was removed from the NibApplication/Jakefile template.
2013-04-08 15:48:45 -04:00
Aparajita Fishman 9ea3b70143 Fixed: table cells were not initialized from xib settings
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.
2013-02-27 18:02:55 -05:00
Aparajita Fishman c5b3c17ccc Revert "Fixed: table cells were not initialized from xib settings"
This reverts commit 69bbe627a9 until it can be implemented correctly.
2013-02-27 13:54:26 -05:00
Aparajita Fishman 69bbe627a9 Fixed: table cells were not initialized from xib settings
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 {} \;`.
2013-02-26 13:07:54 -05:00
Antoine Mercadal 6673823a74 Merge pull request #1694 from mrcarlberg/nib2cib_allow_themed_height_on_checkbox_and_radio
nib2cib allows CPCheckBox and CPRadio to have themed height
2013-02-15 22:49:22 -08:00
Antoine Mercadal 563fb657a4 Change some pixel adjustements to reflect what IB is doing in nib2cib 2013-02-06 17:01:27 -08:00
Aparajita Fishman af47857a47 Fixed missing/circular imports in nib2cib 2013-01-23 23:10:10 +08:00
Aparajita Fishman 866e1f00f7 Objj2 compiler fixes
- Each file compiles individually with no errors or warnings.
- Added missing imports.
- Fixed imports to remove circularity.
- Removed unnecessary imports.
- Added missing headers.
- Added missing action_button.png.
- Replace CPMakeRect with CGRectMake.
2013-01-23 15:48:56 +07:00
Antoine Mercadal 86e0282011 Fix nib2cib warnings 2013-01-18 14:29:25 -08:00
Martin Carlberg 744f3d70ed nib2cib allows CPCheckBox and CPRadio to have themed height and adjusts it correctly 2012-11-29 15:37:33 +01:00
Martin Carlberg 7dd034e56c nib2cib will now adjust to the correct themed height for subclasses of CPButton.
For examples CPPopUpButton can get another height then CPButton.
2012-11-29 13:25:53 +01:00
Aparajita Fishman 8ff2a32b47 Fix tag reading from IB
Both controls and cells can have tags in IB, but Cappuccino has no cells. If the control has a tag, that takes precedence. Tag reading was moved to NSControl from NSView, since NSView does not have a tag in Cocoa.
2012-09-28 16:20:55 -04:00
Alexander Ljungberg 8aee458022 nib2cib support for button and radio button tags. 2012-07-19 01:05:09 +01:00
Aparajita Fishman 32dc0826cb Text size and theming enhancements
- _CPImageAndTextView adds extra pixels to allow for fractional pixels in -sizeToFit.

- NSButton now allows buttons that are not fixed height, if the theme allows it.

- Documented the mapping between bezel style constants and their IB style names.
2012-07-13 21:00:02 -07:00
Aparajita Fishman fc23863d85 Added support for alternate button title in nib2cib 2012-07-02 09:55:52 -04:00
Aparajita Fishman 3ba5be1ec6 nib2cib image fixes
- nib2cib will now log the path and size of custom image resources in super verbose mode.

- Alternate images for buttons were not being set by nib2cib, that has been fixed.

- Fixed the name of the imagesize binary in the Xcode project.
2012-06-29 11:29:53 -07:00
Alexander Ljungberg 10fcc0c452 Refs #1572. Minor fixes. 2012-06-25 16:26:44 +01:00
Ilya Kulakov 66f5e1fb64 Take into account highlightsBy and showsStateBy when decoding cib.
nib2cib was modified to take into account these variables
during conversion nib->cib.
2012-06-25 18:57:01 +07:00
Antoine Mercadal 19794b06ab nib2cib sets _imageDimsWhenDisabled to YES for buttons 2012-06-13 15:22:26 -07:00
Aparajita Fishman 64e6764015 Have to set _themeClass when class changes 2011-07-08 19:04:33 -07:00
Klaas Pieter Annema 9f2804c700 Merge branch '0.9.1b' 2011-06-01 12:10:10 +02:00
Klaas Pieter Annema 16183cca09 fix nib2cibbed controls enabled state 2011-06-01 12:09:49 +02:00
Alexander Ljungberg b4b54e5744 Partial button image support in nib2cib covering NSAddTemplate and NSRemoveTemplate (standard plus and minus buttons). 2011-05-30 22:16:42 -04:00
Alexander Ljungberg 4316192b8d Support NSButtonCell (e.g. checkboxes) in table columns through nib2cib. 2011-05-29 21:24:41 -04:00
Antoine Mercadal fde18bba2e Correct button positionning.
This patch makes nib2cib dealing with NSButtons much more better by setting particular offsets
according the the kind of button.
2011-05-17 19:30:42 +02:00
Aparajita Fishman 2599f820c7 Merge branch 'font-fun' into fonts
Conflicts:
	Tools/nib2cib/NSButton.j
2011-03-28 18:51:10 -04:00
Aparajita Fishman 5133a7dc91 Fix NSButton so it will merge with master 2011-03-28 16:28:28 -04:00
Aparajita Fishman ac7ff24dd7 These got left out in f1f78d6c6a 2011-03-27 15:22:13 -04:00
Aparajita FishmanandRandall Luecke f1f78d6c6a Fixed the infamous "wandering checkbox" bug 2011-03-24 23:39:25 -04:00
Aparajita Fishman d303e6e96c Initial commit before testing. 2011-03-08 17:40:41 -05:00
Francisco Ryan Tolmasky I ff60125183 Some capp_linting.
Reviewed by me.
2010-12-01 11:04:17 -08:00
Aparajita FishmanandKlaas Pieter Annema ce2c662872 Fixes to previous CPButton image positioning commit.
- Checkbox and radio selected states would not show in the images. It turns out that the image and alternate image cannot be encoded->decoded->set without messing up the theme, and unfortunately the theme blending task (during a jake build) would do so. So for now this means that we cannot encode non-theme images with a button class, which is unlikely to happen.

- Since we cannot access themes in the NS classes, I went ahead and started to make some constants in a few control classes so that the values can be changed in one place and affect the theme and nib2cib.
2010-09-10 09:56:26 +02:00
Aparajita FishmanandKlaas Pieter Annema 6680a1f2a7 Overhaul of CPButton and supporting classes to support image positioning the way Cocoa does 2010-09-08 22:13:39 +02:00
Aparajita FishmanandAlexander Ljungberg 5e20a6d9ef Sending NS_initWithCoder at the right time 2010-08-22 19:03:02 -04:00
Ross Boucher 7e25166ce1 Revert the fixed frame size assumption for now. 2010-06-23 19:13:56 -07:00
Ross Boucher 1b174b86ca Buttons should also be re-centered after their height is changed in nib2cib. 2010-06-16 08:14:04 -07:00
Ross Boucher 421ae6b316 Make CPButton archive its key equivalents, and make nib2cib support the feature. 2010-06-10 10:41:15 -07:00