Sizing Custom Window Icons for Openbox
One source of confusion I ran into when creating my first Openbox theme was what pixel size to make my window decorations. The window decorations are the icons for close, minimize, etc. I initially set them at 16px by 16px, thinking that Openbox would draw the padding around the icons based on size (for instance, 16px plus 3 pixels on top and 3 pixels on bottom), but I noticed the images were getting clipped. A screenshot of the example theme from Openbox’s Themes page below shows what I mean.
I found out that Openbox scales the icons according to the font size in the titlebar. I read in a forum (I can’t remember where I read it) that the standard icon sizes are 8px by 8px or 10px by 10px, so in order for your .xbm images not to be clipped, it is recommended to make your images no larger than 10 x 10. If you want to make your window icons larger, you would have to specify that your theme’s users change the font size in obconf to something larger, such as 10px+.
I think the titlebars would be better in Openbox if window icons were sized according to their pixel dimensions rather than font size, as larger icons would be more fitting for today’s large, high resolution monitors. 10 x 10 pixel icons are somewhat tiny. We can’t have it all.
There is a hack using a transparent shadow, this is the second working way, which, in my opinion, is much better than changing the font size. You can try adding this to themerc:
window.active.label.text.font:shadow=y:shadowtint=0:shadowoffset=10
window.inactive.label.text.font:shadow=y:shadowtint=0:shadowoffset=10