Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

CPToolbarItems don't show their image without calling setMaxSize

#85

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... ).

Reported by Redmar · October 3rd, 2008 @ 08:45 AM

State: resolved
Milestone: none
Assigned to: Francisco Tolmasky Francisco Tolmasky

Activity

  1. admin (at 280north)
    admin (at 280north)
    • State changed from new to resolved

    (from [cbcd3bbbb67c3a72af7caf8372378a5b8d6f128e]) Fix for toolbar item minsize/maxsize mismatch.

    [#85 CPToolbarItems don't show their image without calling setMaxSize state:resolved]

    Reviewed by ross. http://github.com/280north/cappu...

    October 3rd, 2008 @ 10:20 AM

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.