зеркало из https://github.com/mozilla/gecko-dev.git
Bug 871014 - (Part 1) Remove "margins" setting from reader mode menu. r=bnicholson
This commit is contained in:
Родитель
ae85308b55
Коммит
20da89520a
|
@ -662,9 +662,6 @@ pref("reader.parse-on-load.force-enabled", false);
|
||||||
// The default of font size in reader (1-7)
|
// The default of font size in reader (1-7)
|
||||||
pref("reader.font_size", 4);
|
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)
|
// The default color scheme in reader (light, dark, sepia, auto)
|
||||||
// auto = color automatically adjusts according to ambient light level
|
// auto = color automatically adjusts according to ambient light level
|
||||||
pref("reader.color_scheme", "auto");
|
pref("reader.color_scheme", "auto");
|
||||||
|
|
|
@ -31,8 +31,6 @@
|
||||||
<ul id="font-type-buttons" class="segmented-button"></ul>
|
<ul id="font-type-buttons" class="segmented-button"></ul>
|
||||||
<hr></hr>
|
<hr></hr>
|
||||||
<div id="font-size-control" class="step-control"></div>
|
<div id="font-size-control" class="step-control"></div>
|
||||||
<hr></hr>
|
|
||||||
<div id="margin-size-control" class="step-control"></div>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<li><a id="list-button" class="button list-button" href="#"></a></li>
|
<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._FONT_SIZE_MIN, this._FONT_SIZE_MAX, this._FONT_SIZE_STEP, Services.prefs.getIntPref("reader.font_size"),
|
||||||
this._onFontSizeChange.bind(this));
|
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");
|
dump("Decoding query arguments");
|
||||||
let queryArgs = this._decodeQueryString(win.location.href);
|
let queryArgs = this._decodeQueryString(win.location.href);
|
||||||
|
|
||||||
|
@ -118,9 +112,6 @@ AboutReader.prototype = {
|
||||||
_FONT_SIZE_MIN: 1,
|
_FONT_SIZE_MIN: 1,
|
||||||
_FONT_SIZE_MAX: 7,
|
_FONT_SIZE_MAX: 7,
|
||||||
_FONT_SIZE_STEP: 1,
|
_FONT_SIZE_STEP: 1,
|
||||||
_MARGIN_SIZE_MIN: 5,
|
|
||||||
_MARGIN_SIZE_MAX: 25,
|
|
||||||
_MARGIN_SIZE_STEP: 5,
|
|
||||||
|
|
||||||
_BLOCK_IMAGES_SELECTOR: ".content p > img:only-child, " +
|
_BLOCK_IMAGES_SELECTOR: ".content p > img:only-child, " +
|
||||||
".content p > a:only-child > 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) {
|
_onFontSizeChange: function Reader_onFontSizeChange(newFontSize) {
|
||||||
let bodyClasses = this._doc.body.classList;
|
let bodyClasses = this._doc.body.classList;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ aboutReader.loading=Loading...
|
||||||
aboutReader.loadError=Failed to load article from page
|
aboutReader.loadError=Failed to load article from page
|
||||||
|
|
||||||
aboutReader.textTitle=Text
|
aboutReader.textTitle=Text
|
||||||
aboutReader.marginTitle=Margins
|
|
||||||
|
|
||||||
aboutReader.colorSchemeLight=Light
|
aboutReader.colorSchemeLight=Light
|
||||||
aboutReader.colorSchemeDark=Dark
|
aboutReader.colorSchemeDark=Dark
|
||||||
|
|
Загрузка…
Ссылка в новой задаче