Bug 690739 (1/2) - [TabletUI] Make the swipable sidebar margin smaller when the sidebar is closed [r=mfinkle]

This commit is contained in:
Matt Brubeck 2011-09-30 15:02:16 -07:00
parent 72ba68a736
commit 51d1a1a523

View File

@ -1356,11 +1356,14 @@ Browser.MainDragger.prototype = {
let isTablet = Util.isTablet();
this._panToolbars = !isTablet;
this._grabSidebar = false;
// In landscape portrait mode, swiping from the left margin drags the tab sidebar.
this._grabSidebar = isTablet && !Util.isPortrait() &&
((Util.localeDir == Util.LOCALE_DIR_LTR) ?
(clientX - bcr.left < 30) :
(bcr.right - clientX < 30));
if (isTablet && !Util.isPortrait()) {
let grabSidebarMargin = TabsPopup.visible ? 30 : 5;
this._grabSidebar = ((Util.localeDir == Util.LOCALE_DIR_LTR)
? (clientX - bcr.left < 30)
: (bcr.right - clientX < 30));
}
if (this._grabSidebar)
Browser.grabSidebar();