Bevel Button on Retina

I have a Bevel Button (pushbutton with menu with rounded bevel) that looks fine normally, but looks like it’s missing the top border on a Retina display. Anyone else seeing that?

I sometimes see it with the slider, I got around it by making the slider taller by 1-pixel.

I’ve had this problem many times on conventional Mac displays. It usually results from having controls spaced too closely together. Make sure the transparent boundaries of the controls are not overlapping the boundaries of other controls or the edges of the window.

Making it taller didn’t help, but it certainly might be too close to another control. I’ll check it out, thanks.

No, it wasn’t really near any other controls, but I moved it down and made it abnormally tall anyway, to no avail. I’ll try to create a project that reproduces this. (Which will be a real feat since I don’t have a Retina display.)

I’m pretty sure there’s a report on this already (or something very similar).

If there is, I couldn’t find it. I looked for “bevel” and “Retina”.

I created a simple project that shows the issue, but maybe this is just what the button should look like on a Retina display?

I believe it’s case 23625.

I looked up the Case and it says it is fixed, but I see the exact same thing running under 10.9.5 Looks correct in the IDE, but when I run under 2016r1.1 it looks like it has the same problem Kem mentioned nearly 3 years ago. Anyone else see this?

[quote=21222:@Kem Tekinay]If there is, I couldn’t find it. I looked for “bevel” and “Retina”.

I created a simple project that shows the issue, but maybe this is just what the button should look like on a Retina display?


This bug was already mentioned in a thread last week.

From what I see, it will be fixed in 2016R2.

Thanks, Michel, I just tried it in r2b2, still incorrect. Also, the shadow looks much better around the button in the IDE, than it does in the built app. In the IDE it feathers properly like the rest of the items on the Mac desktop. In the Xoko built app, it looks choppy, but in the Xojo IDE… perfect. Maybe it is related?

What do you mean incorrect ?

A possible workaround when no picture is needed pending fix would be to change the style of regular pushbuttons :

[code] const NSRoundedBezelStyle = 1
const NSRegularSquareBezelStyle = 2
const NSThickSquareBezelStyle = 3
const NSThickerSquareBezelStyle = 4
const NSDisclosureBezelStyle = 5
const NSShadowlessSquareBezelStyle = 6
const NSCircularBezelStyle = 7
const NSTexturedSquareBezelStyle = 8
const NSHelpButtonBezelStyle = 9
const NSSmallSquareBezelStyle = 10
const NSTexturedRoundedBezelStyle = 11
const NSRoundRectBezelStyle = 12
const NSRecessedBezelStyle = 13
const NSRoundedDisclosureBezelStyle = 14
const NSInlineBezelStyle = 15

declare sub setBezelStyle lib “Cocoa” selector “setBezelStyle:” ( handle as integer, value as integer )
setBezelStyle( me.handle, NSRegularSquareBezelStyle )[/code]

In r2b2 under 10.9.5 it still looks incorrect, like the button is shifted up 1 or 2 pixels, but the shadow stays in the same place. Just like the picture you and Kem posted. Also, in the IDE it looks much better under Retina, the gradient feathering looks correct. Thanks for the info, but the icon on the button is the reason I was looking at the Bevel button.

This pic shows the same button in the IDE and in the built app. Besides the shifting problem look at how much better the shadow looks in the IDE:

Well, NSButton can have an image. Maybe someone can come up with a declare to expose it in the regular Xojo one.

OK. We are not supposed to discuss beta here. Merv, would you be so kind to post the test project in a beta thread so we can pick up from there ? TIA

Sure, but it is not really a beta bug. It’s incorrect in 2015r3.1 and r2016r1.1, that’s where I noticed it. I just mentioned that I had tried it in the very latest code to mention it still is not fixed. I usually get my hand slapped for posting regular bugs in the beta channel. :wink:


OK, filed it as a new Feedback item, # 43885 and started a new Conversation under Beta, but it is probably just a regular bug.

My experience with the bevel button is that it’s not a system control, but a custom Xojo control, like the Listbox. If possible see if you can use a system standard control for Retina.

As Michel points out the standard pushbutton is a lot more customizable that Xojo exposes and can be made to look and feel very much like a Bevel Button with declares. This does of course break x-plat functionality.

Check the Apple AHIG as Apple also suggest avoiding ‘bevel buttons’ in favor of other controls.

If you have the Retina Kit, you can assign a RKPicture to the pushbutton. Once some functionality is exposed that allows me to create a Xojo picture object from a NSImage instance, I want to create a new version of the Retina Kit to fill in the gaps and add more customization.