From f7c177b686b58ce38c482811ee8418d6c89669e6 Mon Sep 17 00:00:00 2001 From: Sebastian Zartner Date: Thu, 6 Oct 2016 22:43:57 +0200 Subject: [PATCH] Bug 1088305 - Allowed to customize the text color of the font preview tooltip; r=jdescottes MozReview-Commit-ID: 4dESdQNgwRA --HG-- extra : rebase_source : ffa4d865467f25a9da74e5a89e30d87d1d48209b --- devtools/client/inspector/fonts/fonts.js | 7 ++----- devtools/client/shared/theme.js | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/devtools/client/inspector/fonts/fonts.js b/devtools/client/inspector/fonts/fonts.js index fb036a136ee5..6e92c07c5306 100644 --- a/devtools/client/inspector/fonts/fonts.js +++ b/devtools/client/inspector/fonts/fonts.js @@ -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 = []; diff --git a/devtools/client/shared/theme.js b/devtools/client/shared/theme.js index ab7dd01b9d69..6ba956f64be3 100644 --- a/devtools/client/shared/theme.js +++ b/devtools/client/shared/theme.js @@ -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 {" }; /**