Ubuntu UI Toolkit Gallery: reimplemented in a cleaner way the responsiveness of the UI. That will allow for working right-to-left support. Fixes: https://bugs.launchpad.net/bugs/1172652, https://bugs.launchpad.net/bugs/1182599.
Approved by PS Jenkins bot, Francis Ginther, Zsombor Egri.