From b48d29ccd265dec5b815e1c1fb5bae8701411ffc Mon Sep 17 00:00:00 2001 From: "BlakeR1234%aol.com" Date: Thu, 14 Sep 2006 05:52:19 +0000 Subject: [PATCH] Fix bug 37940, implement IE-style Text Size menu. Thanks to jag for the help. r=jag --- suite/browser/navigator.js | 12 +++++- suite/browser/navigatorOverlay.xul | 37 ++++++++++++------- .../en-US/chrome/browser/navigator.dtd | 14 ++++++- 3 files changed, 47 insertions(+), 16 deletions(-) diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js index 69e39e7f3b27..4eeaac5c345f 100644 --- a/suite/browser/navigator.js +++ b/suite/browser/navigator.js @@ -18,6 +18,7 @@ * Rights Reserved. * * Contributor(s): + * Blake Ross */ var pref = null; @@ -1028,6 +1029,16 @@ function BrowserEditBookmarks() } } +function BrowserChangeTextSize(newSize) + { + + var oldSize = document.getElementById("menu_TextSize_Popup").getAttribute("oldsize"); + var diff = newSize - oldSize; + If (diff != 0) BrowserChangeTextZoom(diff); + document.getElementById("menu_TextSize_Popup").setAttribute("oldsize", newSize); + + } + function BrowserSetDefaultCharacterSet(aCharset) { if (appCore != null) { @@ -1664,4 +1675,3 @@ function FillInHTMLTooltip ( tipElement ) return retVal; } - diff --git a/suite/browser/navigatorOverlay.xul b/suite/browser/navigatorOverlay.xul index 138016d97202..887e95240c37 100644 --- a/suite/browser/navigatorOverlay.xul +++ b/suite/browser/navigatorOverlay.xul @@ -17,7 +17,7 @@ Communications Corporation. Portions created by Netscape are Copyright (C) 1998-1999 Netscape Communications Corporation. All Rights Reserved. -Contributor(s): ______________________________________. --> +Contributor(s): Blake Ross . --> @@ -108,7 +108,15 @@ Contributor(s): ______________________________________. --> oncommand="BrowserChangeTextZoom(1);"/> - + + + + + @@ -195,16 +203,18 @@ Contributor(s): ______________________________________. --> - - + - - - + + + + + + + + + - - + - + @@ -508,4 +517,4 @@ END of Deprecated --> - + \ No newline at end of file diff --git a/suite/locales/en-US/chrome/browser/navigator.dtd b/suite/locales/en-US/chrome/browser/navigator.dtd index 2a95156d1f87..803ef0fa8647 100644 --- a/suite/locales/en-US/chrome/browser/navigator.dtd +++ b/suite/locales/en-US/chrome/browser/navigator.dtd @@ -50,6 +50,18 @@ + + + + + + + + + + + + @@ -319,7 +331,7 @@ - +