XWIKI-11020: Gallery widget sets invalid dimensions for container element in maximized mode

dimensions.width / dimensions.height should be used for the main container in maximized mode to avoid empty borders