API名変更
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7165 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
0988ed216a
commit
5c58302c7b
@ -145,11 +145,14 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
positionVerticalPinnedTabs : function TSTBrowser_positionVerticalPinnedTabs(aWidth, aHeight)
|
positionPinnedTabs : function TSTBrowser_positionPinnedTabs(aWidth, aHeight)
|
||||||
{
|
{
|
||||||
|
if (!this.isVertical)
|
||||||
|
return;
|
||||||
|
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var tabbar = b.tabContainer;
|
var tabbar = b.tabContainer;
|
||||||
var count = b._numPinnedTabs;
|
var count = this.pinnedTabsCount;
|
||||||
var width = aWidth || this.PINNED_TAB_DEFAULT_WIDTH;
|
var width = aWidth || this.PINNED_TAB_DEFAULT_WIDTH;
|
||||||
var height = aHeight || this.PINNED_TAB_DEFAULT_HEIGHT;
|
var height = aHeight || this.PINNED_TAB_DEFAULT_HEIGHT;
|
||||||
var maxCol = Math.floor(tabbar.boxObject.width / width);
|
var maxCol = Math.floor(tabbar.boxObject.width / width);
|
||||||
@ -164,6 +167,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
style.MozMarginStart = '';
|
style.MozMarginStart = '';
|
||||||
style.setProperty('margin-left', (width * col)+'px', 'important');
|
style.setProperty('margin-left', (width * col)+'px', 'important');
|
||||||
style.setProperty('margin-top', (- height * (maxRow - row))+'px', 'important');
|
style.setProperty('margin-top', (- height * (maxRow - row))+'px', 'important');
|
||||||
|
style.top = style.right = style.bottom = style.left = '';
|
||||||
col++;
|
col++;
|
||||||
if (col >= maxCol) {
|
if (col >= maxCol) {
|
||||||
col = 0;
|
col = 0;
|
||||||
@ -174,18 +178,15 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
PINNED_TAB_DEFAULT_WIDTH : 24,
|
PINNED_TAB_DEFAULT_WIDTH : 24,
|
||||||
PINNED_TAB_DEFAULT_HEIGHT : 24,
|
PINNED_TAB_DEFAULT_HEIGHT : 24,
|
||||||
|
|
||||||
clearPinnedTabsAppearance : function TSTBrowser_clearPinnedTabsAppearance()
|
resetPinnedTabs : function TSTBrowser_resetPinnedTabs()
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var tabbar = b.tabContainer;
|
var tabbar = b.tabContainer;
|
||||||
tabbar.style.MozMarginStart = '';
|
tabbar.style.MozMarginStart = tabbar.style.marginTop = '';
|
||||||
tabbar.style.marginTop = '';
|
for (var i = 0, count = this.pinnedTabsCount; i < count; i++)
|
||||||
for (var i = 0, count = b._numPinnedTabs; i < count; i++)
|
|
||||||
{
|
{
|
||||||
let style = tabbar.childNodes[i].style;
|
let style = tabbar.childNodes[i].style;
|
||||||
style.MozMarginStart = '';
|
style.MozMarginStart = style.marginLeft = style.marginTop = '';
|
||||||
style.marginLeft = '';
|
|
||||||
style.marginTop = '';
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -451,10 +452,10 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
'{',
|
'{',
|
||||||
<![CDATA[{
|
<![CDATA[{
|
||||||
if (this.tabbrowser.treeStyleTab.isVertical) {
|
if (this.tabbrowser.treeStyleTab.isVertical) {
|
||||||
this.tabbrowser.treeStyleTab.positionVerticalPinnedTabs();
|
this.tabbrowser.treeStyleTab.positionPinnedTabs();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.tabbrowser.treeStyleTab.clearPinnedTabsAppearance();
|
this.tabbrowser.treeStyleTab.resetPinnedTabs();
|
||||||
]]>.toString()
|
]]>.toString()
|
||||||
).replace(
|
).replace(
|
||||||
'this.mTabstrip.ensureElementIsVisible',
|
'this.mTabstrip.ensureElementIsVisible',
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<RDF:Description RDF:about="urn:mozilla:install-manifest"
|
<RDF:Description RDF:about="urn:mozilla:install-manifest"
|
||||||
em:id="treestyletab@piro.sakura.ne.jp"
|
em:id="treestyletab@piro.sakura.ne.jp"
|
||||||
em:name="Tree Style Tab"
|
em:name="Tree Style Tab"
|
||||||
em:version="0.10.2010080802"
|
em:version="0.10.2010080802+"
|
||||||
em:creator="SHIMODA Hiroshi"
|
em:creator="SHIMODA Hiroshi"
|
||||||
em:description="Show tabs like a tree."
|
em:description="Show tabs like a tree."
|
||||||
em:homepageURL="http://piro.sakura.ne.jp/xul/_treestyletab.html.en"
|
em:homepageURL="http://piro.sakura.ne.jp/xul/_treestyletab.html.en"
|
||||||
|
@ -1734,6 +1734,16 @@ var TreeStyleTabUtils = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get pinnedTabsCount()
|
||||||
|
{
|
||||||
|
return this.evaluateXPath(
|
||||||
|
'count(child::xul:tab[@pinned="true"])',
|
||||||
|
this.browser.mTabContainer,
|
||||||
|
Ci.nsIDOMXPathResult.NUMBER_TYPE
|
||||||
|
).numberValue;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
/* tabbar position */
|
/* tabbar position */
|
||||||
|
|
||||||
get currentTabbarPosition() /* PUBLIC API */
|
get currentTabbarPosition() /* PUBLIC API */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user