Merge pull request #346 from Infocatcher/patch-9
Add *.default preferences for tab bar size (v.2)
This commit is contained in:
commit
a516ba3ce6
@ -13,11 +13,15 @@ pref("extensions.treestyletab.animation.collapse.duration", 150);
|
||||
|
||||
/**
|
||||
* Size of resizable tab bar. They are completely ignored if "Tabs on Top"
|
||||
* is activated.
|
||||
* is activated. *.default preferences are user configurable defaults for
|
||||
* "reset tab bar size" feature
|
||||
*/
|
||||
pref("extensions.treestyletab.tabbar.width", 200);
|
||||
pref("extensions.treestyletab.tabbar.height", 32);
|
||||
pref("extensions.treestyletab.tabbar.shrunkenWidth", 80);
|
||||
pref("extensions.treestyletab.tabbar.width", 200);
|
||||
pref("extensions.treestyletab.tabbar.width.default", 200);
|
||||
pref("extensions.treestyletab.tabbar.height", 32);
|
||||
pref("extensions.treestyletab.tabbar.height.default", 32);
|
||||
pref("extensions.treestyletab.tabbar.shrunkenWidth", 80);
|
||||
pref("extensions.treestyletab.tabbar.shrunkenWidth.default", 80);
|
||||
|
||||
/**
|
||||
* Position of the tab bar, possible values are:
|
||||
|
@ -4679,11 +4679,11 @@ TreeStyleTabBrowser.prototype = {
|
||||
resetTabbarSize : function TSTBrowser_resetTabbarSize()
|
||||
{
|
||||
if (this.isVertical) {
|
||||
this.clearTreePref('tabbar.shrunkenWidth');
|
||||
this.clearTreePref('tabbar.width');
|
||||
this.setTreePref('tabbar.shrunkenWidth', this.getTreePref('tabbar.shrunkenWidth.default'));
|
||||
this.setTreePref('tabbar.width', this.getTreePref('tabbar.width.default'));
|
||||
}
|
||||
else {
|
||||
this.clearTreePref('tabbar.height');
|
||||
this.setTreePref('tabbar.height', this.getTreePref('tabbar.height.default'));
|
||||
let tabContainerBox = this.getTabContainerBox(this.mTabBrowser);
|
||||
tabContainerBox.removeAttribute('height');
|
||||
this._tabStripPlaceHolder.height = tabContainerBox.boxObject.height;
|
||||
|
@ -926,6 +926,8 @@ TreeStyleTabWindow.prototype = {
|
||||
|
||||
onTabbarReset : function TSTWindow_onTabbarReset(aEvent)
|
||||
{
|
||||
if (aEvent.button != 0)
|
||||
return;
|
||||
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
|
||||
if (b) {
|
||||
b.treeStyleTab.resetTabbarSize();
|
||||
|
Loading…
x
Reference in New Issue
Block a user