Troubleshooting this, I have found out that "good" values for the vertical component of tool-bar-button-margin are multiples of the frame char height (div 2). The following figures are examples (good values, vs. frame char height): 6 + n*10 20 0 + n*7 14 2 + n*8 16 4 + n*6 12 1 + n*7.5 15 The offset is what I'm stuck with. Where does that come from? I've tried finding clues in xdisp.c and found it impenetrable. Thanks very much for any help.