Re: Blurry is the New Sharp
Re: Blurry is the New Sharp
- Subject: Re: Blurry is the New Sharp
- From: Uli Kusterer <email@hidden>
- Date: Tue, 06 Jan 2015 23:56:43 +0100
On 05 Jan 2015, at 13:58, Charles Jenkins <email@hidden> wrote:
> Leaving aside any discussion of whether it was a good idea to add "vibrancy" to the OS, I do have a question about how to use it.
It’s amazing how many people don’t understand what the phrase “leaving aside” means on this mailing list. :-p
> But for a sidebar like the iTunes source view, it just seems wrong to blur in content from whatever other window happens to be open behind the current app. Theoretically the two apps have nothing in common, and blurring in the background app's content doesn't help the user in any way.
>
> My app will have a source view, so I'd like to know if there's a way to tell the window server to use only the desktop image to create vibrancy effects in a the sidebar, ignoring any other windows which may lie between my app and the desktop.
I don’t know that Apple provides a way to do this, but would assume you could probably get the path of the desktop background from NSUserDefaults (FSEventer is great for toggling a preference and seing which prefs file gets changed as a result), load it, blur it using CoreImage, then use that image as the content for a CALayer that you put behind your outline view. Of course that has various issues:
1) You still have to figure out and apply the appropriate vibrant text colors yourself
2) If the user has her desktop background set to rotate through images periodically, you don’t just need to watch for this change, you’d also have to find a way to change the image in sync with the crossfade the OS does
3) If a user has multiple screens, there may be different backgrounds and you’ll have to update your window when it moves between screens, even if the resolution scales on both screens are the same.
4) I have no idea whether Apple lets apps in the app store that read “their” prefs keys.
5) If Apple ever change the algorithm or look used for vibrant list views, your app will look out of place.
Hope that helps in some way.
Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden