Bug 1088305 - Allowed to customize the text color of the font preview tooltip; r=jdescottes

MozReview-Commit-ID: 4dESdQNgwRA

--HG--
extra : rebase_source : ffa4d865467f25a9da74e5a89e30d87d1d48209b
This commit is contained in:
Sebastian Zartner 2016-10-06 22:43:57 +02:00
Родитель fa397ea897
Коммит f7c177b686
2 изменённых файлов: 4 добавлений и 6 удалений

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

@ -13,6 +13,7 @@ const DEFAULT_PREVIEW_TEXT = "Abc";
const PREVIEW_UPDATE_DELAY = 150;
const {Task} = require("devtools/shared/task");
const {getColor} = require("devtools/client/shared/theme");
function FontInspector(inspector, window) {
this.inspector = inspector;
@ -161,14 +162,10 @@ FontInspector.prototype = {
this._lastUpdateShowedAllFonts = showAllFonts;
// Assume light theme colors as the default (see also bug 1118179).
let fillStyle = (Services.prefs.getCharPref("devtools.theme") == "dark") ?
"white" : "black";
let options = {
includePreviews: true,
previewText: this.getPreviewText(),
previewFillStyle: fillStyle
previewFillStyle: getColor("body-color")
};
let fonts = [];

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

@ -16,7 +16,8 @@ const variableFileContents = require("raw!devtools/client/themes/variables.css")
const THEME_SELECTOR_STRINGS = {
light: ":root.theme-light {",
dark: ":root.theme-dark {"
dark: ":root.theme-dark {",
firebug: ":root.theme-firebug {"
};
/**