Strange horiz line at bottom of button

9 views
Skip to first unread message

Joubert Nel

unread,
Dec 18, 2008, 5:44:20 PM12/18/08
to Cappuccino & Objective-J
Hi,

When I create a button (CPButton), there is a horizontal line at the
bottom of the button (adjacent, outside the bottom edge), stretching
across the entire (straight-line) width.

What's the deal with that?

Joubert

Tom Robinson

unread,
Dec 18, 2008, 5:51:21 PM12/18/08
to objec...@googlegroups.com
Buttons need to have a specific height (18px or 20px depending on the
styles) and if it's too big the image starts repeating. I'm not sure
what to do about that at the framework level (what does Cocoa do?),
but in your app just make sure the height isn't too big.

-Tom

Joubert Nel

unread,
Dec 18, 2008, 5:56:06 PM12/18/08
to Cappuccino & Objective-J
Hi Tom,

I actually set the button's frame with sizeToFit, which, apparently
was setting it too high (my button only has text).

When I explicitly change the height to 18, all is good.

Joubert

Tom Robinson

unread,
Dec 18, 2008, 6:01:19 PM12/18/08
to objec...@googlegroups.com
Yeah I think that's a bug in sizeToFit. Could you file a bug on
lighthouse, please? http://cappuccino.lighthouseapp.com/

Thanks,

Tom

Rich Collins

unread,
Dec 18, 2008, 7:49:54 PM12/18/08
to objec...@googlegroups.com
Maybe the font size is causing sizeToFit to make it larger than
standard sizes?

nciagra

unread,
Dec 19, 2008, 1:42:22 PM12/19/08
to Cappuccino & Objective-J
Why not set the backround-repeat of the center of the three part image
to x-repeat? Then the overlap won't happen no matter how tall you make
the button.

Nick

On Dec 18, 7:49 pm, Rich Collins <richcoll...@gmail.com> wrote:
> Maybe the font size is causing sizeToFit to make it larger than  
> standard sizes?
>
> On Dec 18, 2008, at 3:01 PM, Tom Robinson wrote:
>
>
>
> > Yeah I think that's a bug in sizeToFit. Could you file a bug on
> > lighthouse, please?http://cappuccino.lighthouseapp.com/

Tom Robinson

unread,
Dec 19, 2008, 11:18:04 PM12/19/08
to objec...@googlegroups.com
True, but the transparent part will still be clickable. Maybe it's
best to just limit the height explicitly?

-Tom
Reply all
Reply to author
Forward
0 new messages