上下のタブバーが隠れない問題を修正
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@2652 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
202bc57785
commit
38d738b2be
@ -55,10 +55,23 @@ var TreeStyleTabService = {
|
||||
kTABBAR_HORIZONTAL : 3,
|
||||
kTABBAR_VERTICAL : 12,
|
||||
|
||||
autoHideMode : 0,
|
||||
kAUTOHIDE_MODE_DISABLED : 0,
|
||||
kAUTOHIDE_MODE_HIDE : 1,
|
||||
kAUTOHIDE_MODE_SHRINK : 2,
|
||||
get autoHideMode()
|
||||
{
|
||||
if (this._autoHideMode == this.kAUTOHIDE_MODE_SHRINK &&
|
||||
this.getTreePref('tabbar.position') != 'left' &&
|
||||
this.getTreePref('tabbar.position') != 'right')
|
||||
return this.kAUTOHIDE_MODE_HIDE;
|
||||
return this._autoHideMode;
|
||||
},
|
||||
set autoHideMode(aValue)
|
||||
{
|
||||
this._autoHideMode = aValue;
|
||||
return aValue;
|
||||
},
|
||||
_autoHideMode : 0,
|
||||
|
||||
kSHOWN_BY_UNKNOWN : 0,
|
||||
kSHOWN_BY_SHORTCUT : 1,
|
||||
@ -1641,14 +1654,6 @@ catch(e) {
|
||||
|
||||
case 'extensions.treestyletab.tabbar.autoHide.mode':
|
||||
this.autoHideMode = this.getTreePref('tabbar.autoHide.mode');
|
||||
if (
|
||||
this.autoHideMode == this.kAUTOHIDE_MODE_SHRINK &&
|
||||
!(
|
||||
this.getTreePref('tabbar.position') == 'left' ||
|
||||
this.getTreePref('tabbar.position') == 'right'
|
||||
)
|
||||
)
|
||||
this.autoHideMode = this.kATOHIDE_MODE_HIDE;
|
||||
case 'extensions.treestyletab.tabbar.autoShow.accelKeyDown':
|
||||
case 'extensions.treestyletab.tabbar.autoShow.tabSwitch':
|
||||
case 'extensions.treestyletab.tabbar.autoShow.feedback':
|
||||
|
@ -552,6 +552,8 @@ TreeStyleTabBrowser.prototype = {
|
||||
|
||||
initTabbar : function(aPosition)
|
||||
{
|
||||
this.clearTabbarCanvas();
|
||||
|
||||
var b = this.mTabBrowser;
|
||||
|
||||
if (!aPosition) aPosition = this.getTreePref('tabbar.position');
|
||||
@ -959,6 +961,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
else {
|
||||
if (aEvent.originalTarget.getAttribute('class') == this.kSPLITTER) {
|
||||
this.tabbarResizing = true;
|
||||
this.clearTabbarCanvas();
|
||||
this.mTabBrowser.setAttribute(this.kRESIZING, true);
|
||||
}
|
||||
this.cancelShowHideTabbarOnMousemove();
|
||||
@ -979,6 +982,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
if (aEvent.originalTarget.getAttribute('class') == this.kSPLITTER) {
|
||||
this.tabbarResizing = false;
|
||||
this.mTabBrowser.removeAttribute(this.kRESIZING);
|
||||
if (this.autoHideShown) this.redrawContentArea();
|
||||
}
|
||||
this.cancelShowHideTabbarOnMousemove();
|
||||
this.lastMouseDownTarget = null;
|
||||
@ -2779,7 +2783,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
fullScreenCanvas.show();
|
||||
var b = this.mTabBrowser;
|
||||
|
||||
var hiddenState;
|
||||
var pos = this.mTabBrowser.getAttribute(this.kTABBAR_POSITION);
|
||||
if (this.autoHideShown) { // to be hidden or shrunken
|
||||
this.tabbarHeight = b.mStrip.boxObject.height;
|
||||
this.tabbarWidth = b.mStrip.boxObject.width;
|
||||
@ -2795,7 +2799,8 @@ TreeStyleTabBrowser.prototype = {
|
||||
default:
|
||||
case this.kAUTOHIDE_MODE_SHRINK:
|
||||
b.setAttribute(this.kAUTOHIDE, 'show');
|
||||
b.mStrip.width = this.getTreePref('tabbar.shrunkenWidth');
|
||||
if (pos == 'left' || pos == 'right')
|
||||
b.mStrip.width = this.getTreePref('tabbar.shrunkenWidth');
|
||||
break;
|
||||
}
|
||||
this.showHideTabbarReason = aReason || this.kSHOWN_BY_UNKNOWN;
|
||||
@ -2825,7 +2830,8 @@ TreeStyleTabBrowser.prototype = {
|
||||
|
||||
default:
|
||||
case this.kAUTOHIDE_MODE_SHRINK:
|
||||
b.mStrip.width = this.getTreePref('tabbar.width');
|
||||
if (pos == 'left' || pos == 'right')
|
||||
b.mStrip.width = this.getTreePref('tabbar.width');
|
||||
break;
|
||||
}
|
||||
this.showHideTabbarReason = aReason || this.kSHOWN_BY_UNKNOWN;
|
||||
@ -2899,7 +2905,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
|
||||
drawTabbarCanvas : function()
|
||||
{
|
||||
if (!this.tabbarCanvas) return;
|
||||
if (!this.tabbarCanvas || this.tabbarResizing) return;
|
||||
|
||||
var pos = this.mTabBrowser.getAttribute(this.kTABBAR_POSITION);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user