Bug 871014 - (Part 1) Remove "margins" setting from reader mode menu. r=bnicholson

This commit is contained in:
Margaret Leibovic 2013-05-14 14:55:43 -07:00
Родитель ae85308b55
Коммит 20da89520a
4 изменённых файлов: 0 добавлений и 27 удалений

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

@ -662,9 +662,6 @@ pref("reader.parse-on-load.force-enabled", false);
// The default of font size in reader (1-7)
pref("reader.font_size", 4);
// The default of margin size in reader (5%-25%)
pref("reader.margin_size", 5);
// The default color scheme in reader (light, dark, sepia, auto)
// auto = color automatically adjusts according to ambient light level
pref("reader.color_scheme", "auto");

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

@ -31,8 +31,6 @@
<ul id="font-type-buttons" class="segmented-button"></ul>
<hr></hr>
<div id="font-size-control" class="step-control"></div>
<hr></hr>
<div id="margin-size-control" class="step-control"></div>
</li>
</ul>
<li><a id="list-button" class="button list-button" href="#"></a></li>

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

@ -91,12 +91,6 @@ let AboutReader = function(doc, win) {
this._FONT_SIZE_MIN, this._FONT_SIZE_MAX, this._FONT_SIZE_STEP, Services.prefs.getIntPref("reader.font_size"),
this._onFontSizeChange.bind(this));
let marginTitle = gStrings.GetStringFromName("aboutReader.marginTitle");
this._marginSize = 0;
this._setupStepControl("margin-size-control", marginTitle,
this._MARGIN_SIZE_MIN, this._MARGIN_SIZE_MAX, this._MARGIN_SIZE_STEP, Services.prefs.getIntPref("reader.margin_size"),
this._onMarginSizeChange.bind(this));
dump("Decoding query arguments");
let queryArgs = this._decodeQueryString(win.location.href);
@ -118,9 +112,6 @@ AboutReader.prototype = {
_FONT_SIZE_MIN: 1,
_FONT_SIZE_MAX: 7,
_FONT_SIZE_STEP: 1,
_MARGIN_SIZE_MIN: 5,
_MARGIN_SIZE_MAX: 25,
_MARGIN_SIZE_STEP: 5,
_BLOCK_IMAGES_SELECTOR: ".content p > img:only-child, " +
".content p > a:only-child > img:only-child, " +
@ -298,18 +289,6 @@ AboutReader.prototype = {
});
},
_onMarginSizeChange: function Reader_onMarginSizeChange(newMarginSize) {
let doc = this._doc;
this._marginSize = newMarginSize;
doc.body.style.marginLeft = this._marginSize + "%";
doc.body.style.marginRight = this._marginSize + "%";
this._updateImageMargins();
Services.prefs.setIntPref("reader.margin_size", this._marginSize);
},
_onFontSizeChange: function Reader_onFontSizeChange(newFontSize) {
let bodyClasses = this._doc.body.classList;

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

@ -6,7 +6,6 @@ aboutReader.loading=Loading...
aboutReader.loadError=Failed to load article from page
aboutReader.textTitle=Text
aboutReader.marginTitle=Margins
aboutReader.colorSchemeLight=Light
aboutReader.colorSchemeDark=Dark