зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
0631839b00
Коммит
2958381db2
|
@ -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 {"
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче