From 6877f0dc1e54c7d2022deed6a8606c43a9261df9 Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 8 Apr 2009 15:42:39 +0000 Subject: [PATCH] =?UTF-8?q?=E5=B9=85=E3=81=8C=E7=B8=AE=E3=82=93=E3=81=A0?= =?UTF-8?q?=E7=8A=B6=E6=85=8B=E3=81=AE=E3=82=BF=E3=83=96=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E5=AF=BE=E3=81=97=E3=81=A6=E3=81=AF=E3=80=81=E3=82=B9?= =?UTF-8?q?=E3=83=97=E3=83=AA=E3=83=83=E3=82=BF=E4=BB=98=E8=BF=91=E3=81=AE?= =?UTF-8?q?=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88=E3=81=A7=E3=81=AF=E8=87=AA?= =?UTF-8?q?=E5=8B=95=E5=B1=95=E9=96=8B=E3=81=97=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4098 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 26 ++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 7986acee..f3a39bd1 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -3845,14 +3845,24 @@ TreeStyleTabBrowser.prototype = { var b = this.mTabBrowser; var pos = b.getAttribute(this.kTABBAR_POSITION); var box = b.mCurrentBrowser.boxObject; + + var sensitiveArea = this.sensitiveArea; + /* For resizing of shrunken tab bar and clicking closeboxes, + we have to shrink sensitive area a little. */ + if (!this.autoHideShown && this.autoHideMode == this.kAUTOHIDE_MODE_SHRINK) { + sensitiveArea = 0; + if (pos != 'right' || b.getAttribute(this.kUI_INVERTED) == 'true') + sensitiveArea -= 20; + } + var shouldKeepShown = ( pos == 'left' ? - (aEvent.screenX <= box.screenX + this.sensitiveArea) : + (aEvent.screenX <= box.screenX + sensitiveArea) : pos == 'right' ? - (aEvent.screenX >= box.screenX + box.width - this.sensitiveArea) : + (aEvent.screenX >= box.screenX + box.width - sensitiveArea) : pos == 'bottom' ? - (aEvent.screenY >= box.screenY + box.height - this.sensitiveArea) : - (aEvent.screenY <= box.screenY + this.sensitiveArea) + (aEvent.screenY >= box.screenY + box.height - sensitiveArea) : + (aEvent.screenY <= box.screenY + sensitiveArea) ); if (this.autoHideShown) { if ( @@ -3881,12 +3891,12 @@ TreeStyleTabBrowser.prototype = { } else if ( pos == 'left' ? - (aEvent.screenX <= box.screenX + this.sensitiveArea) : + (aEvent.screenX <= box.screenX + sensitiveArea) : pos == 'right' ? - (aEvent.screenX >= box.screenX + box.width - this.sensitiveArea) : + (aEvent.screenX >= box.screenX + box.width - sensitiveArea) : pos == 'bottom' ? - (aEvent.screenY >= box.screenY + box.height - this.sensitiveArea) : - (aEvent.screenY <= box.screenY + this.sensitiveArea) + (aEvent.screenY >= box.screenY + box.height - sensitiveArea) : + (aEvent.screenY <= box.screenY + sensitiveArea) ) { this.showHideTabbarOnMousemoveTimer = window.setTimeout( function(aSelf) {