CPProgressIndicator and CPSmallControlSize

33 views
Skip to first unread message

Larry Hendricks

unread,
Jan 7, 2010, 3:55:10 AM1/7/10
to Cappuccino & Objective-J
Is it possible to make a smaller spinner than the 64x64 one capp makes
by default? [spinner setControlSize:CPSmallControlSize] seems to have
no effect.

Thanks

Saikat Chakrabarti

unread,
Jan 7, 2010, 4:00:07 AM1/7/10
to objec...@googlegroups.com
Yeah not sure if this is a bug - it seems like these lines in
CPProgressIndicator.j in + (void)initialize should be changed to set
the sizes correctly:

CPProgressIndicatorSpinningStyleColors[CPMiniControlSize] =
[CPColor colorWithPatternImage:[[CPImage alloc]
initWithContentsOfFile:
[bundle
pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"]
size:CGSizeMake(64.0, 64.0)]];
CPProgressIndicatorSpinningStyleColors[CPSmallControlSize] =
[CPColor colorWithPatternImage:[[CPImage alloc]
initWithContentsOfFile:
[bundle
pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"]
size:CGSizeMake(64.0, 64.0)]];
CPProgressIndicatorSpinningStyleColors[CPRegularControlSize] =
[CPColor colorWithPatternImage:[[CPImage alloc]
initWithContentsOfFile:
[bundle
pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"]
size:CGSizeMake(64.0, 64.0)]];

One way around this for now is to just use the image directly and set
the size you want it to be when allocing the image.

> --
> You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
> To post to this group, send email to objec...@googlegroups.com.
> To unsubscribe from this group, send email to objectivej+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/objectivej?hl=en.
>
>
>
>

Elias

unread,
Jan 7, 2010, 4:54:07 AM1/7/10
to Cappuccino & Objective-J
Reply all
Reply to author
Forward
0 new messages