#85 ✓resolved
Redmar

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

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.

New-ticket Create new ticket

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.

Shared Ticket Bins

Referenced by

Pages