Added support for custom buttons in title bar