CPButton sizeToFit with border
Reported by Kelvin Sherlock | September 16th, 2008 @ 07:18 AM
the CPButton sizeToFit method doesn't work well when there is a border -- the height is wrong and the width doesn't adjust for the left/right images.
-
(void)sizeToFit { [_imageAndTitleView sizeToFit];
var frame = [_imageAndTitleView frame],
height = CGRectGetHeight(frame), width = CGRectGetWidth(frame), bezelSizes;
bezelSizes = _CPButtonBezelStyleSizes[_CPButtonClassName + _CPButtonBezelStyleIdentifiers[_bezelStyle]]; height = bezelSizes [[1]](/projects/16499/changesets/1 "Changeset #1").height; width += bezelSizes [[0]](/projects/16499/changesets/0 "Changeset #0").width + bezelSizes [[2]](/projects/16499/changesets/2 "Changeset #2").width;
}
[self setFrameSize:CGSizeMake(width, height)]; }
Comments and changes to this ticket
-
Ross Boucher September 17th, 2008 @ 08:48 PM
- Milestone set to 0.5.2
-
Ross Boucher September 29th, 2008 @ 10:17 AM
- State changed from new to open
- Milestone cleared.
- Tag set to appkit
-
admin (at 280north) November 14th, 2009 @ 10:38 PM
- State changed from open to resolved
- Tag changed from appkit to @acknowledged, appkit
(from [8f1e56e398554b1c18250e0eb67f309daf8af2e1]) Implemented manual validation for toolbar items and fixed a number of toolbar bugs.
Reviewed by me.
http://github.com/280north/cappuccino/commit/8f1e56e398554b1c18250e...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.
People watching this ticket
Tags
Referenced by
- 43 CPButton sizeToFit with border Closes #43. Closes #48.
- 48 Support Targets and Actions in cibs/nib2cib Closes #43. Closes #48.