Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > GUI Customization > Modifying Panther Shadows

Modifying Panther Shadows
Thread Tools
Sage
Mac Elite
Join Date: Apr 2003
Location: SoCal
Status: Offline
Reply With Quote
Oct 28, 2003, 11:26 PM
 
I just posted this link in another thread, but I know a large number of themers were really sour about Panther's fixed shadow setting, so here's some info from Izawa about how to change that shadow.
     
swiz
GUI Punk
Join Date: Jan 2002
Location: S.E. Mitten
Status: Offline
Reply With Quote
Oct 28, 2003, 11:45 PM
 
Man I wish I knew how he or someone he knows figures this stuff out. Lame of Apple to force us to modify binary files to do this though.

24" AlumiMac 2.4ghz C2D, 4g Ram, 300g HD, 750g USBHD • 80g iPod • 160g ATV • iPhone 3g
     
NetworkShadow
Mac Elite
Join Date: Nov 2002
Status: Offline
Reply With Quote
Oct 28, 2003, 11:59 PM
 
Well glad to hear we've taken down most of the panther "limitations" already! Jobs can't stop the gui geeks!
click one
     
Phoenix1701
Senior User
Join Date: Jun 2001
Location: Massachusetts, USA
Status: Offline
Reply With Quote
Oct 29, 2003, 01:00 AM
 
So if I'm reading this page right, the shadow image in CoreGraphics begins at 2CAD40h and is divided up into a left half and right half... but there's something in there about 0AF8h and 0AB0h... what are those? They can't be lengths, if the pixel dimensions are the same for both sides... clue, anyone?
     
Mike S.
Senior User
Join Date: Jun 2002
Status: Offline
Reply With Quote
Oct 29, 2003, 01:27 AM
 
Note to BBX: Don't follow that link or you may get a glimpse at Izwa's dark "Shinobi" theme and you indicated you didn't accidentally want to see it before "Omega" was finished.

Back on topic, wouldn't modifying core graphics incorrectly cause big problems? Sounds kind of dangerous for something that seems so minor.
     
bbxstudio
Grizzled Veteran
Join Date: Sep 2002
Location: Canada
Status: Offline
Reply With Quote
Oct 29, 2003, 12:48 PM
 
Originally posted by Mike S.:
Note to BBX: Don't follow that link or you may get a glimpse at Izwa's dark "Shinobi" theme and you indicated you didn't accidentally want to see it before "Omega" was finished.
Too late - I actually got curious and had to investigate last week... Omega looks nothing like Shinobi, DSX, Tuxedo or any other theme
     
NetworkShadow
Mac Elite
Join Date: Nov 2002
Status: Offline
Reply With Quote
Oct 29, 2003, 12:52 PM
 
Originally posted by bbxstudio:
Too late - I actually got curious and had to investigate last week... Omega looks nothing like Shinobi, DSX, Tuxedo or any other theme
Better too hu? I never was a huge fan of Shinobi, and I only liked DSX modded to a different color than yellow. TuXedo, I might have over used, but it's still a sweet theme.

So will this shadow hack be built-into themes in the future? Or is that posable yet?
click one
     
swiz
GUI Punk
Join Date: Jan 2002
Location: S.E. Mitten
Status: Offline
Reply With Quote
Oct 29, 2003, 01:03 PM
 
Originally posted by NetworkShadow:
Better too hu? I never was a huge fan of Shinobi, and I only liked DSX modded to a different color than yellow. TuXedo, I might have over used, but it's still a sweet theme.

So will this shadow hack be built-into themes in the future? Or is that posable yet?
I wont be doing it because Im gonna listen to the developers who suggest not modding binary files. There is also a possibility that the future of ThemeChanger will include not applying themes which attempt to do so. Or is it that they woudl just skip the binary file swap?

24" AlumiMac 2.4ghz C2D, 4g Ram, 300g HD, 750g USBHD • 80g iPod • 160g ATV • iPhone 3g
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Oct 29, 2003, 01:45 PM
 
I've been interested in figuring out ways of doing this safely. I was thinking that you could specify the expected md5sum of the file, an offset and some data to write, but since Apple's prebinding hack changes binaries and therefore their checksums, I doubt that would work. Hmm.
     
Phoenix1701
Senior User
Join Date: Jun 2001
Location: Massachusetts, USA
Status: Offline
Reply With Quote
Oct 29, 2003, 01:48 PM
 
Why not just do a sort of find-and-replace instead? If you specify *exactly* the image that should be in the file, then even if it does change offset in a future OS build, as long as it's the same image it will serve the same purpose, so the logic would be that it'll be safe to change it. That logic really only holds for long strings that represent images, but if that's all we're ever changing (it seems to be, yes?) then it should hold.
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Oct 29, 2003, 01:55 PM
 
Originally posted by Phoenix1701:
Why not just do a sort of find-and-replace instead? If you specify *exactly* the image that should be in the file, then even if it does change offset in a future OS build, as long as it's the same image it will serve the same purpose, so the logic would be that it'll be safe to change it. That logic really only holds for long strings that represent images, but if that's all we're ever changing (it seems to be, yes?) then it should hold.
Doh! Of course, that should work. Hmm... There was a reason I was thinking md5sums, because it's related to Jason's theory ages ago on how a decent theme switcher should work. Of course, it's no major issue for resource files, which most of the things you should be patching with a theme switcher should be.

OK, now all we need is a theme format which will support it. I haven't looked at dlta for some time, I can probably hack something into it.
     
NetworkShadow
Mac Elite
Join Date: Nov 2002
Status: Offline
Reply With Quote
Oct 29, 2003, 02:40 PM
 
The shadows are just .png images right? Seems to me you could just replace them. I don't know much about binary files though.
click one
     
kmkkid
Professional Poster
Join Date: Mar 2002
Location: Brantford, ON. Canada
Status: Offline
Reply With Quote
Oct 29, 2003, 03:07 PM
 
Does this mean that a willing programmer could create a program to replace drop shadows of our choice? Like squared off ones, or really thick ones/thin ones etc.. If mighty mouse is possible, I'm sure that would be. OS X needs a winFX type program to do all the nifty GUI changes.


Chris
     
TheDisaster
Dedicated MacNNer
Join Date: Apr 2003
Location: Rochester, NY
Status: Offline
Reply With Quote
Oct 29, 2003, 03:32 PM
 
Modifying binary files is *potentially* big mistake. I have no problem installing themes with these changed binaries, if I have faith in where they are coming from. But it sucks that the way the shadows are handled has changed.
|wishing is for suckers|
     
NetworkShadow
Mac Elite
Join Date: Nov 2002
Status: Offline
Reply With Quote
Oct 29, 2003, 03:33 PM
 
Mybe unsanity could make a haxie? Window shade X has shadow prefs already.
click one
     
kmkkid
Professional Poster
Join Date: Mar 2002
Location: Brantford, ON. Canada
Status: Offline
Reply With Quote
Oct 29, 2003, 03:37 PM
 
Originally posted by TheDisaster:
Modifying binary files is *potentially* big mistake. I have no problem installing themes with these changed binaries, if I have faith in where they are coming from. But it sucks that the way the shadows are handled has changed.
If you change them in memory instead of physically, it's not dangerous at all.


Chris
     
keston
Mac Enthusiast
Join Date: Jan 2001
Location: Toronto, Canada.
Status: Offline
Reply With Quote
Oct 29, 2003, 03:52 PM
 
Doesn't WindowShade X already do this? OR are you refering to the menu-bar shadow?

Originally posted by kmkkid:
Does this mean that a willing programmer could create a program to replace drop shadows of our choice? Like squared off ones, or really thick ones/thin ones etc.. If mighty mouse is possible, I'm sure that would be. OS X needs a winFX type program to do all the nifty GUI changes.


Chris
     
G0Ducks
Grizzled Veteran
Join Date: Aug 2002
Location: Springfield, Oregon
Status: Offline
Reply With Quote
Oct 29, 2003, 05:18 PM
 
Originally posted by keston:
Doesn't WindowShade X already do this? OR are you refering to the menu-bar shadow?

In theory, one could change these shadows into something else right. Something like glows, or de-bossing, or fire or something kewl like pink flamingos!


Just wondering.

Ryan
     
NetworkShadow
Mac Elite
Join Date: Nov 2002
Status: Offline
Reply With Quote
Oct 29, 2003, 08:33 PM
 
Originally posted by keston:
Doesn't WindowShade X already do this? OR are you refering to the menu-bar shadow?
Ya it does, kinda. it doesn't change the shape of the shadows though... but here's the list of settings:
-shadow spread
-shadow density
-horizontal offset
-vertical offset
and you can do the same settings for inactive windows.

That would be cool if you could add glows or something instead of a shadow.
click one
     
TheDisaster
Dedicated MacNNer
Join Date: Apr 2003
Location: Rochester, NY
Status: Offline
Reply With Quote
Oct 30, 2003, 12:22 AM
 
Oh man, I could make a totally rad theme if I could change the color and size of the shadows. That would mean you could change the direction they came form too right?
|wishing is for suckers|
     
NetworkShadow
Mac Elite
Join Date: Nov 2002
Status: Offline
Reply With Quote
Oct 30, 2003, 01:48 AM
 
Window shade X does change the direction to some extent.
click one
     
smeger
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Oct 30, 2003, 02:22 PM
 
I don't think I understand the problem. Can someone help?

Here are three screenshots I took under Panther while using different themes. I've used Windowshade X to make the shadow very dark and well-defined. In all three shots, the shadow looks like I'd expect it to.

Is WindowShade X fixing the shadow? Or am I missing something?

Here are the shots:

Square-edged theme
Round-edged theme
FlagShip (this one also shows my WindowShade X settings)
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Phoenix1701
Senior User
Join Date: Jun 2001
Location: Massachusetts, USA
Status: Offline
Reply With Quote
Oct 30, 2003, 04:44 PM
 
WindowShadeX appears to be fixing the problem in those screenshots, though it's a little difficult to say for sure because of the shadow settings you used. If you diffused out the shadow a bit, I could probably give you a better answer.
The difference between these shadows and the ones in CoreGraphics is that if you look at the images in CoreGraphics, you'll notice that the actual shadow ends below the titlebar; the titlebar itself has a well-defined background that creates a translucent border around the edges. It is this border, not the actual shadow, that is the wrong shape for squared-off window titlebars. I suspect that WindowShadeX replaces this entire structure with a single shadow, so I would expect that a more diffuse shadow would cause there to be no border around the window titlebars at all.
     
TheDisaster
Dedicated MacNNer
Join Date: Apr 2003
Location: Rochester, NY
Status: Offline
Reply With Quote
Nov 2, 2003, 05:13 PM
 
Does anybody know how changing the shadows like this would work with the way the active window has a larger shadow? Is there two images in there?
|wishing is for suckers|
     
Phoenix1701
Senior User
Join Date: Jun 2001
Location: Massachusetts, USA
Status: Offline
Reply With Quote
Nov 2, 2003, 05:21 PM
 
Yup. Four, actually; left side and right side for each state.
     
TheDisaster
Dedicated MacNNer
Join Date: Apr 2003
Location: Rochester, NY
Status: Offline
Reply With Quote
Nov 3, 2003, 12:32 AM
 
Has anybody done this that can explain to me exactly how it's supposed to be done? That translation wasn't exactly the best and I'm not sure of where the image starts within the file.
|wishing is for suckers|
     
NetworkShadow
Mac Elite
Join Date: Nov 2002
Status: Offline
Reply With Quote
Nov 3, 2003, 12:47 AM
 
