自動で隠すモードの切り替え時にタブバーの幅が正しく復元されるようにした
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@2660 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
0986e27b7f
commit
a3b2a53a7c
@ -1429,8 +1429,7 @@ catch(e) {
|
||||
onTabbarResized : function(aEvent)
|
||||
{
|
||||
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
|
||||
if (this.autoHideMode == this.kAUTOHIDE_MODE_SHRINK &&
|
||||
!b.treeStyleTab.tabbarExpanded)
|
||||
if (!b.treeStyleTab.tabbarExpanded)
|
||||
this.setTreePref('tabbar.shrunkenWidth', b.mStrip.boxObject.width);
|
||||
else
|
||||
this.setTreePref('tabbar.width', b.mStrip.boxObject.width);
|
||||
@ -1684,12 +1683,13 @@ catch(e) {
|
||||
break;
|
||||
|
||||
case 'extensions.treestyletab.tabbar.autoHide.mode':
|
||||
this.autoHideMode = this.getTreePref('tabbar.autoHide.mode');
|
||||
// don't set on this time, because appearance of all tabbrowsers are not updated yet.
|
||||
// this.autoHideMode = this.getTreePref('tabbar.autoHide.mode');
|
||||
case 'extensions.treestyletab.tabbar.autoShow.accelKeyDown':
|
||||
case 'extensions.treestyletab.tabbar.autoShow.tabSwitch':
|
||||
case 'extensions.treestyletab.tabbar.autoShow.feedback':
|
||||
if (
|
||||
this.autoHideMode &&
|
||||
this.getTreePref('tabbar.autoHide.mode') &&
|
||||
(
|
||||
this.getTreePref('tabbar.autoShow.accelKeyDown') ||
|
||||
this.getTreePref('tabbar.autoShow.tabSwitch') ||
|
||||
|
@ -877,8 +877,12 @@ TreeStyleTabBrowser.prototype = {
|
||||
|
||||
case 'extensions.treestyletab.tabbar.autoHide.mode':
|
||||
this.endAutoHide();
|
||||
if (value != this.kAUTOHIDE_MODE_DISABLED)
|
||||
this.startAutoHide();
|
||||
// update internal property after the appearance of the tab bar is updated.
|
||||
window.setTimeout(function(aSelf) {
|
||||
aSelf.autoHideMode = value;
|
||||
if (value != aSelf.kAUTOHIDE_MODE_DISABLED)
|
||||
aSelf.startAutoHide();
|
||||
}, 0, this);
|
||||
break;
|
||||
|
||||
case 'extensions.treestyletab.tabbar.autoShow.mousemove':
|
||||
@ -3126,6 +3130,9 @@ TreeStyleTabBrowser.prototype = {
|
||||
if (!this.autoHideEnabled) return;
|
||||
this.autoHideEnabled = false;
|
||||
|
||||
if (!this.autoHideShown)
|
||||
this.showHideTabbarInternal();
|
||||
|
||||
this.mTabBrowser.removeEventListener('mousedown', this, true);
|
||||
this.mTabBrowser.removeEventListener('mouseup', this, true);
|
||||
this.mTabBrowser.removeEventListener('scroll', this, true);
|
||||
|
Loading…
Reference in New Issue
Block a user