You are not logged in.
- Index
- » Mac GUI Discussion
- » Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
#1 Mar 24, 2008 1:04 am
- VL-Tone
- Member
- Joined: Mar 23, 2008
Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Hi there, first post here!
Contrary to what John Siracusa wrote in his review of Leopard on Ars Technica, the final build of Leopard doesn't draw its UI using the new vector UI engine (Core UI), unless you set the resolution scale to something other than 1.0.
As discussed in this forum, at scale 1.0x, Leopard relies in part on the good old Extra.rsrc file (HIToolbox) and some intermediary solution that uses the SArtFile.bin and ArtFile.bin files that are found in
/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/
The format of these files have yet to be cracked, though some have managed to extract some .png, pdf and tiff files from SArtFile.bin using FileJuicer. Still, there's no way of inserting back modified bitmaps into SArtFile.bin.
Having some experience in reverse-engineering (having cracked the Super Mario 64 level and polygon format amongst other things) I decided to take a look inside the CoreUI executable using an hex editor, looking for clues about the Art Files.
I stumbled on this string: "CUIDisableArtFile"
It looked like a key that could be written to using the "defaults write" command, though I wasn't sure of where it should be written. Not so far from there is the "AppleScrollBarVariant" key, which was familiar to me (and to others here I'm sure). It can be used to enable scroll-bars with double-arrows at each end. The command to do so is
defaults write "Apple Global Domain" AppleScrollBarVariant DoubleBoth
So I decided to try this in the terminal:
Code:
defaults write "Apple Global Domain" CUIDisableArtFile 1
But just before doing that, I tried another key that was near CUIDisableArtFile.
Code:
defaults write "Apple Global Domain" CUIAllowDebugPrefs 1
I was lucky, because I found afterwards that the CUIAllowDebugPrefs key has to be set to true (or 1) for the CUIDisableArtFile key to have any effect.
I had already done some experiments soon after getting Leopard, with the high res material bitmap files found in
/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/AquaUI.bundle/Contents/Resources .
I had recolorized some of the big shiny blobs that can be found there, to then discover that the changes would only be visible when the scale was set at something other than 1.0x
I wasn't sure if that CUIDisableArtFile would work as I expected, disabling the use of the Art Files and forcing the use of the vector UI. I decided to restart to check if there would be a difference. I was surprised to see that the Restart button in the dialog was pulsing red instead of blue! The changes I made last year were finally visible at 1.0x!
Now, before I go further: Here are the bad news... The UI seems to slow down in a noticeable way when this is turned on. Resizing Finder windows now stutters even though it's normally very smooth on my core duo 2 Mac mini. The first time the Finder boots after a restart, you can see windows being drawn part by part as they appear.
Also, the toolbar buttons are not visible, only their icon badges. It's not necessarily a bad thing, it gives the UI a cleaner look.
And another thing, it seems that the scrollbars are still drawn using the Extra.rsrc file, as my UI still displays the iTunes 7 scrollbars I've installed.
I recolorized half of the AquaUI bitmaps green, and the other half purple. More targeted changes could be made to only parts of the UI. Some bitmaps, such as the traffic light widgets and the white aqua buttons were not changed. But they can be changed, they're pretty obvious: redmaterial.png , yellowmaterial.png and greenmaterial.png. The white buttons (or inactive buttons) are using clearmap.png.
Other interesting keys I've found:
Code:
defaults write "Apple Global Domain" CUIShowPieces 1
Will draw red outlines around CoreUI drawn widgets.
Code:
defaults write "Apple Global Domain" CUIShowInputBounds 1
Draws blue outlines around the clickable region of a CoreUI widget.
Note that these two last commands requires CUIAllowDebugPrefs to be set to 1.
Other keys found nearby:
Code:
CUIDisableImageCache CUICoreImageHardwareAccel CUIEmbossWorkaround CUIBundle2Segments CUIUseLeopardLiveEffect NSUseLeopardWindowValues HIUseLeopardMenuValues HIUseLeopard2MenuValues
I didn't try them all, but those I've tried didn't seem to change anything. (CUICoreImageHardwareAccel didn't solve the performance problems in this mode for my machine)
Last edited by VL-Tone (Mar 24, 2008 3:49 am)
Offline
#2 Mar 24, 2008 2:47 am
- prelude6x6

- Member
- From: Norway
- Joined: Feb 29, 2008
- Website
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Impressive !
*clapping*
Offline
#4 Mar 24, 2008 2:57 am
- Olivier Charavel

- Member
- From: France
- Joined: May 5, 2007
- Website
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
This is just.... well guess people will have fun now !
Offline
#5 Mar 24, 2008 3:48 am
- Pierre Breteau

