Hi,
I have just viewed my app in Yosemite, and noticed that only sheet windows have the semi-transparency?
Is it not possible in Xojo, to make other windows semi-transparent too? Or is this expected?
I was under the impression that all windows in the new OS had the semi-transparency?
hope someone can advise.
[quote=136059:@Richard Summers]I have just viewed my app in Yosemite, and noticed that only sheet windows have the semi-transparency?
Is it not possible in Xojo, to make other windows semi-transparent too? Or is this expected?
I was under the impression that all windows in the new OS had the semi-transparency?
hope someone can advise.[/quote]
Open TextEdit : no transparency in the window or menu
Mail : same thing
etc.
Seems transparency is not required at all for apps windows.
Sam Rowlands has shared precious techniques to create Yosemite style transluscency in Xdev : https://gumroad.com/l/DXbT
[quote=136076:@Eli Ott]In a window’s Open event:
Declare Sub setAlphaValue Lib "Cocoa" Selector "setAlphaValue:" (NSWindow As Ptr, alphaValue As Single)
setAlphaValue(Ptr(Self.Handle), 0.5)[/quote]
This is a nice way to render the entire window transparent.
But Yosemite way is different. Windows are not transparent, they are transluscent. A bit like a glass you blow your breath on. Things behind them appear foggy.
And if the background is transluscent, controls remain opaque.
Thanks guys - interesting information.
Jason, that seems like exactly what I was referring to. All we need now is a genius to convert that into a declare
I can try and create the class with declares later today or tomorrow, but someone else will have to test it because I don’t have Yosemite on any of my machines yet.
“Vibrancy” (what Apple calls the translucency) below toolbars(1) is one of the places where Yosemite will prove difficult in Xojo (since below the toolbar the actual content is supposed to be affecting the translucency). The other one will be controls and toolbars in window titles (2).
Not sure why you think that Xojo won’t handle the toolbar properly
We DO use a native toolbar
As far as I know thats one reason that its NOT set up to be customizable etc yet as that infrastructure in Cocoa is … well … a horrid API to make it work in Xojo in a way that won’t give everyone fits
Controls in the tool bar, IF you use real Cocoa controls (NSButton etc), should behave similarly
Much of Cocoa assumes you’re using only Apple’s frameworks, like AppKit, and Xcode and stepping slightly outside that bounding box is painful.
From that perspective Carbon was a much nicer API for what we do - ask Joe about it sometime
Example 1 is most interesting. I naively thought vibrancy was transluscency, I was wrong. It appears to be a combination of transluscency with a fogged rendition of what lies behind the window, and a reflection of the content, as well demonstrated by the green, red and blue landscape reflecting in the toolbar.
The same occurs with the map below.
Interestingly enough, the reflection does not manifest on the left pane of the Desktop Pictures window, which seems to be exclusively transparency.
Both seem at first glance very difficult to emulate, would it be to mimic Yosemite under Mavericks…
[quote=136137:@Norman Palardy]Not sure why you think that Xojo won’t handle the toolbar properly
We DO use a native toolbar[/quote]
[quote=136138:@Michel Bujardet]Example 1 is most interesting. I naively thought vibrancy was transluscency, I was wrong. It appears to be a combination of transluscency with a fogged rendition of what lies behind the window, and a reflection of the content, as well demonstrated by the green, red and blue landscape reflecting in the toolbar.
The same occurs with the map below.[/quote]
Yes. This is what I meant.
In the first example the toolbar is not reflecting the content but showing the content that lies “behind” the toolbar. I can’t demonstrate because this iMac doesn’t even support translucency.
In the second example the window’s title bar is integrating the toolbar controls.
Neither of these can be done with the native toolbar Xojo indeed supports, to the best of my knowledge, at this point. The first one even requires content to exist behind the toolbar (unless I’m wrong and misinterpreting what it’s doing).
Two more examples (now embedded since Norman has shown tinyurl redirected urls work just as the final URLs themselves)
Interesting but I literally just yesterday scrubbed a drive clean and installed the release and mine looks nothing like the images posted
By default there doesn’t seem to be much translucency applied
I just booted it up now to see the differences but I can’t spot any translucency in the various apps mentioned
In the content region sure I’ve seen that
But not the toolbar like Eduardo was showing
At least not in the clean install of 10.10 I just had running
And since the toolbar & windows etc are native you can very likely use a declare to set them to behave similarly
You can’t just by dropping one on a window or opening a window but that what declares are for