зеркало из https://github.com/mozilla/pjs.git
Bug 345950 - Provide a browser.tabs.tabMaxWidth. Patch by Dao Gottwald <dao@design-noir.de>, r=mano
This commit is contained in:
Родитель
eea1671eb5
Коммит
dcc5b28cea
|
@ -251,6 +251,7 @@ pref("browser.tabs.opentabfor.middleclick", true);
|
||||||
pref("browser.tabs.loadDivertedInBackground", false);
|
pref("browser.tabs.loadDivertedInBackground", false);
|
||||||
pref("browser.tabs.loadBookmarksInBackground", false);
|
pref("browser.tabs.loadBookmarksInBackground", false);
|
||||||
pref("browser.tabs.tabMinWidth", 100);
|
pref("browser.tabs.tabMinWidth", 100);
|
||||||
|
pref("browser.tabs.tabMaxWidth", 250);
|
||||||
pref("browser.tabs.tabClipWidth", 140);
|
pref("browser.tabs.tabClipWidth", 140);
|
||||||
|
|
||||||
// Where to show tab close buttons:
|
// Where to show tab close buttons:
|
||||||
|
|
|
@ -1150,7 +1150,7 @@
|
||||||
t.setAttribute("label", aURI);
|
t.setAttribute("label", aURI);
|
||||||
|
|
||||||
t.setAttribute("crop", "end");
|
t.setAttribute("crop", "end");
|
||||||
t.maxWidth = 250;
|
t.maxWidth = this.mTabContainer.mTabMaxWidth;
|
||||||
t.minWidth = this.mTabContainer.mTabMinWidth;
|
t.minWidth = this.mTabContainer.mTabMinWidth;
|
||||||
t.width = 0;
|
t.width = 0;
|
||||||
t.setAttribute("flex", "100");
|
t.setAttribute("flex", "100");
|
||||||
|
@ -2663,13 +2663,23 @@
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.mTabMinWidth = pb2.getIntPref("browser.tabs.tabMinWidth");
|
this.mTabMinWidth = pb2.getIntPref("browser.tabs.tabMinWidth");
|
||||||
this.mTabClipWidth = pb2.getIntPref("browser.tabs.tabClipWidth");
|
} catch (e) {
|
||||||
this.mCloseButtons = pb2.getIntPref("browser.tabs.closeButtons");
|
|
||||||
}
|
}
|
||||||
catch (e) {
|
try {
|
||||||
|
this.mTabMaxWidth = pb2.getIntPref("browser.tabs.tabMaxWidth");
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
this.mTabClipWidth = pb2.getIntPref("browser.tabs.tabClipWidth");
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
this.mCloseButtons = pb2.getIntPref("browser.tabs.closeButtons");
|
||||||
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.firstChild.minWidth = this.mTabMinWidth;
|
this.firstChild.minWidth = this.mTabMinWidth;
|
||||||
|
this.firstChild.maxWidth = this.mTabMaxWidth;
|
||||||
this.adjustTabstrip();
|
this.adjustTabstrip();
|
||||||
|
|
||||||
pb2.addObserver("browser.tabs.closeButtons",
|
pb2.addObserver("browser.tabs.closeButtons",
|
||||||
|
@ -2752,6 +2762,7 @@
|
||||||
});
|
});
|
||||||
</field>
|
</field>
|
||||||
<field name="mTabMinWidth">100</field>
|
<field name="mTabMinWidth">100</field>
|
||||||
|
<field name="mTabMaxWidth">250</field>
|
||||||
<field name="mTabClipWidth">140</field>
|
<field name="mTabClipWidth">140</field>
|
||||||
<field name="mCloseButtons">1</field>
|
<field name="mCloseButtons">1</field>
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче