Stardock

Using Shadows Shifts Objects

By on January 18, 2008 1:42:51 AM from Stardock Forums Stardock Forums

Electo

Join Date 08/2007
+1
I have an object that I want to have a drop shadow only in certain states. I've got it so the drop shadow isn't visible when the mouse is away and visible when it hovers over the object, but the object always shifts down and to the right in the mouse over state. The larger the "Sharpness" value in the mouse over state, the more the object shifts.

My DXTheme was working fine without this problem until it just randomly started while I was working on it.

Any help would be appreciated,
Electo
11 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
January 18, 2008 5:20:27 AM from WinCustomize Forums WinCustomize Forums
You need to groups objects
with true relations

eg:

"Link1" (parent/owner: "Button1" | Child: "Yes" | Group:"Group1")
"Button1" (parent/owner: "Background" | Child: "Yes" | Group:"Group1")
"Background" (parent/owner: "" | Child: "No" | Group:"Group1")
Reason for Karma (Optional)
Successfully updated karma reason!
January 18, 2008 7:24:06 AM from WinCustomize Forums WinCustomize Forums
It is also possible to add image offsets to any state - click the "advanced" button at the bottom of the appearance tab. This, combined with shadow effects, is a quick and easy way to emulate something being pressed down when you click it whilst only using a single image.
Reason for Karma (Optional)
Successfully updated karma reason!
January 18, 2008 4:54:01 PM from Stardock Forums Stardock Forums
You need to groups objects
with true relations


I don't understand. If you're saying that I have to make my object a child of another object, I can't because its container has to be the desktop, not another object. Maybe I should explain my desktop.

I have an object that, after clicking a button, slides out across the desktop, and it contains a taskbar and system tray (I'm trying to make a "drawer" type effect). I made it so that it starts underneath another object, the main menu bar, so you can't see it until it slides out. This means that I can't make the object a child, otherwise the object would be clipped off at the end of the parent object once the drawer has opened. Plus, the object would be over top of the main menu bar, which is not what I want.

Sorry if that's not clear, but it seems that I need to explain what I'm trying to do.

Thanks for any advice,
Electo
Reason for Karma (Optional)
Successfully updated karma reason!
January 18, 2008 5:20:13 PM from WinCustomize Forums WinCustomize Forums
I'm not sure why this 'shifting' is happening.

Do you have two different images for each state? If so, the problem might be with the images/image sizes. Perhaps one image isn't exactly identical (e.g. size, position, etc) with the other.
Reason for Karma (Optional)
Successfully updated karma reason!
January 18, 2008 5:24:48 PM from WinCustomize Forums WinCustomize Forums
I can't because its container has to be the desktop, not another object.


Two solutions:
_One read and try Post #2 (Tiggz can't be wrong )
_Second make a background/parent for your object and make it transparent without activation
Reason for Karma (Optional)
Successfully updated karma reason!
January 18, 2008 6:28:20 PM from Stardock Forums Stardock Forums
sViz: I am using the same image for each state.

Quentin94: I tried changing the X and Y offsets as Tiggz said, but nothing different happened. However, using the transparent parent worked well, although it doesn't seem to be the most efficient method.

Also, it seems that setting the Z-Order of my entire group to Desktop Level keeps the object from moving, but I want to be able to access the object over top of other windows. The reason that the object started to do this "randomly" was probably because I originally had the object at the desktop level but later changed it to normal level.

I guess the transparent background method will have to do.

Thanks for all the advice.

Electo
Reason for Karma (Optional)
Successfully updated karma reason!
January 18, 2008 8:40:06 PM from WinCustomize Forums WinCustomize Forums
The changing of your order is relative to your object(s) relationships.

Layering(ie. transparent bgd) is the only way to do what you want relatively easy.

Trying to script something causes more problems than it solves...trust me.
Reason for Karma (Optional)
Successfully updated karma reason!
January 19, 2008 9:22:03 AM from WinCustomize Forums WinCustomize Forums
You will find that building things on transparent backgrounds is always a good idea, it allows you to keep things locked together, and also helps with things moving around.
I have been doing this on just about everything that has multiple parts that need to stay together. Even things like the Holiday Countdown Pro that has multiple (swappable) images that hang over the edges of what LOOKS LIKE the background object are actually sitting on another MASTER BG item that is transparent, so that everything stays where its suposed to and still looks like the image is "hanging" off the background. It also allows me to better position things knowing i have a set 0,0 starting point.

This might be a good "TIP" to add here: Link

Would love to see some more cool tips added, things that the avg skinner/coder doesnt know, or even things that a pro might not know. Im sure everyone has something they do alot, something that can help make dx coding go faster or better.
Reason for Karma (Optional)
Successfully updated karma reason!
January 19, 2008 10:04:02 PM from Stardock Forums Stardock Forums
Trying to script something causes more problems than it solves.

Well, you can't really do anything complex without scripts... I don't quite agree .

Thanks for the tips, guys.

Electo
Reason for Karma (Optional)
Successfully updated karma reason!
January 19, 2008 10:48:08 PM from WinCustomize Forums WinCustomize Forums
:lol

I meant scripting specifically to do with shifting the layers, z-order, and parent/child relationships. I've been known to do a script or two.

Having a base object (transparent layer) just makes things easier.
Reason for Karma (Optional)
Successfully updated karma reason!
January 20, 2008 2:29:12 PM from Stardock Forums Stardock Forums
I was just playing around with this and I think something has changed in a recent beta build perhaps.

Image offsets no longer work as before, whereby you could define offsets for an individual state. Now, if I apply an image offset to the "Mouse away" state, it effects all states. In addition, image offsets appear to have no effect on an object that is grouped with another object. This basically makes image offsets somewhat pointless

And, as stated by the OP, altering the sharpness or offsets of a shadow for a particular state gives the object itself an offset for that state - this is definitely not how this used to work.

I suspect (hope) that this is just a bug and that we can get the old behaviour back for these parameters.

*edit* above applies to objects that are not contained children, as other posters may have been referring to - however it seems a bit counter-intuitive to have 2 sets of behaviours for these parameters depending on their parent-child relationships
Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108432  walnut2   Server Load Time: 00:00:00.0000578   Page Render Time:
Facebook Twitter YouTube Google+