- Member
- From: France
- Joined: Mar 17, 2007
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Woha.
Offline
#6 Mar 24, 2008 4:12 am
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Interesting. This doesn't seem like a solution to the theming dilemma, but it's certainly interesting to play with.
Last edited by Taylor_C (Mar 24, 2008 4:14 am)
Offline
#7 Mar 24, 2008 4:37 am
- computergek80

- Member
- From: The Netherlands
- Joined: Aug 4, 2007
- Website
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Great research!![]()
Offline
#8 Mar 24, 2008 5:56 am
- Merlish

- Member
- From: Copenhagen
- Joined: Jan 13, 2008
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
You just took us one great step closer to styling Leopard. ![]()
Thank you.
Offline
#9 Mar 24, 2008 9:40 am
- Christian BS

- Member
- From: London, UK
- Joined: May 29, 2007
- Website
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Could someone explain it in n00b words for a dumbarse such as myself?
Much obliged,
Anon.
Offline
#10 Mar 24, 2008 9:51 am
- chrisdazzo

- Member
- From: Colo/fornia
- Joined: Aug 22, 2007
- Website
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Wow, nice! I think this might be useful in the future with theming and whatnot...
Great work.
Offline
#11 Mar 24, 2008 9:58 am
- cmyk.designs

- Member
- From: Melbourne, Australia
- Joined: May 24, 2006
- Website
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Very interesting! Props to you Sherlock! ![]()
Offline
#13 Mar 24, 2008 11:03 am
- Tobbz

- Member
- From: #TUMT
- Joined: Apr 22, 2005
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
close your mouth, i smell smullers mom.
Offline
#14 Mar 24, 2008 11:31 am
- revision29
- Member
- From: Illinois
- Joined: Mar 22, 2007
- Website
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
I am currently testing this on my 1GHz Powerbook. I really like that the toolbar buttons are not drawn. It really gives the gui an added smoothness. However, the performance hit that I have taken for this is not worth the coolness of using the CoreUI engine instead of the SArtFile. This makes me sad b/c Mail looks so frikkin sweet now!
Offline
#18 Mar 24, 2008 12:05 pm
- macprodan

- Member
- From: U.K
- Joined: Nov 11, 2007
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
I wonder what CUIUseLeopardLiveEffect does.
Offline
#19 Mar 24, 2008 3:34 pm
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Using it right now. On a C2D MacBook feels kinda well, no performance hit so far.
With this limited 'exploit' it seems possible an all iTunes theme, or it's wishful thinking?
Offline
#20 Mar 24, 2008 3:39 pm
- Merlish

- Member
- From: Copenhagen
- Joined: Jan 13, 2008
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Lalalà wrote:
Using it right now. On a C2D MacBook feels kinda well, no performance hit so far.
With this limited 'exploit' it seems possible an all iTunes theme, or it's wishful thinking?
Almost possible at least. ![]()
Offline
#22 Mar 24, 2008 3:52 pm
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
Quick go at trying to make a milk-like theme:
Unfortunately it seems like buttons have a 1px blue inner shadow at the top that isn't coming from a file... There is a real noticable performance hit with all the apps using it (export window in Fireworks takes 3-5 seconds to appear).
[Right-click, open image in new tab for large view]
The most awesome thing is that literally 3 or 4 different images (used for a dozen or so) theme all button styles and sizes from capsule buttons to thumbs, to list headers. With any luck, someone will use this method (perhaps finding a way to untangle the slowing debugging) and we could have psuedo theming.
Last edited by esXXI (Mar 24, 2008 3:55 pm)
Offline
#25 Mar 24, 2008 4:31 pm
- Merlish

- Member
- From: Copenhagen
- Joined: Jan 13, 2008
Re: Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x
esXXI wrote:
Quick go at trying to make a milk-like theme:
Unfortunately it seems like buttons have a 1px blue inner shadow at the top that isn't coming from a file... There is a real noticable performance hit with all the apps using it (export window in Fireworks takes 3-5 seconds to appear).
http://foam.vanillasoap.com/src/1206398919208.png
[Right-click, open image in new tab for large view]
The most awesome thing is that literally 3 or 4 different images (used for a dozen or so) theme all button styles and sizes from capsule buttons to thumbs, to list headers. With any luck, someone will use this method (perhaps finding a way to untangle the slowing debugging) and we could have psuedo theming.
It's not that slow, really. The only prob is actually the blue line.
Offline
- Index
- » Mac GUI Discussion
- » Breakthrough discovery! Make Leopard use the vector UI at scale 1.0x

