Responsive titlebar

This PR fixes issues with screen-adaptive behavior of elements in titlebar.