How can I create this flat style of buttons on a OSX toolbar, using MBS plugins? (Buttons of Xcode 5 on Mavericks)
Now I define the Constructor of a NSButtonMBS like this (and get the old style):
[code]Sub Constructor()
// Calling the overridden superclass constructor.
Super.Constructor( 0,0,40,MainToolbarNSButtonHeight )
Dim f As Double = 1.3
Dim w As Double = f * 21 // width of original picture = 21
Dim h As Double = f * 15 // height = 15
[quote=61420:@Christian Schmitz]so you look for a borderless button?
you could set border to false.[/quote]
Guess what, I tried that already, but the result is not even close to those Xcode buttons … but I keep on searching.
This seems to be more a design problem than anything else: If you draw the border in your icon images (and maybe add some color transitions), you can surely use them looking absolutely like the Xcode buttons when you set border to false.
If you should be looking for a button method that creates the borders: There is none, so either draw the borders yourself or add a method doing this for you.
Buttons now are ‘flat’, translucent and without borders. It looks like just an image is used which changes color according to the button state.
I use vector graphic pdf files for the image on the button, which scale nicely and display crisp and clear also on a retina display. The button background and border is set by this code:
I see. Propably Christian can give you a hint on this. I am currently experimenting with Icons only my own and use MacOSLibs NSImageview control. When I set its style to “No frame”, it gives me an absolutely transparent button with no bevel, filling or whatever. I dont know what stand for “No bezel style” in the MBS list, but did you try the other settings instead besides NSTextureRoundedBezelStyle?
[quote=61489:@Oliver Osswald]Yes, we’re getting closer. However, bezelStyle=21 draws some kind of DisclosureTriangle to the button. How did you calculate this value?
In the reference I found:[/quote]
Sorry, you’re right.
does anyone know how to make it so on the mouse down of this toolbar item there is no white square background?
the no border works great, but the button still has a white background on mouse down for me.