MacOS – Any way to make weather widget stick to its place

dashboard-widgetmacos

I have four weather widgets on my dashboard at the moment. The problem I'm finding is that when I arrange them one way – every now and then some of them move down by 20-100 px approximately.

I think it has to do with the weather graphic that is being loaded (i.e. sun, snow, rain, etc.). Sometimes they're taller than expected by the widget and it repositions itself which messes with my arrangement.

Question

Is there a way to make weather widgets stick to the place I position it at?
Does anybody know how to stop the rearrangement of the weather widgets?

Arranged:

enter image description here

Displaced:

enter image description here

Best Answer

The reason the weather widgets jump around is because the icon pictures of the current weather stick out above the widget itself. For example, the clouds or rain images. When the weather changes, the images change, and since they stick out different amounts, they move around to accommodate the change.

This is fixable but results in a tiny bit of chopping-off of the top of the widget image. Worth it in my opinion, you can hardly notice the chop-off.

Edit the file:

/Library/Widgets/Weather.wdgt/Weather.js

On line 359, change:

maxOffset = entry.voffset > maxOffset ? entry.voffset : maxOffset;

To:

maxOffset = 0;

It may be a different line number - 359 is correct for Snow Leopard. You should search the file for the correct one.

You need to redo this when you update OSX.