Originally posted by smeger:
I don't think I understand the problem. Can someone help?

Here are three screenshots I took under Panther while using different themes. I've used Windowshade X to make the shadow very dark and well-defined. In all three shots, the shadow looks like I'd expect it to.

Is WindowShade X fixing the shadow? Or am I missing something?

Here are the shots:

Square-edged theme
Round-edged theme
FlagShip (this one also shows my WindowShade X settings)
Ya unsanity should have a haxie that just does the shadow settings, or we should all register WindowShade X.
click one
     
NetworkShadow
Mac Elite
Join Date: Nov 2002
Status: Offline
Reply With Quote
Nov 3, 2003, 12:54 AM
 
Originally posted by Phoenix1701:
I suspect that WindowShadeX replaces this entire structure with a single shadow, so I would expect that a more diffuse shadow would cause there to be no border around the window titlebars at all.
You can turn the window border on or off with WindowShadeX too it seems.
click one
     
TheDisaster
Dedicated MacNNer
Join Date: Apr 2003
Location: Rochester, NY
Status: Offline
Reply With Quote
Nov 3, 2003, 01:21 AM
 
I'd use WindowShadeX just to fix my shadows, but I just read the Project Monolith thread, which sounds like it may be possible to install themes in memory like people were talking above, which means we could change the shadows this way safely. I want to make the shadow smaller and change the color, so it's more of a glow.
|wishing is for suckers|
     
keston
Mac Enthusiast
Join Date: Jan 2001
Location: Toronto, Canada.
Status: Offline
Reply With Quote
Nov 3, 2003, 09:14 AM
 
Don't start referencing vaporware till you see it in action...

Originally posted by TheDisaster:
I'd use WindowShadeX just to fix my shadows, but I just read the Project Monolith thread, which sounds like it may be possible to install themes in memory like people were talking above, which means we could change the shadows this way safely. I want to make the shadow smaller and change the color, so it's more of a glow.
     
TheDisaster
Dedicated MacNNer
Join Date: Apr 2003
Location: Rochester, NY
Status: Offline
Reply With Quote
Nov 3, 2003, 01:41 PM
 
I used the word may for a reason. I want to change the shadow into a glow, which I can't do with WindowShadeX. So I inquired about a way that it can be done.
|wishing is for suckers|
     
slava
Forum Regular
Join Date: Oct 2001
Location: Unsanity
Status: Offline
Reply With Quote
Nov 9, 2003, 11:25 AM
 
Originally posted by NetworkShadow:
You can turn the window border on or off with WindowShadeX too it seems.
Here's the scoop for the Panther. There is a private call that sets the window shadows settings (it existed back in 10.1, too). WindowShade X uses it to customize the shadows, so does the system to set the shadows on newly created windows.

In pre-Panther days, there was a flags parameter in that function, but it was only used to set/unset the window border visibility (something that WSX uses too). In Panther, Apple has added some additional flags that indicate "standard" window shadows, such as active window shadow, inactive window shadow etc. When Quartz (WindowServer) encounters these flags, it actually "cheats" and uses a pre-computed shadows instead of calculating them based on the real window shape. This is of course done for speed purposes.

When WindowShade X custom shadows are enabled, it will unset the 'standard shadow' flags thus making WindowServer actually recalculate the shadow for every window. This is why smeger was seeing "right" shadows with the WindowShade X enabled.

Sorry if that sounded a bit spontaneous or technical. =) Hope my Russian English makes sense this time.
// slava@unsanity
     
NetworkShadow
Mac Elite
Join Date: Nov 2002
Status: Offline
Reply With Quote
Nov 9, 2003, 02:31 PM
 
You're english is better than the average American, and I sorta understood that in my limited programing knowledge.

I also registered WindowShade X last week.
So would there be a way to make different color shadows or is that hard coded?
click one
     
TheDisaster
Dedicated MacNNer
Join Date: Apr 2003
Location: Rochester, NY
Status: Offline
Reply With Quote
Nov 9, 2003, 05:08 PM
 
