Friday, January 15, 2010

Windows 7: Scaling gadgets when changing DPI

I have a 16 inch laptop screen running at 1920 by 1080 pixels, and despite having very good eyesight I find in uncomfortable to use my screen for prolonged periods at its native resolution. Hence I make the text larger by changing the DPI setting for my display under Control Panel in Windows 7. There is an option titled 'Make it easier to read what's on your screen'. This works better than ever in Windows 7.

However, in running in any mode over 100% (I use 125%) Windows automatically scales up its own gadgets accordingly, something which didn't happen under Vista. In order to retain the aesthetic integrity of the widget the whole thing is 'zoomed' or magnified to the new size resulting in a slightly soft or fuzzy widget. However, many of the 3rd party widgets don't scale automatically in the same way, so if you like to line up your gadgets down one side of your screen sidebar style, then they look terrible as they're different sizes. Not to mention the soft effect caused by the scaling. My personal preference is that the Windows gadgets are not scaled automatically and instead are shown at their original size for the native resolution. That way all the gadgets will match in size as well.

In order to disable the automatic scaling of the Windows 7 gadgets when you modify your display DPI you will need to create your own very slightly modified copy of the gadget. Here's how.

1) Take a copy of the gadget folder found here C:\Program Files\Windows Sidebar\Gadgets and paste it into a folder in Documents
2) Within the gadget folder structure you will find a file named gadget.xml which you need to edit in notepad. Taking the Calendar gadget as an example, you will need to modify Documents\Calendar.Gadget\en-US\gadget.xml
3) At the top of the file change the name of the widget e.g.



<name>Calendar No Scale</name>

4) Next find a line referring to the auto-scaling, and change 'true' to 'false'




5) Save the file and close it.
6) Modify your folder options in Explorer under Organize and untick 'Hide extensions for known file types'
7) Create a New Compressed (zipped) folder in your Documents outside of the gadget folder structure. Copy and paste all of the files and folders from INSIDE your gadget folder into this new zip file.
8) Rename the zip file to anything you like but most importantly remove the .zip extension and replace it with .Gadget
9) The icon representing the file and 'file type' should change to show 'Windows Gadget'
10) You can now double click this file, select 'Install' and the gadget should appear at its original size without any scaling.
11) You can uninstall this gadget just like any of the others, and you are not modifying the original gadget, instead creating a new copy so no harm can be done to your original system files.