Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lofight

macrumors 68000
Original poster
Jun 16, 2007
1,954
2
A user named VL-Tone on Macthemes2.net forums has discovered how to vector the UI at scale x1.0, He has also found how to modify the look of the OS.

Mactheme writes:
New forum user VL-Tone has delved into the depths of Leopard and has returned with screenshots of a funky-colored OS X. Though the crack is far from perfect (According to VL-Tone, it runs very slowly) it proves that it’s certainly possible to theme Leopard. Also, according to esXXI, a handful of images are used to theme every single button of every size in Leopard, certainly a step up from having to make an image for every size in Tiger. The original topic can be found here.

VL-Tone writes:
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)

You can find the Thread here
You can find various screenshots in the thread that are modified.
 
Wow! That seems to be coming along really well, and really fast. I can't wait for a native Leopard installer.

Let the theming begin! :)

Edit: Uploaded a picture of the milk theme installed on my Macbook using the one-click-install script from the thread. Looks pretty good so far. :D
 

Attachments

  • Picture 3.png
    Picture 3.png
    662.4 KB · Views: 522
Wow! That seems to be coming along really well, and really fast. I can't wait for a native Leopard installer.

Let the theming begin! :)

Edit: Uploaded a picture of the milk theme installed on my Macbook using the one-click-install script from the thread. Looks pretty good so far. :D

great! It's a shame I don't have leopard..
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.