From f2f6504e427ead5984d973cdfb3dea42a4219366 Mon Sep 17 00:00:00 2001 From: "sspitzer%mozilla.org" Date: Wed, 22 Aug 2007 05:04:07 +0000 Subject: [PATCH] fix for bug #343019, tab scrolling does not handle window resize well fix for bug #342890, make tab min width 125 px by default (down from 140 px) and heed the hidden browser.tabs.tabMinWidth pref. fix for bug #342385, get the hidden browser.tabs.tabClipWidth pref working. It was actually working, but I've changed the default to 115 px to match the 125 px default value for the browser.tabs.tabMinWidth pref. also, some code cleanup and whitespace fixes. r=mano, ui-r=beltzner git-svn-id: svn://10.0.0.236/trunk@232741 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/base/content/tabbrowser.xml | 71 +++++++++++---------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/mozilla/browser/base/content/tabbrowser.xml b/mozilla/browser/base/content/tabbrowser.xml index a4876e2f2da..56aee8e0df8 100644 --- a/mozilla/browser/base/content/tabbrowser.xml +++ b/mozilla/browser/base/content/tabbrowser.xml @@ -106,7 +106,7 @@ @@ -1099,7 +1099,7 @@ t.setAttribute("crop", "end"); t.maxWidth = 250; - t.minWidth = 140; + t.minWidth = this.mTabContainer.mTabMinWidth; t.width = 0; t.setAttribute("flex", "100"); t.setAttribute("validate", "never"); @@ -2393,27 +2393,33 @@ - var pb2 = - Components.classes['@mozilla.org/preferences-service;1']. - getService(Components.interfaces.nsIPrefBranch2); - try { - this.mTabClipWidth = pb2.getIntPref("browser.tabs.tabClipWidth"); - this.mCloseButtons = pb2.getIntPref("browser.tabs.closeButtons"); - } - catch (e) { - } + @@ -2472,7 +2478,8 @@ } }); - 130 + 125 + 115 1 @@ -2500,17 +2507,17 @@ this.childNodes.length == 1) this.setAttribute("closebuttons", "noclose"); else { - var width = this.firstChild.boxObject.width; - // 0 width is an invalid value and indicates an item without display, - // so ignore. - if (width > this.mTabClipWidth || width == 0) + var width = this.firstChild.boxObject.width; + // 0 width is an invalid value and indicates + // an item without display, so ignore. + if (width > this.mTabClipWidth || width == 0) this.setAttribute("closebuttons", "alltabs"); - else + else this.setAttribute("closebuttons", "activetab"); } - } - catch (e) { - } + } + catch (e) { + } break; case 2: case 3: @@ -2551,18 +2558,12 @@ ]]> - - - -