タブの幅に関する設定の変更を即座にGUIに反映するようにした

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4167 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-04-21 06:21:15 +00:00
parent bb8dc24708
commit a4136ddcc5
2 changed files with 14 additions and 0 deletions

View File

@ -1762,10 +1762,12 @@ catch(e) {
onTabbarResized : function(aEvent)
{
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
this.tabbarWidthResetting = true;
if (!b.treeStyleTab.tabbarExpanded)
this.setTreePref('tabbar.shrunkenWidth', b.mStrip.boxObject.width);
else
this.setTreePref('tabbar.width', b.mStrip.boxObject.width);
this.tabbarWidthResetting = false;
},
initContextMenu : function()

View File

@ -1101,6 +1101,18 @@ TreeStyleTabBrowser.prototype = {
case 'extensions.treestyletab.tabbar.width':
case 'extensions.treestyletab.tabbar.shrunkenWidth':
if (!this.tabbarWidthResetting && this.isVertical) {
this.mTabBrowser.mStrip.removeAttribute('width');
this.mTabBrowser.mStrip.setAttribute(
'width',
(
!this.autoHideShown &&
this.autoHideMode == this.kAUTOHIDE_MODE_SHRINK
) ?
this.getTreePref('tabbar.shrunkenWidth') :
this.getTreePref('tabbar.width')
);
}
this.checkTabsIndentOverflow();
break;