Update: Just to clarify that this question is not about imitating the OS but more about what the ideal dimensions should be, especially when they seem so random natively.
I am building an application in Adobe AIR that will run on both Windows and Mac OS X.
I'm giving the window chrome its own UI but keeping in with the OS its running on (so for example titlebar buttons will be left or right aligned etc.).
I've not been able to find any guidelines on either Apple or Microsoft developer networks so I've opted for screengrabs of Windows 8 and then redrawn the windows for my own versions.
What I've found for Windows 8 (desktop mode) is that a window has 6px spacing around the edges with 1px inner shadows and outer shadows. The title bar is 29px high and 22px when maximized.
The titlebar buttons are even more obsure, 26x20px for minimize, maximize and 45x20px for close button. The height is reduced to 19px when in maximized mode.
Here's a graphic I've made to demo all the above sizes:
The question is why the random sizes? As usually when I do anything like this I would do something like a 44px title bar, with either 16px, 24px or 32px icons. So that everything is an even number and is easy to do padding and position.
For example that close button is 45px wide, but the icon is 8x7px so it has 18px of padding one side and 19px the other side, and 7px top and 6px bottom (it's 6 top and bottom when reduced to 19px height on the maximized state). Is there some method in the random spacing?
What I've noticed most of all in Windows is that all the different apps have slight variations of icon sizes and window border dimensions (e.g. Visual Studio, Office, etc.)
What dimensions do people use for their window chrome? And are there any guidelines for this type of thing?