I understand what's going on now, I just wish I could understand the instructions on desktopper. Unless WindowShadeX could change shadow colors, then I wouldn't have the slightest interest in modifying CoreGraphics.
|wishing is for suckers|
     
slava
Forum Regular
Join Date: Oct 2001
Location: Unsanity
Status: Offline
Reply With Quote
Nov 9, 2003, 05:21 PM
 
Originally posted by NetworkShadow:
I also registered WindowShade X last week.
So would there be a way to make different color shadows or is that hard coded?
Thanks! Unsanity is a 'real job' venture and we entirely depend on support of our users, as we have no other sources of income.

As for the colored shadows, I have not investigated yet, but off-hand, no. Last time I checked (and I must admit it was back in Jaguar), WindowServer was manipulating shadows in greyscale to speed up calculations; unless that is changed, I doubt colored shadows were added (as it's 3 times slower (R,G,B) to calculate a color shadow over some arbitrary background in comparison to greyscale (Alpha)).

I will look into it, though, as soon as we'll finish updates for other mission-critical haxies.
// slava@unsanity
     
NetworkShadow
Mac Elite
Join Date: Nov 2002
Status: Offline
Reply With Quote
Nov 9, 2003, 05:48 PM
 
I thought as much about the color knowing what Apple did with the brushed metal...

Ya I love your haxies, and I must say "wow" knowing it's your only income. I think FontCard, Menu Master, Mighty Mouse, and Xounds are the only haxies I don't have registered. I might give Xounds a try, I liked the sound sets in OS 9. And FontCard might be useful for me since I'm a designer.
click one
     
TheDisaster
Dedicated MacNNer
Join Date: Apr 2003
Location: Rochester, NY
Status: Offline
Reply With Quote
Nov 9, 2003, 06:39 PM
 
Originally posted by slava:
As for the colored shadows, I have not investigated yet, but off-hand, no. Last time I checked (and I must admit it was back in Jaguar), WindowServer was manipulating shadows in greyscale to speed up calculations; unless that is changed, I doubt colored shadows were added (as it's 3 times slower (R,G,B) to calculate a color shadow over some arbitrary background in comparison to greyscale (Alpha)).
That's what I was afraid of... Thanks for the input, saves me a lot of time/headaches messing with it.
|wishing is for suckers|
     
keston
Mac Enthusiast
Join Date: Jan 2001
Location: Toronto, Canada.
Status: Offline
Reply With Quote
Nov 10, 2003, 12:28 AM
 
emm.. using the word "only" along with a list of four items does not compute

pet peeves

Originally posted by NetworkShadow:
I think FontCard, Menu Master, Mighty Mouse, and Xounds are the only haxies I don't have registered.
     
Chris Grande
Senior User
Join Date: Mar 2002
Location: CT
Status: Offline
Reply With Quote
Nov 10, 2003, 12:48 AM
 
Maybe some of UI people can tell me what is causing this problem with Panther's Shadows...see this thread for details: http://forums.macnn.com/showthread.p...hreadid=187777
     
Catfish_Man
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Nov 10, 2003, 01:13 AM
 
Originally posted by slava:
When Quartz (WindowServer) encounters these flags, it actually "cheats" and uses a pre-computed shadows instead of calculating them based on the real window shape. This is of course done for speed purposes.
I figured it was something like this... well, congrats to Apple for speeding things up, but that's still kinda annoying for the people who like square edge themes.
     
wreks
Forum Regular
Join Date: Nov 2002
Location: Bay Area
Status: Offline
Reply With Quote
Nov 10, 2003, 10:26 PM
 
Originally posted by keston:
emm.. using the word "only" along with a list of four items does not compute

pet peeves
don't pick on people's grammar, man, this isn't an english paper. thats my pet peeve. (said the guy furthering the grammar discussion)... If you're going to pick on anything pick on the retarded word "haxie"
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:44 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,