зеркало из https://github.com/mozilla/pjs.git
Bug 611555 (2/2) - Add a pref to control reflow zoom [r=mfinkle]
--HG-- extra : rebase_source : 400d48a82a22a71c10350a4e46c9402c1d55fe8c
This commit is contained in:
Родитель
fb2ffc022c
Коммит
af2ec2ce7b
|
@ -19,6 +19,7 @@
|
|||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Brubeck <mbrubeck@mozilla.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -374,6 +375,7 @@ pref("browser.ui.kinetic.swipeLength", 160);
|
|||
// zooming
|
||||
pref("browser.ui.zoom.pageFitGranularity", 5); // don't zoom to fit by less than 1/5 (20%)
|
||||
pref("browser.ui.zoom.animationDuration", 200); // ms duration of double-tap zoom animation
|
||||
pref("browser.ui.zoom.reflow", true); // Change text wrapping on double-tap
|
||||
|
||||
// pinch gesture
|
||||
pref("browser.ui.pinch.maxGrowth", 150); // max pinch distance growth
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
- Contributor(s):
|
||||
- Brad Lassey <blassey@mozilla.com>
|
||||
- Mark Finkle <mfinkle@mozila.com>
|
||||
- Matt Brubeck <mbrubeck@mozila.com>
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -474,6 +475,7 @@
|
|||
</setting>
|
||||
</settings>
|
||||
<settings id="prefs-content" label="&content.title;">
|
||||
<setting pref="browser.ui.zoom.reflow" title="&reflowZoom.title;" type="bool"/>
|
||||
<setting pref="permissions.default.image" title="&showImages.title;" type="boolint" on="1" off="2"/>
|
||||
<setting pref="javascript.enabled" type="bool" title="&enableJavaScript.title;"/>
|
||||
</settings>
|
||||
|
|
|
@ -508,7 +508,8 @@ Content.prototype = {
|
|||
element = element.parentNode;
|
||||
if (element) {
|
||||
rect = getBoundingContentRect(element);
|
||||
this._setTextZoom(Math.max(1, rect.width / json.width));
|
||||
if (Services.prefs.getBoolPref("browser.ui.zoom.reflow"))
|
||||
this._setTextZoom(Math.max(1, rect.width / json.width));
|
||||
}
|
||||
sendAsyncMessage("Browser:ZoomToPoint:Return", { x: x, y: y, rect: rect });
|
||||
break;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<!ENTITY about.title "About &brandShortName;">
|
||||
<!ENTITY about.button "Go to Page">
|
||||
<!ENTITY content.title "Content">
|
||||
<!ENTITY reflowZoom.title "Reformat text on zoom">
|
||||
<!ENTITY showImages.title "Show images">
|
||||
<!ENTITY enableJavaScript.title "Enable JavaScript">
|
||||
<!ENTITY enablePlugins.title "Enable Plugins">
|
||||
|
|
Загрузка…
Ссылка в новой задаче