Jason G. Designs

WordPress Themes, Print-On-Demand Resources and more…

Sizing Custom Window Icons for Openbox

by Jason Gonzalez

Posted in Categories: Tips

5
May
2015

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.

screenshot01_wrongsizeI 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.

 

Tags for this post: ,

Leave a Reply

Your email address will not be published. Required fields are marked *