CPToolbarItems don't show their image without calling setMaxSize
Reported by Redmar | October 3rd, 2008 @ 08:45 AM
Normally initializing CPToolbarItems without calling setMaxSize will result in their images being not visible. Their labels are normally visible. (They are being loaded by the browser). So as an example this code results in only showing a label and not also an image:
toolbarItem = [[CPToolbarItem alloc] initWithItemIdentifier: "test"];
[toolbarItem setLabel: @"Test"];
[toolbarItem setEnabled:YES];
[toolbarItem setImage: [[CPImage alloc] initWithContentsOfFile: @"Resources/test.png" size: CGSizeMake(32, 32)]];
[toolbarItem setEnabled:YES];
This code will show the label and image:
toolbarItem = [[CPToolbarItem alloc] initWithItemIdentifier: "test"];
[toolbarItem setLabel: @"Test"];
[toolbarItem setEnabled:YES];
[toolbarItem setImage: [[CPImage alloc] initWithContentsOfFile: @"Resources/test.png" size: CGSizeMake(32, 32)]];
[toolbarItem setEnabled:YES];
[toolbarItem setMaxSize:CGSizeMake(32.0, 32.0)];
NOTE: this bug popped-up after the codebase update of 'Added separator to toolbar and made centering work within toolbar.' on 10/02/08 ( http://github.com/280north/cappu... ).
Comments and changes to this ticket
-
admin (at 280north) October 3rd, 2008 @ 10:20 AM
- State changed from new to resolved
(from [cbcd3bbbb67c3a72af7caf8372378a5b8d6f128e]) Fix for toolbar item minsize/maxsize mismatch.
[#85 state:resolved]
Reviewed by ross. http://github.com/280north/cappu...
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
- 85 CPToolbarItems don't show their image without calling setMaxSize [#85 state:resolved]