Update title bar layout for compatable with hdpi.
Fix some bugs.