Window Transparency? (Vibrancy)

I hope you get better soon

FWIW Yosemite has caused lots of grief seemingly everywhere not just in Xojo apps
Definitely making me glad my mbp can boot several versions

Thanks man, I have next to no patience and Iā€™m really pissed off with the issues I keep finding in Yosemite.

However this isnā€™t one of them, the ā€˜Reduce transparencyā€™ checkbox was enabled on the Yosemite machine (as I had toggle the ā€œIncreaseā€ contrast option).

Richard, does the vibrancy show up in the Finder windows? If not, then check the ā€œAccessibilityā€ options in System Preferences.

Sam,
the vibrancy is so slight that it is practically not noticeable.

I reran your app, and the left hand column does indeed have very slight vibrancy :slight_smile:

[quote=138366:@Richard Summers]Sam,
the vibrancy is so slight that it is practically not noticeable.

I reran your app, and the left hand column does indeed have very slight vibrancy :)[/quote]
I have found that itā€™s incredible easy for the vibrancy to be very dull, backgrounds with bright colors make it more ā€˜vibrantā€™, especially reds (or orange), blues seem more subdued.

And if you turn it off, then everything becomes really dull and flat, there was nothing wrong with gradients!

I have a dark blue desktop picture, guess thatā€™s why I couldnā€™t even see the vibrancy effect :slight_smile:

Using @Sam Rowlands code in my app that just got into MAS :wink:
Thanks again, Sam :slight_smile:

Sorry about the ridiculously large imagesā€¦

Youā€™re most welcome @Albin Kiland Glad it helped.

@Ulrich oder @Jason: how do I make your code work? Copied into a project it gives me error messages at almost every line of code. Could you post a Xojo project?

1.) Add Jasonā€™s code above to the Open event handler of your window
2.) drag&drop the macoslib folder into your project (from the macoslib.rbvcp project)
3.) Cmd+K to display remaining errors
4.) Replace any NSRect by Cocoa.NSRect
5.) Now try to run it

http://osswald.com/xojo/test/test_vibrancy.xojo_binary_project.zip

Simple question:

do you like Vibrancy on the windows ?

In the MenuBar, they added something like that (or simply that !) and I liked it so much that I remove it (irony).

I do not get the advantage, but I do see the cons.

That looks like some newspaper pages where you can read back page headlines :(.

I may be wrong.

with MBS Plugin, you can use code like this to add background:

[code] // Sets up a NSVisualEffectView for the Window
#if targetmacos
dim win as NSWindowMBS = self.NSWindowMBS

// left light
dim view1 as new NSVisualEffectViewMBS(0, 0, width/2, height)

win.contentView.addSubview(view1, -1, nil)

// right dark
dim view2 as new NSVisualEffectViewMBS(width/2, 0, width, height)

view2.material = view2.NSVisualEffectMaterialDark

win.contentView.addSubview(view2, -1, nil)

#endif[/code]

1 Like

It seems to work with MBS but I cannot get masks to work (t get a round window like the Volume in/decrease window).
Anyone get lucky with this?

@Beatrix: Iā€™m sorry, the method I copied uses a few computed properties I reuse in my class. If you still like to see it, I could send it to you privately because itā€™s a project in beta. But itā€™s still not perfect, and that brings me to another question:

@Sam or @Jason: I am still struggling with the correct handling of the subviews Ā– my effect layer is not placed seamlessly in my drawer Ā–, and my requests to Xdev have been unanswered. Iā€™d very much like to view your code examples and surely would pay for aXDdev issue, but as long as there is no reply from them do you think you could grant me a look into correctly placing a subview with all Context values being treated correctly?

I have the example project on my yosemite machine (still havenā€™t updated my main machine yet) so I can try to post it when I get back to that machine later today or early tomorrow. If you PM me or post a link to your NSDrawer project so I can look into it that would definitely help as well.

I was doing some research yesterday and it seems that NSFullSizeContentViewWindowMask is 1<<15 (32768) although that value doesnā€™t appear to be documented by Apple anywhere that I can find.

That would be great, thanks a lot!
Regarding sending back: You are no beta tester, are you? In that case IĀ‘d have to tweak a few things back from using some new framework stuff. Let me see if I got this working Ā…

Yeah Iā€™m not a beta tester unfortunately. Will post the example when I get back to my yosemite machine.

Wasnā€™t that difficult. Here is what I have so far:
https://dl.dropboxusercontent.com/u/21200221/Xojo/MacOSDrawer%20Demo%202.1.xojo_xml_project.zip

Ok great. Will take a look at it in a couple hours.

[quote=140480:@Christoph De Vocht]It seems to work with MBS but I cannot get masks to work (t get a round window like the Volume in/decrease window).
Anyone get lucky with this?[/quote]
I had exactly the same issue, it worked with one DP and then didnā€™t, this is when you remove the titlebar from the window right? If the titular is there masks works, without it, it no longer does. Iā€™ve tried to find an alternative way of doing this (as there must be a way Apple are using it for the volume and screen brightness) but Iā€™ve not found one yet.

The issue is that any control placed under/behind a NSVisualEffectView gets hidden by the NSVisualEffectView. My solution is to create the NSVisualEffectView with no controls on top and then to move it into place using code.

Iā€™ve been working on a more elegant solutionā€¦[quote=140563:@Jason King]@Ulrich Bogun It seems to me Apple has expanded the API Ā– but the details are a bit hard to find. Where is NSFUllSizeContentViewWindowMask defined?
I was doing some research yesterday and it seems that NSFullSizeContentViewWindowMask is 1<<15 (32768) although that value doesnā€™t appear to be documented by Apple anywhere that I can find.[/quote]
NSWindow.h within the docset of Xcode 6.