Bug 345950 - Provide a browser.tabs.tabMaxWidth. Patch by Dao Gottwald <dao@design-noir.de>, r=mano

This commit is contained in:
rflint%ryanflint.com 2007-05-25 11:08:58 +00:00
Родитель eea1671eb5
Коммит dcc5b28cea
2 изменённых файлов: 16 добавлений и 4 удалений

Просмотреть файл

@ -251,6 +251,7 @@ pref("browser.tabs.opentabfor.middleclick", true);
pref("browser.tabs.loadDivertedInBackground", false);
pref("browser.tabs.loadBookmarksInBackground", false);
pref("browser.tabs.tabMinWidth", 100);
pref("browser.tabs.tabMaxWidth", 250);
pref("browser.tabs.tabClipWidth", 140);
// Where to show tab close buttons:

Просмотреть файл

@ -1150,7 +1150,7 @@
t.setAttribute("label", aURI);
t.setAttribute("crop", "end");
t.maxWidth = 250;
t.maxWidth = this.mTabContainer.mTabMaxWidth;
t.minWidth = this.mTabContainer.mTabMinWidth;
t.width = 0;
t.setAttribute("flex", "100");
@ -2663,13 +2663,23 @@
try {
this.mTabMinWidth = pb2.getIntPref("browser.tabs.tabMinWidth");
this.mTabClipWidth = pb2.getIntPref("browser.tabs.tabClipWidth");
this.mCloseButtons = pb2.getIntPref("browser.tabs.closeButtons");
} catch (e) {
}
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.maxWidth = this.mTabMaxWidth;
this.adjustTabstrip();
pb2.addObserver("browser.tabs.closeButtons",
@ -2752,6 +2762,7 @@
});
</field>
<field name="mTabMinWidth">100</field>
<field name="mTabMaxWidth">250</field>
<field name="mTabClipWidth">140</field>
<field name="mCloseButtons">1</field>