Apply new size of the tab bar specified at the configuration dialog, for all windows
This commit is contained in:
parent
dcb84057c8
commit
2018b2063e
@ -110,6 +110,25 @@ function initAppearancePane()
|
||||
});
|
||||
}
|
||||
|
||||
function readOverrideSize(aFieldId)
|
||||
{
|
||||
var field = document.getElementById(aFieldId);
|
||||
var overrideKey = field.getAttribute('preference');
|
||||
var regularKey = overrideKey.replace(/\.override$/, '');
|
||||
var regularPref = document.getElementById(regularKey);
|
||||
return regularPref.value;
|
||||
}
|
||||
|
||||
function writeOverrideSize(aFieldId)
|
||||
{
|
||||
var field = document.getElementById(aFieldId);
|
||||
var overrideKey = field.getAttribute('preference');
|
||||
var regularKey = overrideKey.replace(/\.override$/, '');
|
||||
var regularPref = document.getElementById(regularKey);
|
||||
regularPref.value = field.value;
|
||||
return field.value;
|
||||
}
|
||||
|
||||
|
||||
var gDropLinksOnRadioSet,
|
||||
gGroupBookmarkRadioSet,
|
||||
|
@ -27,9 +27,15 @@
|
||||
<preference id="extensions.treestyletab.tabbar.height"
|
||||
name="extensions.treestyletab.tabbar.height"
|
||||
type="int"/>
|
||||
<preference id="extensions.treestyletab.tabbar.height.override"
|
||||
name="extensions.treestyletab.tabbar.height.override"
|
||||
type="int"/>
|
||||
<preference id="extensions.treestyletab.tabbar.width"
|
||||
name="extensions.treestyletab.tabbar.width"
|
||||
type="int"/>
|
||||
<preference id="extensions.treestyletab.tabbar.width.override"
|
||||
name="extensions.treestyletab.tabbar.width.override"
|
||||
type="int"/>
|
||||
<preference id="extensions.treestyletab.tabbar.syncRelatedPrefsForDynamicPosition"
|
||||
name="extensions.treestyletab.tabbar.syncRelatedPrefsForDynamicPosition"
|
||||
type="bool"/>
|
||||
@ -116,7 +122,9 @@
|
||||
control="tabbarSize-horizontal"
|
||||
value="&config.tabbarSize.before-horizontal;"/>
|
||||
<textbox id="tabbarSize-horizontal"
|
||||
preference="extensions.treestyletab.tabbar.height"
|
||||
preference="extensions.treestyletab.tabbar.height.override"
|
||||
onsyncfrompreference="return readOverrideSize('tabbarSize-horizontal');"
|
||||
onsynctopreference="return writeOverrideSize('tabbarSize-horizontal');"
|
||||
type="number"
|
||||
min="1" increment="1" style="width:6em;"/>
|
||||
<label id="tabbarSize-after-horizontal"
|
||||
@ -131,7 +139,9 @@
|
||||
control="tabbarSize-vertical"
|
||||
value="&config.tabbarSize.before-vertical;"/>
|
||||
<textbox id="tabbarSize-vertical"
|
||||
preference="extensions.treestyletab.tabbar.width"
|
||||
preference="extensions.treestyletab.tabbar.width.override"
|
||||
onsyncfrompreference="return readOverrideSize('tabbarSize-vertical');"
|
||||
onsynctopreference="return writeOverrideSize('tabbarSize-vertical');"
|
||||
type="number"
|
||||
min="1" increment="1" style="width:6em;"/>
|
||||
<label id="tabbarSize-after-vertical"
|
||||
|
@ -18,6 +18,8 @@ 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);
|
||||
pref("extensions.treestyletab.tabbar.width.override", 200);
|
||||
pref("extensions.treestyletab.tabbar.height.override", 200);
|
||||
|
||||
/**
|
||||
* Position of the tab bar, possible values are:
|
||||
|
@ -2662,6 +2662,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
|
||||
case 'extensions.treestyletab.tabbar.shrunkenWidth':
|
||||
if (!this.shouldApplyNewPref('tabbar.width'))
|
||||
return;
|
||||
case 'extensions.treestyletab.tabbar.width.override':
|
||||
if (!this.autoHide.isResizing && this.isVertical) {
|
||||
this.removeTabStripAttribute('width');
|
||||
this.tabbarWidth = value;
|
||||
@ -2674,6 +2675,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
|
||||
case 'extensions.treestyletab.tabbar.height':
|
||||
if (!this.shouldApplyNewPref('tabbar.height'))
|
||||
return;
|
||||
case 'extensions.treestyletab.tabbar.height.override':
|
||||
this._horizontalTabMaxIndentBase = 0;
|
||||
this.tabbarHeight = value;
|
||||
this.checkTabsIndentOverflow();
|
||||
|
Loading…
x
Reference in New Issue
Block a user